|
|
|
|
|
by _ZeD_
2413 days ago
|
|
(not OP, but here's my 2c) comments should explain why you choose to write the corresponding line of code.
It's a "meta-communication" between the original author (even a previous-month you) and the reader.
Code reading should be "boring". The code lines (and so the meaning) should be obvious. A good comment, IMHO, should convey the information "I'm sorry for this complexity here, but you need to take care of this edge case..." |
|
Literate programming comes to mind as an extreme counter example of not enough comments. https://en.wikipedia.org/wiki/Donald_Knuth#Literate_programm...