Click here to Skip to main content
15,921,531 members

Survey Results

Naming conventions in your code   [Edit]

Survey period: 31 Jan 2005 to 6 Feb 2005

What notations do you use when naming variables? (And have things changed since we first asked back in 2003?)

OptionVotes% 
Hungarian notation with prefixes (strFirstName, m_nNumber etc)77140.86
Hungarian notation without prefixes ( _nNumber etc)492.60
Camel Caps (numberOfDays, isValid etc)72538.42
Pascal case (BackColor, DataSet)22511.92
C-style (this_is_a_variable)492.60
FORTRAN case (all caps)30.16

View optional text answers (82 answers)


 
GeneralProject and language/library consistency Pin
Mike Dimmick5-Feb-05 6:02
Mike Dimmick5-Feb-05 6:02 
GeneralDepends on what i'm doing. Pin
Shog94-Feb-05 13:03
sitebuilderShog94-Feb-05 13:03 
GeneralMixing Stuff Pin
Alejandro K.4-Feb-05 1:53
Alejandro K.4-Feb-05 1:53 
GeneralRe: Mixing Stuff Pin
Paranoicus Maximus6-Feb-05 17:21
Paranoicus Maximus6-Feb-05 17:21 
GeneralGood poll! Pin
thwart3-Feb-05 4:07
thwart3-Feb-05 4:07 
GeneralRe: Good poll! Pin
gehkadl3-Feb-05 6:22
gehkadl3-Feb-05 6:22 
GeneralRe: Good poll! Pin
Michael Dunn3-Feb-05 7:50
sitebuilderMichael Dunn3-Feb-05 7:50 
GeneralRe: Good poll! Pin
gehkadl3-Feb-05 21:07
gehkadl3-Feb-05 21:07 
GeneralRe: Good poll! Pin
Ravi Bhavnani5-Feb-05 9:29
professionalRavi Bhavnani5-Feb-05 9:29 
GeneralThis should be multiply selection poll Pin
Igor Urdenko2-Feb-05 21:20
Igor Urdenko2-Feb-05 21:20 
GeneralDitto Pin
Grimolfr3-Feb-05 4:30
Grimolfr3-Feb-05 4:30 
GeneralRe: Ditto Pin
malharone3-Feb-05 6:30
malharone3-Feb-05 6:30 
GeneralRe: Ditto Pin
Grimolfr3-Feb-05 8:28
Grimolfr3-Feb-05 8:28 
GeneralEspanol? Pin
Michael Dunn2-Feb-05 13:45
sitebuilderMichael Dunn2-Feb-05 13:45 
GeneralRe: Espanol? Pin
Alvaro Mendez3-Feb-05 6:01
Alvaro Mendez3-Feb-05 6:01 
GeneralDepends on platform Pin
Madhu Kampurath1-Feb-05 17:52
Madhu Kampurath1-Feb-05 17:52 
GeneralRe: Depends on platform Pin
Ravi Bhavnani2-Feb-05 3:27
professionalRavi Bhavnani2-Feb-05 3:27 
GeneralRe: Depends on platform Pin
Anonymous2-Feb-05 4:57
Anonymous2-Feb-05 4:57 
GeneralcamelCase vs Hungarian Pin
Phil Sidari1-Feb-05 10:07
Phil Sidari1-Feb-05 10:07 
GeneralRe: camelCase vs Hungarian Pin
Jörgen Sigvardsson1-Feb-05 11:14
Jörgen Sigvardsson1-Feb-05 11:14 
GeneralRe: camelCase vs Hungarian Pin
mlkeS1-Feb-05 15:37
mlkeS1-Feb-05 15:37 
GeneralRe: camelCase vs Hungarian Pin
slimtim1-Feb-05 20:00
slimtim1-Feb-05 20:00 
I am a C++ programmer and am a firm believer in Hungarian notation. I don't have an answer for you but I go to a weekly .NET Users group on the Redmond, WA. campus and the comments I have heard from some of the Microsoft employees and contractors there is that they are going away from Hungarian because of inconsistent use (sMyVar or strMyVar for strings, iMyVar or nMyVar for ints) and the improvements that have been made with intellisense.

I agree that it can be a nuisance to decipher someone's Hungarian but once you know the coding style it is nice to be able to quickly read the code without having to stop and wait for the intellisense to pop up showing the variable type.

-Tim
GeneralRe: camelCase vs Hungarian Pin
James R. Twine2-Feb-05 6:03
James R. Twine2-Feb-05 6:03 
GeneralRe: camelCase vs Hungarian Pin
slimtim2-Feb-05 9:10
slimtim2-Feb-05 9:10 
GeneralRe: camelCase vs Hungarian Pin
Dale Thompson2-Feb-05 12:34
Dale Thompson2-Feb-05 12:34 

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.