Click here to Skip to main content
15,922,584 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: Comments, Margins, and Readability Pin
Marc Clifton4-Sep-03 8:24
mvaMarc Clifton4-Sep-03 8:24 
GeneralRe: Comments, Margins, and Readability Pin
Chris Maunder4-Sep-03 17:36
cofounderChris Maunder4-Sep-03 17:36 
GeneralRe: Comments, Margins, and Readability Pin
Jörgen Sigvardsson5-Sep-03 21:36
Jörgen Sigvardsson5-Sep-03 21:36 
GeneralDamn hard question. Pin
FruitBatInShades3-Sep-03 23:51
FruitBatInShades3-Sep-03 23:51 
GeneralComments assume... Pin
Marc Clifton3-Sep-03 10:10
mvaMarc Clifton3-Sep-03 10:10 
GeneralRe: Comments assume... Pin
Gary Wheeler3-Sep-03 10:46
Gary Wheeler3-Sep-03 10:46 
GeneralRe: Comments assume... Pin
Marc Clifton4-Sep-03 2:54
mvaMarc Clifton4-Sep-03 2:54 
GeneralRe: Comments assume... Pin
Gary Wheeler4-Sep-03 3:24
Gary Wheeler4-Sep-03 3:24 
In my case, the 'why' and 'how' are usually pretty easy. The software I work on does process control (we build high speed ink jet printers[^]), so the why's and how's are usually related to something the hardware is doing. A dilettante would say that, if you're having trouble stating 'why', maybe you need to think about the approach (the 'how') a little more. My how's usually are limited to difficult algorithms.

As an example, I needed a wildcard matching routine. I found one on the C/C++ User's Journal web site. Unfortunately, the routine wasn't usable in its original state. It wasn't well structured (multiple exits), didn't use our naming conventions, and didn't provide a couple of minor behaviors I wanted. I ended up rewriting the routine. For documentation of my version, however, I included the code for the original in a block comment, including the web address of the original article.


Software Zen: delete this;
GeneralRe: Comments assume... Pin
Marc Clifton4-Sep-03 3:35
mvaMarc Clifton4-Sep-03 3:35 
GeneralRe: Comments assume... Pin
Gary Wheeler4-Sep-03 4:09
Gary Wheeler4-Sep-03 4:09 
GeneralRe: Comments assume... Pin
ColinDavies4-Sep-03 0:55
ColinDavies4-Sep-03 0:55 
GeneralRe: Comments assume... Pin
Paul Oss4-Sep-03 11:56
Paul Oss4-Sep-03 11:56 
GeneralA comment is only... Pin
Steffen Büchner3-Sep-03 1:52
Steffen Büchner3-Sep-03 1:52 
GeneralRe: A comment is only... Pin
ColinDavies3-Sep-03 10:22
ColinDavies3-Sep-03 10:22 
GeneralRe: A comment is only... Pin
Steffen Büchner3-Sep-03 20:11
Steffen Büchner3-Sep-03 20:11 
GeneralNeither Pin
ColinDavies2-Sep-03 21:46
ColinDavies2-Sep-03 21:46 
GeneralRe: Neither Pin
Paul Watson2-Sep-03 22:12
sitebuilderPaul Watson2-Sep-03 22:12 
GeneralRe: Neither Pin
ColinDavies2-Sep-03 22:37
ColinDavies2-Sep-03 22:37 
GeneralRe: Neither Pin
Paul Watson2-Sep-03 23:31
sitebuilderPaul Watson2-Sep-03 23:31 
GeneralRe: Neither Pin
ColinDavies3-Sep-03 10:32
ColinDavies3-Sep-03 10:32 
GeneralRe: Neither Pin
Paul Watson3-Sep-03 20:35
sitebuilderPaul Watson3-Sep-03 20:35 
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 

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.