views:

215

answers:

4

I'm working on a legacy COM C++ project that makes use of system hungarian notation. Because it's maintenance of legacy code, the convention is to code in the original style it was written in - our newer code isn't coded this way. So I'm not interested in changing that standard or having a a discussion of our past sins =)

Is there an online cheat-sheet available out there for systems hungarian notation?

The best I can find thus far is a pre stack-overflow discussion post, but it doesn't quite have everything I've needed in the past. Does anyone have any other links?

(making this community wiki in the hope this becomes a self populating list)

+1  A: 

Here's one for 'Systems Hungarian', which in my experience was the more commonly used (and less useful):

But how universally followed this is, I have no idea.

The other form of Hungarian Notation is "Apps Hungarian", which apparently is Simonyi's original intent (the use of the variable was encoded rather than the type). See http://en.wikipedia.org/wiki/Hungarian%5Fnotation for some details.

Michael Burr
+2  A: 

If this is for a legacy COM project, you'll probably want to follow Microsoft's Hungarian Notation specifications, which are documented on MSDN.

Reed Copsey
+1  A: 

Because this is a legacy project, your software department manager should have a copy of the style guide for whatever version of Hungarian Notation the original programmers used. (I'm assuming that the original programmers have long since fled to more enlightened workplaces.)

You really should reconsider your use of Hungarian notation. It was originally a patch for the lack of strong typing (and compiler type-checking) in C. Modern compilers enforce type-correctness, making Hungarian notation redundant at best, and erroneous otherwise.

John R. Strohm
OP has already stated "our newer code isn't coded this way"
RobS
+1  A: 

There doesn't seem to be any one exhaustive resource for looking up Hungarian Notation prefixes, probably because a lot of it varied from code base to code base. There, of course, were a lot of very commonly used ones.

The best list I could find was here

The rest cover the commonly used conventions such as this entry

MSDN's enty on Hungarian Notation is here and a couple of short papers on the subject (overlapping each other perhaps) here and here

Your best bet would be to see how the variables are used and that (may) help you figure out the definition of the prefixes (though in practice the naming rarey reflected the use of the variable, sadly).

You might be able to piece together some semblance of notation from those various links.

Just to be complete(!) how about Hungarian Object Notation for Visual Basic from Microsoft Support no less.

RobS