We need to rethink how code reviews work
Mar 11, 2024
Code reviews have their value, but I'm increasingly convinced their current iteration is a net negative for developer productivity.
It started with my own frustrations at our own review processes at Sourcery.
We’ve got pretty great engineering practices, but I still found myself waiting hours to get a review on a PR that was ready to go out into the world.
On its own a single review taking a few hours might not be a huge deal. But when your team is trying to move as fast as possible it adds up quickly.
It finally hit a point where I started thinking that reviews in their current form just aren’t worth it.
And I’m certainly not alone in thinking this.
Now, my takeaways are probably a little different than Erik’s and Bob’s in that post.
Reviews have more value than either of them ascribe to them, but the value doesn’t outweigh the time cost reviews have today. In order for teams to move as fast as possible you need a review process to give feedback so you’re not building up tech debt or letting bad things slip into production. But that feedback needs to happen while a developer is still in flow.
In other words we need to start shifting code reviews further left.
One way to do that is through pair or mob programming, but that’s taking up more developer time in a different way.
I envision a workflow for feature development where:
In order for this to happen a couple of things need to be true.
I need to be working with smaller PRs at all times. There are lots of reasons this is a good practice to begin with. But, it’s even more important if we’re trying to get quick decisions about whether or not a PR should be merged.
I need a way to get my PR reviewed and approved immediately. In other words - I need a fully automated code reviewer.
This is why we’ve started building the new version of Sourcery Code Reviews. We want to make it so any engineering team can:
We’re still in the early days here, but you can try out the first version of our code reviewer for GitHub. We’re not making approval or rejection decisions yet (that’s coming in a few weeks), but we are able to give you immediate feedback on every PR.
I love thinking about how code reviews should work, so if you’ve got thoughts on this let me know.