login
Header Space

 
 

Re: OT: Does Linux have any "Perfect Code"

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Michael Gerdau <mgerdau@...>
Cc: Philippe Elie <phil.el@...>, Russell Leighton <russ@...>, LKML <linux-kernel@...>
Date: Thursday, November 15, 2007 - 1:05 pm

Michael Gerdau wrote:


Obvious comments explaining _what_ the code is doing are annoying. 
They're fluff.  You can see what the code is doing.

The critical comments are the ones that explain _why_ and _how_.  The 
comments should give the higher level view as to the rationale for that 
code.

Of course if you've got some highly-optimized bit of black magic there 
had better be some good comments explaining what's going on...but there 
should also be some comments explaining why we need the magic in the 
first place.

Chris
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
OT: Does Linux have any "Perfect Code", Russell Leighton, (Wed Nov 14, 9:21 pm)
Re: OT: Does Linux have any "Perfect Code", Philippe Elie, (Thu Nov 15, 4:27 am)
Re: OT: Does Linux have any "Perfect Code", Michael Gerdau, (Thu Nov 15, 9:16 am)
Re: OT: Does Linux have any "Perfect Code", Chris Friesen, (Thu Nov 15, 1:05 pm)
Re: OT: Does Linux have any "Perfect Code", Daniel Barkalow, (Thu Nov 15, 11:10 am)
Re: OT: Does Linux have any "Perfect Code", Geert Uytterhoeven, (Sat Nov 17, 4:44 am)
Re: OT: Does Linux have any "Perfect Code", Eric Dumazet, (Thu Nov 15, 2:29 am)
Re: OT: Does Linux have any "Perfect Code", Andi Kleen, (Thu Nov 15, 3:43 am)
Re: OT: Does Linux have any "Perfect Code", David Miller, (Thu Nov 15, 3:11 am)
Re: OT: Does Linux have any "Perfect Code", David Miller, (Wed Nov 14, 9:33 pm)
speck-geostationary