Most teams are doing code reviews wrong. Here are 3 warning signs, and 3 fixes.

3 signs of a bad code review process

🚩 If code reviews make you, or other developers, anxious.

Likely, reviewers aren’t prioritizing kindness. Or they’re on a power trip, gatekeeping over minutiae.

🚩 If it’s common for one pull request to go through many review cycles — maybe even 7 or more.

Likely, reviewers are giving ambiguous feedback. Authors don’t have a clear path forward, and go down rabbit holes between reviews.

🚩 If there’s a lot of back and forth — if lengthy discussion threads are common.

Likely, the team isn’t equipped to resolve disagreements. Or the team isn’t aligned on nuanced readability principles.

Wrong way
Photo by NeONBRAND on Unsplash

3 keys to a good code review process

Here are our goals:

  • 1️⃣ Encourage healthy disagreements
  • 2️⃣ Proactively prevent disagreements
  • 3️⃣ Methodically resolve disagreements

1️⃣ Encourage healthy disagreements

Document code reviewer expectations on how to give feedback.

  • Be kind
  • Comment on the code, not the person
  • Prefix nitpicks with “nit”
  • Give a reason why, and a clear path forward

2️⃣ Proactively prevent disagreements

There are all kinds of readability principles out there. “Functions should be small” and “class names should be nouns.”

3️⃣ Methodically resolve disagreements

Document how the team should drive disagreements to a resolution.

  • Engineering discussion ➡️ Tech Lead
  • Product discussion ➡️ Product Manager
  • Design discussion ➡️ UX Designer

So, let’s recap!

3 signs of a bad code review process:

  • 🚩 Feeling anxious
  • 🚩 Many review cycles
  • 🚩 Back-and-forth
  • 1️⃣ Encourage healthy disagreements
  • 2️⃣ Proactively prevent disagreements
  • 3️⃣ Methodically resolve disagreements

Like this article? It’s an excerpt from my upcoming video course!

Master the Code Review

  • 1️⃣ Write better code
  • 2️⃣ Give better reviews
  • 3️⃣ Forge a better process
An inside look from my upcoming course, Master the Code Review

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Curtis Einsmann

Curtis Einsmann

Software engineer; solopreneur. Writing to help developers level up. All stories free. Follow me on Twitter for more: https://twitter.com/curtiseinsmann