Joel on Software has an excellent article for discussion.
The name of it is Making Wrong Code Look Wrong
The basic premise is that some forms of Hungarian notation are VERY good, and that the current Exception based programming we do in .NET is harmful.
The really excellent part about this article is: I can agree with him completely! And I have for years. You can read one of my old blogs on Hungarian notation. Though, Joel says it much more convincingly than I do.
The part on exceptions has been running through my head for a while now, but I hadn't spent any quality time with it. But it definitely deserves some more thought.
2 comments:
I personally have done away with most of my Hungarian" notation in code. I much prefer descriptive name like rowIndex instead of iRow or intRow and customerName instead of sCustomer or strCustomer or isTrue instead of boolIsTrue. I'm really not finding the need if the variable names are descriptive.
Then you didn't read the article!!!
It actually talks against that type of hungarian notation as well. In fact it spesifically talks about cases where you have things that are really similar, but you want to make extra care to not mess up: like rows and columns.
Using it to mark data types isn't considered as helpful.
Post a Comment