F
FredK
jacob navia said:Nick Keighley a écrit :
Instead of talking like this have you EVER reflected on
why comments are absent from throw-away software?
Have you ever reflected on why comments are absent from a lot of C
*production* code? Ever read the Linux source? "We don't need no stinkin'
comments, the code is self documenting." is all I can figure. "Real men"
don't need comments.
After 30+ years of programming for a living, I long ago discovered that you
often can't predict the lifetime of code - even what at the time you thought
was "throw away" code. So I comment pretty much every piece of code I
write, since I expect at some random time down the road I'll need to re-use
it or will need to fix it.
Of course, there are good comments and bad comments. Good comments describe
why something is being done /* this loop derives the ... */ as opposed to
describing the obvious /* is j null? */