I’ve code reviewed over 750 pull requests at Amazon. Here’s my exact thought process.

I understand why code reviews matter.

Quality code strengthens readability and system understanding. This speeds up the team’s feature velocity. The time spent reviewing code for defects and quality pays dividends in the long term.

I’ve taken the time to learn programming principles.

I understand principles like SOLID, DRY and KISS. I’ve read the Clean Code book. I understand the importance of data structure selection, accurate abstraction, logical naming and control flow.

I review the PR slowly.

Insightful feedback requires a deep understanding of the change. I prevent my eyes from glazing over a line of code I don’t 100% understand.

I start with the crux.

I scan through the PR to find the critical piece of implementation. This could be the API entry point or the refactored data access layer.

I read randomly until I achieve deep understanding.

I follow function calls. I jump around. I read existing code to see how the change fits. I read the task for context on the problem.

I read class by class.

This comes only after I achieve deep understanding.

I comment with kindness.

I comment on the code, not the person. I avoid using “you” or “your.” I prefix nitpicks with “nit.” I phrase most comments as questions or suggestions.

I comment with accuracy.

I write comments while reading. But I rewrite most comments after deep understanding. The first iteration of reading doesn’t give me a clear enough puzzle picture for an accurate comment.

  1. The problem with the code.
  2. The reason why I perceive it to be a problem.
  3. My recommendation for how the author can resolve it.

I approve when the PR is good, not perfect.

I understand perfection is a pie in the sky. I approve if it works and it’s readable.

I seek feedback for whether I’m reviewing well.

It’s difficult to measure code quality. Possible metrics are minimal production defects, feature velocity and new-hire ramp up speed.

Like this article? It started on Twitter. Follow me for more! Here’s an example of what to expect:



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