2 ms·
The author has a point that comments may be superfluous when going through a code line by line. However, that's not the only sort of code-reading. Comments can
by zwaps 6y ago
The author has a point that comments may be superfluous when going through a code line by line.
However, that's not the only sort of code-reading. Comments can sometimes be better to get an overview of a complex program. Not if it is your own code, sure, or even in a code-base you work in. But faced with a huge amount of foreign code, over-commenting can be very useful (at least for me).
This should not be an excuse to write bad code - here I agree with the author. But given that, I see little downside in good comments.
It's an extremely challenging task to think about how others would perceive our coding. Perhaps the reader isn't familiar with a technique or function that seems obvious to you? It's the same as trying to give a lecture on a subject. Pedagogically, it's preferable to have more comments than less.