5 ms·
If you are writing comments that aren’t worth reading, what is the point at all? WHY not WHAT really helped me out. WHY is this thing here instead of WHAT it i
by SlowRobotAhead 7y ago
If you are writing comments that aren’t worth reading, what is the point at all?
WHY not WHAT really helped me out. WHY is this thing here instead of WHAT it is can give a line like i++; a vastly different comment and implication for the reader.
- xwdv 7y agoComments can go rapidly out of date and rarely get updated properly to reflect new changes in code. As a result, comments lie and can’t be trusted, and the only source of truth is actual code.
- nikisweeting 7y agoI've people on previous teams that thought this, and their comments were consistently the ones that were the most out-of-date because they never valued fixing them. If you value comment accuracy during PR reviews then you're less likely to end up in that situation in the first place.
- throwaway40324 7y agoThis. I totally agree. One fallacy I've seen is a reviewer only looking at the diff on Github, where a minor change in the middle of a function is made, and they don't expand the diff to notice that the new change completely invalidates a comment, params, call signature, return value..etc.