3 ms·
I agree with you, especially when you're writing low-level code which must interface with hardware or implement some protocol. However please allow me to play d
by benjamincburns 12y ago
I agree with you, especially when you're writing low-level code which must interface with hardware or implement some protocol. However please allow me to play devil's advocate for just a moment.
First, incorrect documentation is harmful. So much so that in many circumstances I'd rather have no documentation than incorrect documentation. If all of your code has such a high comment-to-logic ratio you're either writing some really subtle (perhaps math-heavy) stuff, or you're introducing a bunch of potential for documentation issues.
Second, readability counts. If you feel like your code isn't understandable without a large number of comments, you've probably not written it to be readable. Sometimes this is very difficult to do (yes, I'm looking at you hot-path C++ code!) but I think that past a certain point effort can be better spent making the code easier to understand than on verbose documentation.