Hungarian notation
Hungarian notation is a naming convention in computer programming, in which the name of an object indicates its type and intended use. According to Charles Simonyi, the inventor of Hungarian notation and senior programmer (at the time) at Microsoft, it was invented so:
"The names of the variables themselves give useful information about their type".
Like a disease, Hungarian has infected many programming shops over the last twenty years or so, especially in the corporate world, and is virtually the defacto standard throughout the Windows programming community. Its merits were spread extensively by books like Charles Petzold"s Programming Windows, the bible for learning Windows programming.
Hungarian uses "supposedly" useful prefixes like "l" for long and "ul" for "unsigned long" and "dw" for double word (actually an unsigned long). In Hungarian, the only thing that the prefix tells you is the actual data type of the variable. Hungarian, as argued by its supporters, allows you to instantly see problems with code which tries to perform illegal operations such as adding integers to strings. So, the problem with this type of code should be self-evident:
lRecordCount = sFirstName + iAge;
If we were to use the same variable names but refuse to use Hungarian, we would instead have this:
record_count = first_name + age;
The second method is better because it's easier to read. Hungarian is just plain dumb and ugly. The variable name alone should be enough to tell us about the type of data it holds. If that's not enough, any modern IDE will allow you to inspect (Shift+F2 in Visual Basic) the data type.
And for any potential arguments like "if we prefix every recordset with the letters 'rs' we can clearly see that it's a recordset, not an array", I say this:
If you can't tell it's a recordset without prefixing it with "rs", then perhaps you shouldn't be programming.
Due to the large volume of spam, comments are disabled. If you have anything relevant to say, you can leave a , or contact me directly.