Click here to Skip to main content
15,920,438 members

Survey Results

What's more important - easily understandable code or good comments?   [Edit]

Survey period: 1 Sep 2003 to 7 Sep 2003

You would hope to get both, but given a choice, which would you take?

OptionVotes% 
Easily understandable code69066.60
Good comments34633.40



 
GeneralRe: Neither Pin
ColinDavies3-Sep-03 21:17
ColinDavies3-Sep-03 21:17 
GeneralRe: Neither Pin
FruitBatInShades3-Sep-03 23:56
FruitBatInShades3-Sep-03 23:56 
GeneralRe: Neither Pin
ColinDavies4-Sep-03 0:50
ColinDavies4-Sep-03 0:50 
GeneralRe: Neither Pin
FruitBatInShades4-Sep-03 1:06
FruitBatInShades4-Sep-03 1:06 
GeneralRe: Neither Pin
ColinDavies4-Sep-03 1:33
ColinDavies4-Sep-03 1:33 
GeneralRe: Neither Pin
Paul Oss4-Sep-03 12:22
Paul Oss4-Sep-03 12:22 
GeneralRe: Neither Pin
ColinDavies4-Sep-03 17:26
ColinDavies4-Sep-03 17:26 
GeneralRe: Neither Pin
Paul Oss4-Sep-03 20:43
Paul Oss4-Sep-03 20:43 
Colin Davies wrote:
To be honest I often find comments harder to understand then the actual code, and this includes my own comments.
Seriously I think when you are actually coding the perspsctive of what a later reviewer will understnd of the comments is influenced by your own mind state at the time.


No doubt that this can be the case. But that still goes back to the perfect world scenario. If you can't understand the comments, then you're back to square one and having to interpret the code- nothing lost. I don't think that I've ever lost anything significant by difficult to read comments, other than the fact that I will admit that the annoyance factor is high. I may not be losing time, but it makes my blood boil when I spend 4 hours going through nearly unreadable code only to find the comments annoyingly vague. I remember one of my favorite comments that was often made by a particular programmer... a comment I never really deciphered was (in an old version of a business basic (mainframe stuff)):

REM DO VAL SH*T

To this day, I never figured it out.

The only place where time can be lost by comments is when they're logically wrong. But in my experience this has been relatively rare.

Some of you may disagree with the technique, but when I suspected that a one line comment would leave more questions unanswered than answered, I would simply write a whole paragraph describing my reason for doing what I did, what the weaknesses were, where future problems could arise, and how future programmers might deal with changes-- and sometimes my thoughts and feelings on the subject at large. And honestly, they were the most useful later on. Because yes, Colin, I do have to admit, there have been times-- albeit rare-- that I didn't know what my own comments meant.

Paul
GeneralRe: Neither Pin
Renault the Duck5-Sep-03 17:30
Renault the Duck5-Sep-03 17:30 
GeneralRe: Neither Pin
Paul Oss5-Sep-03 20:19
Paul Oss5-Sep-03 20:19 
GeneralRe: Neither Pin
Jim A. Johnson3-Sep-03 8:18
Jim A. Johnson3-Sep-03 8:18 
GeneralRe: Neither Pin
ColinDavies3-Sep-03 10:13
ColinDavies3-Sep-03 10:13 
GeneralRe: Neither Pin
Paul Oss4-Sep-03 12:28
Paul Oss4-Sep-03 12:28 
GeneralRe: Neither Pin
Steffen Büchner3-Sep-03 20:24
Steffen Büchner3-Sep-03 20:24 
GeneralRe: Neither Pin
brianwelsch3-Sep-03 9:59
brianwelsch3-Sep-03 9:59 
GeneralRe: Neither Pin
ColinDavies3-Sep-03 10:18
ColinDavies3-Sep-03 10:18 
GeneralRe: Neither Pin
brianwelsch3-Sep-03 10:26
brianwelsch3-Sep-03 10:26 
GeneralRe: Neither Pin
Gary Wheeler3-Sep-03 10:04
Gary Wheeler3-Sep-03 10:04 
GeneralRe: Neither Pin
ColinDavies3-Sep-03 10:19
ColinDavies3-Sep-03 10:19 
GeneralRe: Neither Pin
Gary Wheeler3-Sep-03 10:40
Gary Wheeler3-Sep-03 10:40 
GeneralRe: Neither Pin
ColinDavies3-Sep-03 11:18
ColinDavies3-Sep-03 11:18 
GeneralRe: Neither Pin
Gary R. Wheeler3-Sep-03 12:32
Gary R. Wheeler3-Sep-03 12:32 
GeneralRe: Neither Pin
brianwelsch3-Sep-03 15:21
brianwelsch3-Sep-03 15:21 
GeneralRe: Neither Pin
ColinDavies4-Sep-03 0:53
ColinDavies4-Sep-03 0:53 
GeneralRe: Neither Pin
Chris Maunder4-Sep-03 8:22
cofounderChris Maunder4-Sep-03 8:22 

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.