Click here to Skip to main content
15,895,142 members

Survey Results

Do you comment your code?

Survey period: 5 May 2014 to 12 May 2014

A repeat of our survey from 4 years ago. Let's see how things have changed.

OptionVotes% 
I add comment headers for all public classes, objects and methods, events, fields etc56740.04
I add comment headers for all non-public classes, objects and methods, as well as non-obvious logic inside these37226.27
I provide comments at the top of files29921.12
I comment any code that may be obscure (the "what") to a reader88162.22
I comment any code where the purpose (the "why") may be obscure93966.31
I comment on expected inputs, outputs and other results27719.56
I comment on exceptions, side effects or error codes31222.03
I comment on structures (loop endings, function endings etc)16911.94
I comment as a last resort when I can't make my code any clearer36325.64
I do not comment code.896.29
Respondents were allowed to choose more than one answer; totals may not add up to 100%



 
GeneralPosting Articles in CodeProjec Improves My Commenting Pin
Ravimal Bandara5-May-14 17:55
Ravimal Bandara5-May-14 17:55 
GeneralThe Only Times I Comment Pin
jgakenhe5-May-14 11:57
professionaljgakenhe5-May-14 11:57 
AnswerI comment on questions regarding code commenting Pin
MacSpudster5-May-14 11:29
professionalMacSpudster5-May-14 11:29 
GeneralInitial and date comments Pin
_Damian S_5-May-14 11:14
professional_Damian S_5-May-14 11:14 
GeneralRe: Initial and date comments Pin
Gary R. Wheeler6-May-14 13:41
Gary R. Wheeler6-May-14 13:41 
GeneralRe: Initial and date comments Pin
_Damian S_6-May-14 13:52
professional_Damian S_6-May-14 13:52 
GeneralRe: Initial and date comments Pin
_Maxxx_11-May-14 1:01
professional_Maxxx_11-May-14 1:01 
GeneralDoxyGen compliant Pin
Mike Hankey5-May-14 10:59
mveMike Hankey5-May-14 10:59 
I try to make all my code DoxyGen compliant.
Along with Antimatter and Dark Matter they've discovered the existence of Doesn't Matter which appears to have no effect on the universe whatsoever!
Rich Tennant 5th Wave

GeneralWhat About.... Pin
ledtech35-May-14 8:08
ledtech35-May-14 8:08 
GeneralPer the tale of two developers... Pin
Duncan Edwards Jones5-May-14 7:10
professionalDuncan Edwards Jones5-May-14 7:10 
AnswerThe Ninja coder PinPopular
Ravi Bhavnani5-May-14 5:45
professionalRavi Bhavnani5-May-14 5:45 
GeneralRe: The Ninja coder Pin
thatraja5-May-14 6:00
professionalthatraja5-May-14 6:00 
Generaltry to code... Pin
Dennis E White5-May-14 4:23
professionalDennis E White5-May-14 4:23 
GeneralCaptain obvious comments Pin
ed welch4-May-14 23:54
ed welch4-May-14 23:54 
GeneralRe: Captain obvious comments Pin
ZurdoDev5-May-14 1:10
professionalZurdoDev5-May-14 1:10 
GeneralRe: Captain obvious comments Pin
Jahmal235-May-14 4:54
Jahmal235-May-14 4:54 
GeneralRe: Captain obvious comments Pin
DJ van Wyk5-May-14 19:39
professionalDJ van Wyk5-May-14 19:39 
GeneralRe: Captain obvious comments Pin
Pualee5-May-14 5:05
Pualee5-May-14 5:05 
GeneralRe: Captain obvious comments Pin
thatraja5-May-14 5:58
professionalthatraja5-May-14 5:58 
GeneralRe: Captain obvious comments Pin
Nemanja Trifunovic5-May-14 8:35
Nemanja Trifunovic5-May-14 8:35 
GeneralRe: Captain obvious comments Pin
Dennis_E6-May-14 21:58
professionalDennis_E6-May-14 21:58 
GeneralRe: Captain obvious comments Pin
aboubkr907-May-14 17:41
professionalaboubkr907-May-14 17:41 
GeneralGive credit where due Pin
Member 90635564-May-14 23:52
Member 90635564-May-14 23:52 
General"Sometimes".... Pin
imagiro4-May-14 22:29
imagiro4-May-14 22:29 
GeneralDepends on who will use my code Pin
zaxthealien4-May-14 21:02
zaxthealien4-May-14 21:02 

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.