Pair Code Reviews
Published ....
Last modified ....
Share this post on BlueskySee discussion on Bluesky
Code Review is a vital part of every development team's workflow, not only is it valuable to ensure the code is validated, both for syntax and business logic errors but also for enforcing consistent maintainable patterns. Another often under-discussed value proposition of a well implemented code review process is the teaching and learning opportunities present for both the author of the code and for the reviewer.
Historically at Wayfair, most code reviews have been asynchronous, semi-secretive, and usually seen as a slowdown to the code author. Many developers look at code review as something that they throw into a queue on slack, sort of like throwing the PR over a wall and waiting for someone on the other side to review it and throw it back to them.
When code reviews work like this, it's easy to see why developers see the process as a development slowdown and an arbitrary process.
To help shorten the feedback cycle of code reviews on our team, something we've added to our collective code review workflow toolbelt recently has been to do something we call "Pair Code Reviews". This might not be all that new of a concept for many teams, but it's relatively new to ours.
We've seen several key benefits of this strategy, but there are some trade-offs as well, as with any piece of advice your mileage may vary! Before diving into the benefits and trade-offs let me back up a bit and explain what this workflow looks like.
It's worth noting, rarely do we follow the exact same process when doing pair code reviews, but usually they look like the following:
When an engineer has a pull request ready for review, they may reach out to another engineer that they had collaborated with (either through Pair Programming or some shared debugging) or had also been knowledgeable of the ticket they were working on to schedule a pair review.
During the call, usually the author will be running the code locally so they can screen share the visual changes to the reviewer, and then the reviewer will screen share as they walk through the changes within the pull request. Often times, we will swap back and forth between walking through the visual changes and the diff for the pull request to collect more context on the changes.