4 ms·
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 dynam
by swolchok 17y ago
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.
- ben_straub 17y agoHungarian 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.
- swolchok 17y agoEven in C89, you can declare variables at the start of a block, not just at the top of a function.
- nradov 17y agoWe 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.
- windsurfer 17y agoThat'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.
- hc 17y agoalso developed by the one and only microsoft.
- signa11 17y agoso you know what (who ?) "paul" is : pointer-to-a-unsigned-long. sorry, couldn't resist
- youngian 17y agohttp://www.joelonsoftware.com/articles/Wrong.html 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.