Click here to Skip to main content
15,867,330 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%



 
GeneralHow much commenting is actually relevant? Pin
dan!sh 8-May-14 16:46
professional dan!sh 8-May-14 16:46 
GeneralRe: How much commenting is actually relevant? Pin
Nagy Vilmos9-May-14 0:01
professionalNagy Vilmos9-May-14 0:01 
GeneralRe: How much commenting is actually relevant? Pin
freedeveloper11-May-14 9:07
professionalfreedeveloper11-May-14 9:07 
Generalmissing option Pin
thrakazog8-May-14 11:55
thrakazog8-May-14 11:55 
GeneralRe: missing option Pin
Nelek10-May-14 12:09
protectorNelek10-May-14 12:09 
GeneralRe: missing option Pin
thrakazog14-May-14 6:38
thrakazog14-May-14 6:38 
GeneralAnd what's so sad is Pin
W Balboos, GHB8-May-14 8:02
W Balboos, GHB8-May-14 8:02 
GeneralWhy vs. What Pin
Marc Clifton8-May-14 5:16
mvaMarc Clifton8-May-14 5:16 
GeneralOne more option : I Use Regions in my code Pin
Rahul VB7-May-14 23:04
professionalRahul VB7-May-14 23:04 
GeneralRe: One more option : I Use Regions in my code Pin
Marc Clifton8-May-14 5:26
mvaMarc Clifton8-May-14 5:26 
GeneralA missing choice Pin
aboubkr907-May-14 17:20
professionalaboubkr907-May-14 17:20 
GeneralRe: A missing choice Pin
Vedat Ozan Oner8-May-14 2:27
professionalVedat Ozan Oner8-May-14 2:27 
GeneralRe: A missing choice Pin
_Maxxx_11-May-14 1:00
professional_Maxxx_11-May-14 1:00 
GeneralDan Saks, one-time secretary of the ANSI C and C++ committees, said it best Pin
Gary R. Wheeler6-May-14 13:36
Gary R. Wheeler6-May-14 13:36 
GeneralMy Philosophy Pin
Pualee6-May-14 4:39
Pualee6-May-14 4:39 
GeneralRe: My Philosophy Pin
Gary R. Wheeler6-May-14 13:37
Gary R. Wheeler6-May-14 13:37 
GeneralComment for Understanding Pin
shub.goel6-May-14 1:47
shub.goel6-May-14 1:47 
GeneralDifficult to find a fit on the options. Pin
DaveAuld5-May-14 21:01
professionalDaveAuld5-May-14 21:01 
GeneralI comment code when i don't need it any more Pin
Anurag Gandhi5-May-14 18:42
professionalAnurag Gandhi5-May-14 18:42 
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 

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.