4 ms·
You can say how you wish comments were done, but in practice a section of code with a lot of comments tends to indicate unresolved complexity. The worst is whe
by civility 7y ago
You can say how you wish comments were done, but in practice a section of code with a lot of comments tends to indicate unresolved complexity. The worst is when you can tell the original author used comments to indicate how they wished the code worked, but it doesn't. Sometimes the comments are from the next maintainer trying to figure out what the hell is going on because there is a bug in there somewhere.
The other problem with comments is multiple maintenance. It's very common for a change to be made to the code but not the comment. Now you've got lies misleading the next poor developer who dives in there.
Documentation comments can be useful, but I cringe when I see lots of comments per block or statement.
> Humans aren't good at reading code.
That's something you can get better at, but it requires discipline and effort. Programmers who have no intention of getting better at it think the comments will save them.
- sgift 7y ago> That's something you can get better at, but it requires discipline and effort. Programmers who have no intention of getting better at it think the comments will save them. Yeah. And people who make memory errors in C are just bad programmers. At some point people will have to accept that their preconceived notions are just that and not some mythical rule that others have to discover to find enlightenment.
- civility 7y agoI guess something requiring discipline and effort makes you defensive. You can't really think all programmers are equal. How do you think the good ones got better?
- DarkWiiPlayer 7y ago> That's something you can get better at, but it requires discipline and effort. Find me one programmer who's as fluent in C as in any natural language.
- civility 7y agoIf you think I said anything like that, then you're not as good at natural language as you think. Why would I defend an argument I didn't make?