4 ms·
The people who argue against code comments seem to have a high chance of overlap with people who submit who huge refactoring patches that don’t do much but add
by dexwiz 5y ago
The people who argue against code comments seem to have a high chance of overlap with people who submit who huge refactoring patches that don’t do much but add bugs. They will also ask you to write a method for two lines of code that appear twice in a thousand lines. IE their opinion isn’t worth too much.
I like comments, javadoc style comments of public methods are really nice in the long run. However I find snarky or defeatist comments in unmanageable code to be a red flag. If you don’t know how something works adding a “Here Be Dragons” comment doesn’t help.
- _ea1k 5y agoI love comments that tell me about the history of code, along with access to the reasons things were done. I love comments that tell me the preconditions, postconditions, and exceptional conditions for a method or function. I hate comments that tell me what the code already does (int i = 5, // set i to 5). I hate them even more when the comment is a lie.
- kroltan 5y agoI find the snark is just fine, as long as it is accompanied of actual information. Like, no shit this is hairy code, but why is it hairy?