C
csharper
Ever since I started to learn programming, I have been used to modern
object-oriented programming language (such as C# and Java) naming
conventions. For C#, I try my best to follow the naming guidelines
MSDN laid out. But more often than not when I take on a project, I
see all kinds of ugly naming mixtures. For example, these are just
some of what I have seen in the code of a project I am working on
clsEmployee // Can you say "Employee"? Why cls?
m_strFN // Can you say "FirstName"?
strID // What ID? Can you say something like "EmployeeID" or
"employeeID"?
m_strID // Same as above.
eMode, // What mode? Can you say maybe "PlayMode" or "PoopingMode"?
blnError // Can you just say something like "IsWrong" or "isWrong"?
XmlNode objNode // How about "XmlNode studentNode"?
oItem // Will it kill you to say "item" instead?
objReturn // Just because it is an object you will return from your
method?
strReturn // Just because it is a string you will return from your
method?
objPres // Is it president or presentation or presenter?
objAns // Looks like it is answer?
m_blnIsCorrect // "IsCorrect" can't make any sense to you?
Will these names bother you? The mixture of Hungarian notation,
underscores, plus arbitrary abbreviation really bothers me. Worse yet,
when I code something new in the project, I guess will have to follow
this bad practice in order to make it look consistent (in a bad way).
object-oriented programming language (such as C# and Java) naming
conventions. For C#, I try my best to follow the naming guidelines
MSDN laid out. But more often than not when I take on a project, I
see all kinds of ugly naming mixtures. For example, these are just
some of what I have seen in the code of a project I am working on
clsEmployee // Can you say "Employee"? Why cls?
m_strFN // Can you say "FirstName"?
strID // What ID? Can you say something like "EmployeeID" or
"employeeID"?
m_strID // Same as above.
eMode, // What mode? Can you say maybe "PlayMode" or "PoopingMode"?
blnError // Can you just say something like "IsWrong" or "isWrong"?
XmlNode objNode // How about "XmlNode studentNode"?
oItem // Will it kill you to say "item" instead?
objReturn // Just because it is an object you will return from your
method?
strReturn // Just because it is a string you will return from your
method?
objPres // Is it president or presentation or presenter?
objAns // Looks like it is answer?
m_blnIsCorrect // "IsCorrect" can't make any sense to you?
Will these names bother you? The mixture of Hungarian notation,
underscores, plus arbitrary abbreviation really bothers me. Worse yet,
when I code something new in the project, I guess will have to follow
this bad practice in order to make it look consistent (in a bad way).