a blog about dev & hobbies

How I typically do code reviews

I don't know about you, but I enjoy code reviews. There's something about digging into a premise someone has worked up in their minds, agreeing or disagreeing with the premise, and then working myself down through the details, trying not to die on any of the pet-peeved hills I don't care too much for. I also like submitting code up for review, lately it's allowed me to see many different reviewing cultures from different developers around the world.

Here's a snapshot of the thought processes that I think about actively and try to apply during code reviews, both from the reviewer's point-of-view but also from the submitter's perspective.

As a reviewer

I will initiate a review in some of the following ways:

While I'm doing the review:

After I've finished the review:

As a submitter

Before I submit code up for review:

Asking for a review:

Addressing the review:

That's it! That's how I try to do my code reviews. It doesn't always go exactly according to what I described here. But if you stop looking at this as a strict playbook and more of as something that I think about a lot during code reviews, then maybe it doesn't feel so checklist-y and rigid.

Ultimately, the only thing that matters is that everyone involved understand what is going to be merged in and that you, as a reviewer, commit to see the review through together with the submitter.

* All of my advice in this blog post applies to an experienced team. Care should always be applied whenever the submitter is touching code parts that may have an irreversible effect on the production environment.

#programming