4 ms·
If your comments just say what the code does, they're redundant and unnecessary. Good comments explain things the code can't, like why you chose a particular a
by gnaritas 10y ago
If your comments just say what the code does, they're redundant and unnecessary. Good comments explain things the code can't, like why you chose a particular algo, or why some piece of code needs to exist. Most code when written well requires no comments. Comments like yours, that repeat what the code does, I simply delete.
- codr4life 10y agoLike I said, I don't agree with that particular broken record; there is value in stating the intent of code in normal prose as documentation.
- gnaritas 10y agoYes there is value, comments like those let me know which developers need more training to learn how to code cleaner. I know what you said, and I disagreed; responding back by repeating your disagreement doesn't add any value to the conversation.