Code review is ostensibly a technical practice. We review code to catch bugs, ensure quality, share knowledge. But after years of reviewing (and being reviewed), I’ve come to believe something different:

Code review is primarily a psychological exercise.

The code is just the medium. The real work is navigating human emotions, social dynamics, and cognitive biases.

Why Criticism Hurts (Even When It Shouldn’t)

When someone critiques your code, your brain doesn’t distinguish it from personal criticism. Neurologically, social rejection activates the same brain regions as physical pain.

That PR comment saying “this could be simplified” isn’t just feedback on code. To your brain, it might register as: you are inadequate.

This isn’t weakness. It’s biology.

The Fundamental Attribution Error

When we see others write bad code, we attribute it to their character: “They don’t understand clean code.”

When we write bad code, we attribute it to circumstance: “I was under deadline pressure.”

This is the fundamental attribution error, and it poisons code review constantly.

1
2
3
4
5
Their bug:   They're careless.
Our bug:     It was a complex edge case.

Their hack:  They don't care about quality.
Our hack:    We had to ship by Friday.

The Social Dynamics

Code review happens within a social hierarchy, whether explicit or implicit:

  • Senior reviewing junior
  • Junior reviewing senior (awkward!)
  • Peers with different domains
  • That one person who blocks every PR

These dynamics shape what gets said and how it’s received.

A senior’s “just a suggestion” carries different weight than a junior’s. A “this is wrong” from someone you respect lands differently than from someone you don’t.

The Bikeshedding Trap

Parkinson’s Law of Triviality states that organizations give disproportionate attention to trivial issues.

In code review, this manifests as endless debates about:

  • Naming conventions
  • Bracket placement
  • Whether to use === or ==

Meanwhile, the architectural decision that will cause pain for years? “LGTM ๐Ÿ‘”

This happens because:

  1. Minor issues are easier to spot and critique
  2. Major issues require more effort to understand
  3. Bikeshedding feels productive while being safe

Defensive Behaviors

Humans under criticism develop defenses:

Preemptive apology: “I know this isn’t perfect, but…”

Explanation overload: Covering every decision with lengthy PR descriptions to preempt questions.

Strategic WIP: Marking things as work-in-progress to avoid the full weight of review.

The confidence shield: Never admitting uncertainty, even when uncertain.

These defenses are rational responses to an environment where criticism is common and praise is rare.

How to Review Better

For Reviewers

  1. Ask, don’t tell.
    “Why did you choose this approach?” > “This approach is wrong.”

  2. Praise the good.
    We’re trained to find problems. Actively look for what’s done well. Comment on it.

  3. Distinguish preference from problem.
    “Nit: I might name this differently” โ‰  “This is buggy”

  4. Assume positive intent.
    Before assuming carelessness, consider: What constraints were they under?

  5. Be specific and actionable.
    “This is confusing” < “This is confusing because X; consider Y”

For Authors

  1. Separate identity from code.
    Easier said than done, but practice helps. You are not your code.

  2. Seek understanding.
    “Can you help me understand this feedback?” opens dialogue.

  3. Appreciate the investment.
    Good review takes time. Someone spent their finite attention on your work.

  4. Don’t take silence as approval.
    LGTM with no comments might mean it’s great, or it might mean they didn’t have time.

The Meta-Move

The ultimate code review skill isn’t technical. It’s empathy.

The ability to imagine:

  • How will this comment land?
  • What was the author trying to accomplish?
  • What might they be going through right now?

Code review, at its best, is collaborative improvement. At its worst, it’s ego combat with commit hashes.

The code will compile either way. But the human dynamics will determine whether your team thrives.


Now go leave a kind comment on someone’s PR. Seriously. Do it now.


Further Reading