Monthly Archives: March 2012

How Html.Action() Work

Let’s take the example:

@Html.Action("Latest", "Episode")

What this will do is to invoke the “Latest” action method in the “Episode” controller. But what really happens behind the scenes is NOT a direct invoke; it will actually start from the beginning of the ASP.NET MVC execution pipeline using “Latest” and “Episode” as Route values for the keys “action” and “controller” respectively.

This means that you should pay very good attention to your Routes definition in the Application_Start() in Global.asax; Html.Action() will try to match the best route in your defined routes according to the RouteValueDictionary created above (action and controller) along with any additional route values provided in the overload.

So bottom line don’t assume that Html.Action will invoke action directly, and make sure that your Route unit tests always cover your back when you need to change your Route definitions, or your risk your Html.Action() methods to be ruined.

The Magical Effect of Simple Encouraging Words

image credit goes for I had to go through some health checkup that included tests for my eye, one of these tests required from me to keep my eye open for a long period of time concentrating continuously into an extremely strong and annoying light.
During the test I kept receiving encouraging words from the examining doctor every couple of seconds: “Bravo Emad! very good concentration, keep it up, that’s it”.
Even though it was a simple task and me being in my 30’s!… I still had a strong feeling that I was doing something right! and that I should keep doing what I was doing, to give more effort no matter how annoying and hurting this intense light was; and all of this was due to his words! the more he encouraged the wider I opened my eye and concentrated.

The moral of the story is that if you are managing people never ever under estimate the simple words of encouragement, or discouragement!

Criticizing Google Reader’s UI

Since Google changes the look of its products very often, most likely this post will be out of date soon, nonetheless I believe it’d be a good to share my thoughts about Google Reader’s current UI… with a little rant.

  1. Lots of real-state waste:
    All the areas surrounded with yellow borders are a wasted, especially that I have no control over hiding or showing them (click on image to see it real size):


  2. Actions RARELY used are ALWAYS available, and taking too much space: ActionsRarelyUsed-edited
  3. Actions most used are small, at the bottom of the post, and not always in view:NeededActionsNotAvailable
  4. The highlight of the selected blog isn’t clear enough:

  5. Title doesn’t stay in view while scrolling (negotiable): titleMovesWithScrolling-edited

Ok Google you did a great job introducing GMail and Reader with all this labeling and cool stuff, how about little bit attention to UI?