←back to thread

873 points belter | 1 comments | | HN request time: 0s | source
Show context
asalahli ◴[] No.42955399[source]
> You literally cannot add too many comments to test code

In my opinion, almost every developer I've worked with who advocated for generous amounts of comments has overestimated their (and or others') ability to write good quality comments.

Obvious ones like `a = b; // set a to b` while useless are also mostly harmless, but I've been lead astray by outright factually wrong comments, many more times than I can count. I certainly don't feel confident in my own ability to not write factually incorrect comments. So yeah, I'd rather the code do the talking.

replies(2): >>42955857 #>>42956593 #
1. adamtaylor_13 ◴[] No.42955857[source]
That’s why your comments should be on things you know to be factual like WHY you made a certain decision. Things like that cannot always be communicated by good variables and functions.