He assumes that you cannot create you own types, e.g just create a HtmlEncodedString class. This was relevant in C and VBScript, but certainly not in C# or any other modern language I know of. Hungarian notation is a manually checked safeguard against wrong conversions when the language is not powerful to check it automatically. It is just cargo cult programming to keep using it in modern languages.
Note that his examples are in VBScript (a language which is as obsolete as BCPL). This might also explain his aversion towards exceptions.
Joel is a great writer and have many great points (also in this article), but understand that his coding advice is from a different era.
Which would be basically everyone who didn't learn to write software on Windows.
If you have a reasonable type system and language, leverage it to enforce semantics that Spolsky suggests you use Hungarian notation to imply by convention.
You'll be much less likely to be castigated by the individual who has to maintain your code after you. Microsoft has put Hungarian notation to rest, nobody else o speak of uses it, and you shouldn't either.
The type of Hungarian notation Spolsky uses at Fog Creek is different than the Hungarian once pushed by Microsoft. He goes over that in the linked article. I'm not defending it - I've never tried it - but it obviously works for Joel.
Also, if you're working at Fog Creek, the guy who has to maintain your code after you will also be using Hungarian.
The type of Hungarian notation Spolsky uses at Fog Creek is different than the Hungarian once pushed by Microsoft.
Hungarian notiation (of any variety) started (and ended) at Microsoft.
Also, if you're working at Fog Creek, the guy who has to maintain your code after you will also be using Hungarian.
If you're working at Fog Creek you're writing code in a custom in-house programming language as well as using Hungarian notation. I don't think the example is generally useful or applicable to anyone else.
Comments
Ignore the Hungarian haters.
Joel's stance on Hungarian notation is laid out here: http://www.joelonsoftware.com/articles/Wrong.html
He assumes that you cannot create you own types, e.g just create a HtmlEncodedString class. This was relevant in C and VBScript, but certainly not in C# or any other modern language I know of. Hungarian notation is a manually checked safeguard against wrong conversions when the language is not powerful to check it automatically. It is just cargo cult programming to keep using it in modern languages.
Note that his examples are in VBScript (a language which is as obsolete as BCPL). This might also explain his aversion towards exceptions.
Joel is a great writer and have many great points (also in this article), but understand that his coding advice is from a different era.
Ignore the Hungarian haters.
Which would be basically everyone who didn't learn to write software on Windows.
If you have a reasonable type system and language, leverage it to enforce semantics that Spolsky suggests you use Hungarian notation to imply by convention.
You'll be much less likely to be castigated by the individual who has to maintain your code after you. Microsoft has put Hungarian notation to rest, nobody else o speak of uses it, and you shouldn't either.
The type of Hungarian notation Spolsky uses at Fog Creek is different than the Hungarian once pushed by Microsoft. He goes over that in the linked article. I'm not defending it - I've never tried it - but it obviously works for Joel.
Also, if you're working at Fog Creek, the guy who has to maintain your code after you will also be using Hungarian.
The type of Hungarian notation Spolsky uses at Fog Creek is different than the Hungarian once pushed by Microsoft.
Hungarian notiation (of any variety) started (and ended) at Microsoft.
Also, if you're working at Fog Creek, the guy who has to maintain your code after you will also be using Hungarian.
If you're working at Fog Creek you're writing code in a custom in-house programming language as well as using Hungarian notation. I don't think the example is generally useful or applicable to anyone else.
That's a terrible defense. Only a cat, and a fairly new one to coding at that, would find Hungarian notation to be useful as a debugging tool.