Click here to Skip to main content
15,908,444 members

Survey Results

Naming conventions in your code   [Edit]

Survey period: 24 Nov 2003 to 30 Nov 2003

What notations do you use when coding?

OptionVotes% 
Hungarian notation with prefixes (strFirstName, m_nNumber etc)76150.13
Hungarian notation without prefixes ( _nNumber etc)432.83
Camel Caps (numberOfDays, isValid etc)46230.43
Pascal case (BackColor, DataSet)17911.79

View optional text answers (92 answers)


 
GeneralRe: It ain't about Pin
Jörgen Sigvardsson28-Nov-03 11:13
Jörgen Sigvardsson28-Nov-03 11:13 
GeneralRe: It ain't about Pin
J. Dunlap29-Nov-03 10:29
J. Dunlap29-Nov-03 10:29 
GeneralRe: It ain't about Pin
obelisk2929-Nov-03 10:17
obelisk2929-Nov-03 10:17 
GeneralRe: It ain't about Pin
Jörgen Sigvardsson29-Nov-03 10:24
Jörgen Sigvardsson29-Nov-03 10:24 
GeneralMY conventions... Pin
Navin25-Nov-03 5:03
Navin25-Nov-03 5:03 
GeneralRe: MY conventions... Pin
Sarvesvara (BVKS) Dasa28-Nov-03 1:44
Sarvesvara (BVKS) Dasa28-Nov-03 1:44 
GeneralSimilar to... Pin
Joel Holdsworth25-Nov-03 1:45
Joel Holdsworth25-Nov-03 1:45 
GeneralArticles (definite or otherwise) Pin
Gavin Greig24-Nov-03 9:41
Gavin Greig24-Nov-03 9:41 
Philosophically, we use the Pascal convention but with a small selection of acceptable prefixes which effectively convert us to Camel case.

We use mostly English prefixes such as "the" (where broadly speaking we know what's in the variable) and "a" (where we don't, because it's local to a loop of some sort). Other acceptable prefixes are "in" and "out".

I think I would prefer that we use "the" only for member variables and don't use a prefix for local variables, unless it's set in a loop and therefore warrants using "a". I feel that "the" is rather over-used in our code - but otherwise, it seems to work fairly well and generally improves code readability.

Gavin Greig

"Haw, you're no deid," girned Charon. "Get aff ma boat or ah'll report ye."
Matthew Fitt - The Hoose O Haivers: The Twelve Trauchles O Heracles.

GeneralGood naming conventions. Pin
Nemanja Trifunovic24-Nov-03 5:16
Nemanja Trifunovic24-Nov-03 5:16 
GeneralGool ol' Hungarian Pin
Michael Dunn24-Nov-03 4:31
sitebuilderMichael Dunn24-Nov-03 4:31 
GeneralRe: Gool ol' Hungarian Pin
Nemanja Trifunovic24-Nov-03 5:13
Nemanja Trifunovic24-Nov-03 5:13 
GeneralRe: Gool ol' Hungarian Pin
Paul Watson24-Nov-03 5:41
sitebuilderPaul Watson24-Nov-03 5:41 
GeneralRe: Gool ol' Hungarian Pin
Bamaco224-Nov-03 9:15
Bamaco224-Nov-03 9:15 
GeneralRe: Gool ol' Hungarian Pin
Tim Smith25-Nov-03 16:52
Tim Smith25-Nov-03 16:52 
GeneralRe: Gool ol' Hungarian Pin
dog_spawn24-Nov-03 6:48
dog_spawn24-Nov-03 6:48 
GeneralRe: Gool ol' Hungarian Pin
Ravi Bhavnani24-Nov-03 7:00
professionalRavi Bhavnani24-Nov-03 7:00 
GeneralRe: Gool ol' Hungarian Pin
Nemanja Trifunovic24-Nov-03 9:32
Nemanja Trifunovic24-Nov-03 9:32 
GeneralRe: Gool ol' Hungarian Pin
Ravi Bhavnani24-Nov-03 9:37
professionalRavi Bhavnani24-Nov-03 9:37 
GeneralRe: Gool ol' Hungarian Pin
John Khodabakhshian24-Nov-03 13:49
John Khodabakhshian24-Nov-03 13:49 
GeneralRe: Gool ol' Hungarian Pin
Julien26-Nov-03 11:49
Julien26-Nov-03 11:49 
GeneralRe: Gool ol' Hungarian Pin
J.B27-Nov-03 14:42
J.B27-Nov-03 14:42 
GeneralRe: Gool ol' Hungarian Pin
Julien27-Nov-03 15:35
Julien27-Nov-03 15:35 
GeneralRe: Gool ol' Hungarian Pin
J.B27-Nov-03 16:20
J.B27-Nov-03 16:20 
GeneralRe: Gool ol' Hungarian Pin
ashleyb27-Nov-03 13:16
ashleyb27-Nov-03 13:16 
GeneralRe: Gool ol' Hungarian Pin
Blake Miller24-Nov-03 10:54
Blake Miller24-Nov-03 10:54 

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.