Code review comments that change code
·2 min read ·Leadership · Career · Architecture
I have written thousands of review comments. Most of them changed nothing. The code got merged, my comment got a thumbs-up, and the same pattern showed up in the next PR.
Eventually I noticed what separated the comments that actually changed code, and it wasn't about being right. It was about altitude.
Two kinds of comments
Comments that get argued with are almost always about the diff: naming, line length, whether a ternary would be tidier. They read as taste. The author has already made a hundred small decisions to get here, and your comment asks them to relitigate one of them for no visible gain. Of course they push back.
Comments that get addressed are about the design: this endpoint duplicates logic we already have in a service, this state will drift from the database, this migration can't be rolled back. They point at consequences, not preferences. Nobody argues with a consequence.
Review the design, not the diff
GitHub shows you a diff, so that's what people review. But the diff is the least interesting part of a PR. Before I read a single changed line, I ask three questions:
- Should this change exist at all?
- Is it in the right place?
- What happens in six months when someone touches it without context?
If the answer to the first question is no, every line-level comment is wasted effort. I've watched reviewers polish the naming on code that should have been an event listener instead of a controller method.
Writing comments that land
The rule I try to follow: state the consequence, then suggest the alternative.
Not: "I'd extract this." That's a preference.
Instead: "This validation is duplicated from the form request, so the two will drift apart. Can we keep it in one place?" That's a consequence with a path forward.
And when it really is just taste, say so explicitly and let it go—or better, encode it in the linter so no human ever has to comment on it again. Pint settles more arguments on my team than I do.
If a comment can't name what breaks, it's an opinion. Ship opinions sparingly.