3 ms·
Sure but the only comments I really find like that are function-level comments where there's a rule that every function must have a comment, so people just dupl
by IshKebab 9y ago
Sure but the only comments I really find like that are function-level comments where there's a rule that every function must have a comment, so people just duplicate the function name as a comment.
Especially in Java code - look at Android for example. Loads of "setFoo() // sets foo" nonsense.
But in general I think people use the "code shouldn't need comments" thing mostly as an excuse to be lazy and not write comments.
- collyw 9y agoIn my previous job my team leader had commented the "open" file statement (pretty bloody obvious), but didn't bother to comment the seek(8) command after to explain what the hell was happening at byte 8. It was like an example of how not to comment code.