July 9, 2024

Effective Code Reviews

Many companies use pull requests as a critical part of their software development process to achieve goals such as automated testing (via continuous integration services) and conducting code reviews.

In many cases, pull requests also serve as gatekeepers to production: someone from the organization (likely from the same team) needs to approve the changes for development to move forward. This process is often a source of frustration in software teams, where it is common to hear complaints about how long it takes for a pull request to be reviewed or the lack of constructive feedback received during code reviews.

On the other hand, reviewers often express frustration because pull requests are usually very large, making them difficult to review and thus more time-consuming. Still, many developers write code with a focus on their own productivity instead of optimizing for the later, required step of code reviewing.

In this series, I'd like to explore ways to make code reviews more productive for everyone: developers who want to receive constructive feedback while releasing software on time, and code reviewers who want to set a high-quality standard and use code reviews as a tool to leverage collective learning and knowledge sharing.

But first...

Pull requests, or pull request-based workflows, are just one option for collaborative work. I'm aware that other teams use more lightweight approaches, such as trunk-based development, where all commits are made directly to the main branch. This method relies on a highly sophisticated continuous integration infrastructure to validate each commit before it gets released.

There are also companies that focus heavily on pair or ensemble programming sessions, thereby reducing the need for asynchronous work. Still, highly distributed companies or teams that prefer a more asynchronous approach may choose pull requests to review code.

Ultimately, this series is not advocating for a pull request workflow but rather highlighting ways to make it more productive.

Read the full series

  1. ...more coming soon!