Click here to Skip to main content
15,921,467 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



 
GeneralEasy understandable code really exists? Pin
Masaaki Onishi6-Sep-03 17:34
Masaaki Onishi6-Sep-03 17:34 
GeneralComments? Pin
Tim Smith6-Sep-03 7:14
Tim Smith6-Sep-03 7:14 
The problem with the "if code is readable, then no comments are needed" argument is that it ignores the complexities of large projects. As another person said, just because you know what is happening doesn't mean you understand why it is happening.

Recently I fixed a bug in our internal tools here at BioWare. The problem was that our model viewer program wasn't working with the lighting system for the advanced model rendering paths. Only one line of code was required to fix the problem.

roomlights = renderlights;

Looking at the code, we know what the code is doing. The code is making a copy of all the rendering lights and placing them in the room lights list. But the question is why are we doing this and why is it so important that it happens? If someone needed to modify this routine, what dependency must he be aware of in order not to break functionality?

Tim Smith

I'm going to patent thought. I have yet to see any prior art.
GeneralRe: Comments? Pin
Bugs Bunny6-Sep-03 10:20
Bugs Bunny6-Sep-03 10:20 
GeneralComment should be useful Pin
Anonymous5-Sep-03 20:53
Anonymous5-Sep-03 20:53 
GeneralRe: Comment should be useful Pin
Jörgen Sigvardsson5-Sep-03 21:30
Jörgen Sigvardsson5-Sep-03 21:30 
GeneralFunction headers Pin
praiseGod7775-Sep-03 7:14
praiseGod7775-Sep-03 7:14 
GeneralEasy code for the compiler Pin
Dirk Vandenheuvel5-Sep-03 2:23
Dirk Vandenheuvel5-Sep-03 2:23 
GeneralRe: Easy code for the compiler Pin
Anonymous5-Sep-03 8:26
Anonymous5-Sep-03 8:26 
GeneralRe: Easy code for the compiler Pin
Renault the Duck5-Sep-03 17:20
Renault the Duck5-Sep-03 17:20 
GeneralRe: Easy code for the compiler Pin
Anonymous8-Sep-03 7:53
Anonymous8-Sep-03 7:53 
GeneralRe: Easy code for the compiler Pin
Oleksandr Kucherenko5-Sep-03 22:04
Oleksandr Kucherenko5-Sep-03 22:04 
GeneralWhat would you prefer? A straight road or a maze and a map? Pin
G. Raven4-Sep-03 5:49
G. Raven4-Sep-03 5:49 
GeneralRe: What would you prefer? A straight road or a maze and a map? Pin
Paul Oss4-Sep-03 11:54
Paul Oss4-Sep-03 11:54 
GeneralComments, Margins, and Readability Pin
Marc Clifton4-Sep-03 3:08
mvaMarc Clifton4-Sep-03 3:08 
GeneralRe: Comments, Margins, and Readability Pin
Michael P Butler4-Sep-03 5:23
Michael P Butler4-Sep-03 5:23 
GeneralRe: Comments, Margins, and Readability Pin
Marc Clifton4-Sep-03 5:27
mvaMarc Clifton4-Sep-03 5:27 
GeneralRe: Comments, Margins, and Readability Pin
Michael P Butler4-Sep-03 5:49
Michael P Butler4-Sep-03 5:49 
GeneralRe: Comments, Margins, and Readability Pin
Gary R. Wheeler4-Sep-03 7:01
Gary R. Wheeler4-Sep-03 7:01 
GeneralRe: Comments, Margins, and Readability Pin
Anonymous4-Sep-03 10:57
Anonymous4-Sep-03 10:57 
GeneralRe: Comments, Margins, and Readability Pin
cK14-Sep-03 19:00
cK14-Sep-03 19:00 
GeneralRe: Comments, Margins, and Readability Pin
Stephen Quattlebaum5-Sep-03 7:20
Stephen Quattlebaum5-Sep-03 7:20 
GeneralRe: Comments, Margins, and Readability Pin
Jörgen Sigvardsson5-Sep-03 21:30
Jörgen Sigvardsson5-Sep-03 21:30 
GeneralRe: Comments, Margins, and Readability Pin
Festus Redelinghuys7-Sep-03 13:47
Festus Redelinghuys7-Sep-03 13:47 
GeneralRe: Comments, Margins, and Readability Pin
Chris Maunder4-Sep-03 8:19
cofounderChris Maunder4-Sep-03 8:19 
GeneralRe: Comments, Margins, and Readability Pin
Marc Clifton4-Sep-03 8:24
mvaMarc Clifton4-Sep-03 8:24 

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.