Click here to Skip to main content
15,887,676 members

Survey Results

To whom do you direct comments in your code?

Survey period: 31 Jul 2016 to 7 Aug 2016

Do you write comments to those you work with? To yourself? To a different version of yourself (mandatory XKCD)

OptionVotes% 
To those who would need to maintain the code86965.04
To those looking to use my code49837.28
To those working on the code with me44633.38
To my managers / team lead745.54
To the poor souls who have to review my code27920.88
To my future self1,02076.35
To my future robot overloads977.26
To future palaeontologists987.34
Other312.32
I don't write comments in code896.66
Respondents were allowed to choose more than one answer; totals may not add up to 100%



 
GeneralMostly to my future self... Pin
Brisingr Aerowing6-Aug-16 13:53
professionalBrisingr Aerowing6-Aug-16 13:53 
GeneralGood use of names Pin
Clifford Nelson6-Aug-16 6:51
Clifford Nelson6-Aug-16 6:51 
GeneralI don't write comments in code Pin
Krunal Rohit6-Aug-16 1:53
professionalKrunal Rohit6-Aug-16 1:53 
GeneralOne missing option... Pin
Peter Leow4-Aug-16 23:50
professionalPeter Leow4-Aug-16 23:50 
GeneralTo me and engineers who maintain my code Pin
Momoko Asahina 708H4-Aug-16 23:36
Momoko Asahina 708H4-Aug-16 23:36 
GeneralTo my Future Self Pin
Mycroft Holmes3-Aug-16 17:37
professionalMycroft Holmes3-Aug-16 17:37 
GeneralRe: To my Future Self Pin
Member 123456784-Aug-16 3:26
Member 123456784-Aug-16 3:26 
GeneralInteresting comments... Pin
1.21 Gigawatts2-Aug-16 5:26
1.21 Gigawatts2-Aug-16 5:26 
When I was at college I was told that every line of code MUST be commented, however they did stress that the comment should state why you are doing something not what you are doing (after all, you can figure out what the code is doing just by reading it, and if you can't understand the code then it needs to be refactored), sticking to standard patterns also helps with ease of understanding.

Despite what they impressed on me at college, I'm not in favour of commenting every single line of code as it's unnecessary, but I (mostly) always write headline comments on Methods/Properties/Classes/whatever as an overview of functionality; and I also (mostly) write comments for a group of statements in methods more or less like a overview/guide, without commenting every line.

But, most importantly, I comment for the future me, who in 2 weeks time will be looking at a section of code I wrote at 11:30pm one evening thinking - why did I do it like that again?!

Wink | ;)

"Benjamin is nobody's friend. If Benjamin were an ice cream flavor, he'd be pralines and dick." ~ Garth Algar

"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." ~ Paul Neal "Red" Adair

GeneralRe: Interesting comments... Pin
TheGreatAndPowerfulOz2-Aug-16 6:20
TheGreatAndPowerfulOz2-Aug-16 6:20 
GeneralRe: Interesting comments... Pin
Uwe Keim2-Aug-16 19:57
sitebuilderUwe Keim2-Aug-16 19:57 
GeneralRe: Interesting comments... Pin
1.21 Gigawatts2-Aug-16 21:42
1.21 Gigawatts2-Aug-16 21:42 
GeneralMy future self Pin
kmoorevs2-Aug-16 4:20
kmoorevs2-Aug-16 4:20 
GeneralRe: My future self Pin
TheGreatAndPowerfulOz2-Aug-16 6:20
TheGreatAndPowerfulOz2-Aug-16 6:20 
GeneralRe: My future self Pin
kmoorevs2-Aug-16 7:00
kmoorevs2-Aug-16 7:00 
GeneralDan Saks quote Pin
Gary Wheeler2-Aug-16 4:17
Gary Wheeler2-Aug-16 4:17 
PraiseRe: Dan Saks quote Pin
TheGreatAndPowerfulOz2-Aug-16 6:21
TheGreatAndPowerfulOz2-Aug-16 6:21 
GeneralRe: Dan Saks quote Pin
Brisingr Aerowing6-Aug-16 13:51
professionalBrisingr Aerowing6-Aug-16 13:51 
GeneralThe code is the comment Pin
Shameel2-Aug-16 3:49
professionalShameel2-Aug-16 3:49 
GeneralRe: The code is the comment Pin
Mycroft Holmes3-Aug-16 17:34
professionalMycroft Holmes3-Aug-16 17:34 
GeneralRe: The code is the comment Pin
Shameel3-Aug-16 20:52
professionalShameel3-Aug-16 20:52 
GeneralRe: The code is the comment Pin
snorkie4-Aug-16 7:39
professionalsnorkie4-Aug-16 7:39 
GeneralI'm sorry Pin
PSK_2-Aug-16 2:00
PSK_2-Aug-16 2:00 
GeneralGood naming is great part of commenting Pin
KarstenK1-Aug-16 20:43
mveKarstenK1-Aug-16 20:43 
GeneralTo the Poor Souls Pin
Surya_Narayan1-Aug-16 20:23
professionalSurya_Narayan1-Aug-16 20:23 
GeneralMy favorite comment Pin
Mohibur Rashid1-Aug-16 18:19
professionalMohibur Rashid1-Aug-16 18:19 

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.