Flippant code comments
Posted Nov 4, 2011 17:23 UTC (Fri) by
giraffedata (subscriber, #1954)
In reply to:
Quote of the week by nix
Parent article:
Quote of the week
rather than assuming that 'if they can't reverse-engineer all my thought processes they're not good enough to maintain the code'.
Some time after getting involved with Linux C coders (I had a lot of experience before that in other software development), I had to admit that those people just don't think the way I do, and can actually communicate better in C than in natural language. I don't think they're reverse engineering the C (which is what I have to do).
It's more than just the absence of comments in the code. They talk to each other on the mailing lists in C as well. "I have an idea for an improved memory allocator:" and then C follows. Or one person describes some function in English and another says, "I'm not sure what you're describing. Can you show me the code?"
One accomplished programmer criticized my code for having too many comments, pontificating: comments are good when they describe something outside the program, like the device you're talking to, but if they describe the program itself, they're useless at best because the reader can just read the C. And at worst, they mislead when they don't say the same thing as the C.
(
Log in to post comments)