I don’t like hungarian notation. Not one little bit. In order to show how hungarian notation can cause confusion in code, and make code harder to read I am going to run the first international obfuscation through Hungarian notation competition. I want to see just how bad it can get. The code can either be “intentionally” obfuscated, or an example of obscure code found “in the wild”. As first prize I’m offering a T-Shirt with the following famous quote regarding hungarian notation (attributed to Alec Flett at Netscape) printed on it:
prepBut nI vrbLike adjHungarian! qWhat’s artThe adjBig nProblem?
Make submissions through the comment part of my weblog here. Your submissions can include your name, the code, if it is code from “the wild” and if you wish to remain anonymous if I post the code here on my weblog. You have one month to submit the code and the usual disclaimers apply - judges decision is final yadda yadda.
Suggested Reading: http://mindprod.com/unmainnaming.html
Comments
I work in a web development shop with about 10 other Asp.net developers. When I work in a team I have to fight the rest of the team so we don’t use the bastard version of Hungarian notation which is commonly used now-a-days. I often just give in. Sigh….
What’s really funny is when two different developers try to make up a prefix for an object without agreeing on it at first. For DataGrid I’ve seen dg, dtg, dgr… ugh!!!
The best reason I’ve heard (only relatively) for using this damn naming scheme is this:
"It makes intellisense in my code behind easier. All my TextBoxes are in the same spot in the menu."
Presumably, this is in case you forget the name of your TextBox, you can always find it. :/
However, in actual code I stay as far away from it as possible.