A useful Hungarian Notation
I just finished reading Joel On Software’s latest essay on Making Wrong Code Look Wrong and it actually presents a good case for using Hungarian Notation.
But not the HN that you’re probably used to. Skip about the first 75% of the article if you want the real guts and go to the section “I’m Hungary” and read from there down. The real Hungarian notation started out as something much more useful, and then along the way a “broken telephone” misunderstanding turned it into something very different. The creator of HN meant for the prefix to indicate the kind of variable, but wrote type instead which is interpreted in a much different way by many programmers. So people thought type meant int, String, etc and would create vars like strName and iPhoneNum which doesn’t mean as much as what was intended. Read the article for some insight and you might just change your thoughts on using Hungarian notation.