Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Extensive use of Hungarian Notation ("i" before integers, "sz" before C-strings, and the kicker: "ob" before objects).

No use of STL, using a hand-rolled dynamic array instead that grew by a constant size instead of doubling.

Extensive amounts of application logic written right in the GUI builder's generated event handlers, for the company's very large flagship product.



That's "systems" Hungarian, developed by the one and only Microsoft. Putting the variable type inside the name is redundant, I think everyone can agree.

"Apps" Hungarian, on the other hand, is a wonderful system where the prefix describes the purpose of the variable (such as us for "usafe string" and ss for "safe string"). It also describes function naming convention (ss_from_us for "Safe string from unsafe string") so that you can easily tell if you're making a coding mistake. Compare:

  $ss_username = ss_from_us($us_username_field);

  $ss_username = $us_username_field;
Real easy to spot the mistakes.


also developed by the one and only microsoft.


Hungarian notation makes sense if (a) you have to declare all your variables at the top of the function, so you can't see the variable types, and (b) you don't have a code browser that gives you type information when you hover over a symbol. More and more, neither of those are true, so I find Hungarian fairly useless.


We used systems Hungarian notation for LotusScript because older versions of IBM Lotus Domino Designer had limitation (b) along with some other problems. It was actually helpful in understanding and maintaining complex code. But we always understood that we were doing it to work around editor flaws rather than because systems Hungarian notation was a good idea in general.


Even in C89, you can declare variables at the start of a block, not just at the top of a function.


http://www.joelonsoftware.com/articles/Wrong.html

Great article on Hungarian notation, why it used to be good, and how things went horribly awry. Takes a while to get to the point, but he's convincing.


so you know what (who ?) "paul" is : pointer-to-a-unsigned-long.

sorry, couldn't resist




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: