First International Obfuscation through Hungarian Notation Competition

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

DrFooMod2
That’s really funny. It took me a few seconds, but I get it now. "prep" for preposition, etc. LOL
7/06/2004 11:08:00 PM
Scott C Reynolds
Dude, I think a CafePress Shop is in order.
8/06/2004 1:33:00 AM
Todd Moon
It’s even funnier because of how hard it really is to read!

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. :/
8/06/2004 1:40:00 AM
Scott C Reynolds
I will admit that I still use something like that for form objects. txtBlah, dgBlah, etc, because of the Intellisense factor. When doing a form with a crapload of objects, it does in fact make it easier. Or maybe I’m just lazy.

However, in actual code I stay as far away from it as possible.
8/06/2004 1:42:00 AM
Andy Smith’s Blog
8/06/2004 4:35:00 AM
Alec’s thoughts
A long time ago, people were bitching about Hungarian notation in code. Its a rediculous convention perpetrated by Microsoft in the early nineties. During some debates on a mozilla newsgroup, circa 1999, I made this comment: prepBut nI vrbLike adjHungarian!…
14/06/2004 9:33:00 AM
Jonathan Bindel
I also use Hungarian notation in forms because sometimes it is hard to remember what you named that textbox or label or whatever. But once I’m out of forms, Hungarian doesn’t come anywhere near my code. Don’t completely throw out Hungarian. It does have its place in forms.
12/09/2004 7:03:00 AM