Click here to Skip to main content
15,305,430 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Why the world hates Hungarian notation? Pin
MSBassSinger5-Apr-12 5:44
professionalMSBassSinger5-Apr-12 5:44 
GeneralRe: Why the world hates Hungarian notation? Pin
MehGerbil5-Apr-12 5:49
MemberMehGerbil5-Apr-12 5:49 
GeneralRe: Why the world hates Hungarian notation? Pin
MSBassSinger5-Apr-12 5:53
professionalMSBassSinger5-Apr-12 5:53 
GeneralRe: Why the world hates Hungarian notation? Pin
Fran Porretto5-Apr-12 2:55
MemberFran Porretto5-Apr-12 2:55 
GeneralRe: Why the world hates Hungarian notation? Pin
ferahl5-Apr-12 3:29
Memberferahl5-Apr-12 3:29 
GeneralRe: Why the world hates Hungarian notation? Pin
Fabio Franco5-Apr-12 4:39
professionalFabio Franco5-Apr-12 4:39 
GeneralRe: Why the world hates Hungarian notation? Pin
Stuart Rubin5-Apr-12 4:49
MemberStuart Rubin5-Apr-12 4:49 
GeneralRe: Why the world hates Hungarian notation? Pin
BinaryReason5-Apr-12 4:56
MemberBinaryReason5-Apr-12 4:56 
Back in my embedded C and MFC days I used to be big on hungarian notation. No more. These days I am working mostly with C# and stay away from prefixes as much as possible for a few reasons.

1. Readability
As programmers we spend most of our time reading code not writing it. What's easier to read:
sAccountNumber = CreateAccountNumber(nId, sLastName, wUniqueId);
or
accountNumber = CreateAccountNumber(id, lastName, uniqueId);

2. Maintenance
Let's say I no longer want to use a string to store my account number. I want to encapsulate it inside a class. If you used accountNumber variable to begin with, you don't need to worry about renaming it. It's still just an accountNumber

With modern compiler GUIs you really don't need to encode the variable type in it's name. You can hover with your mouse over it, and find out immediately whether it's an int or a string, or some other user defined type. In fact, you should try to avoid thinking about storage types as much as possible, and program at a higher level of abstraction. Only when you get to the low level code, take care of the types.

I highly recommend Robert C. Martin's "Clean Code"[^], particularly Chapter 2: Meaningful Names apply to this discussion.
"There are only 10 types of people in the world - those who know binary and those who don't."

QuestionRe: Why the world hates Hungarian notation? Pin
MSBassSinger5-Apr-12 5:17
professionalMSBassSinger5-Apr-12 5:17 
GeneralRe: Why the world hates Hungarian notation? Pin
SeattleC++5-Apr-12 6:00
MemberSeattleC++5-Apr-12 6:00 
GeneralRe: Why the world hates Hungarian notation? Pin
Member 37636085-Apr-12 6:58
MemberMember 37636085-Apr-12 6:58 
GeneralRe: Why the world hates Hungarian notation? - Data Dictionary Pin
Toyist5-Apr-12 7:02
MemberToyist5-Apr-12 7:02 
GeneralRe: Why the world hates Hungarian notation? Pin
Mark Johnston (SSCGP)5-Apr-12 7:30
MemberMark Johnston (SSCGP)5-Apr-12 7:30 
GeneralRe: Why the world hates Hungarian notation? Pin
we785-Apr-12 7:56
Memberwe785-Apr-12 7:56 
GeneralRe: Why the world hates Hungarian notation? Pin
jschell5-Apr-12 9:15
Memberjschell5-Apr-12 9:15 
GeneralRe: Why the world hates Hungarian notation? Pin
Ed Hastings5-Apr-12 9:36
MemberEd Hastings5-Apr-12 9:36 
AnswerRe: Why the world hates Hungarian notation? Pin
RiskFactor5-Apr-12 11:32
MemberRiskFactor5-Apr-12 11:32 
GeneralRe: Why the world hates Hungarian notation? Pin
Gerry Schmitz6-Apr-12 14:37
mveGerry Schmitz6-Apr-12 14:37 
GeneralRe: Why the world hates Hungarian notation? Pin
john morrison leon9-Apr-12 4:06
Memberjohn morrison leon9-Apr-12 4:06 
GeneralRe: Why the world hates Hungarian notation? Pin
Stefan SeelandOld30-Apr-12 1:25
MemberStefan SeelandOld30-Apr-12 1:25 
GeneralRe: Why the world hates Hungarian notation? Pin
Eytukan2-May-12 21:44
MemberEytukan2-May-12 21:44 
JokeThis girl came up to me today ... Pin
Nagy Vilmos4-Apr-12 3:19
professionalNagy Vilmos4-Apr-12 3:19 
GeneralRe: This girl came up to me today ... Pin
Nish Nishant4-Apr-12 3:23
sitebuilderNish Nishant4-Apr-12 3:23 
GeneralRe: This girl came up to me today ... Pin
Henry Minute4-Apr-12 5:24
MemberHenry Minute4-Apr-12 5:24 
GeneralRe: This girl came up to me today ... Pin
Nish Nishant4-Apr-12 5:29
sitebuilderNish Nishant4-Apr-12 5:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Straw Poll

On which operating systems are you writing code?
Let's see if things have changed since we last ran this. "writing code" meaning editing, building, and running the code on that OS.
  Results   806 votes