Discover more from Dev Interrupted
Analysis: The Quickest Path To Halving Software Delivery Time
Research from Google and others sheds light on the easiest path to cutting cycle time.
In the last 12 months, the engineering landscape has been consumed with efficiency. The rise of AI and the end of zero interest rates has shifted tech’s growth-at-all-costs mindset to doing more with what you have.
Subsequently, productivity has come to the forefront of software engineering discussions thanks to McKinsey’s article on measuring developer productivity, Gergely Orosz & Kent Beck’s rebuttal, and our own efficiency-focused take on the debate. We’ve seen a lot of opinions. However, we’ve been sorely missing hard data on what works in improving efficiency, productivity, or any other word you want to use to describe improving the software delivery process.
Google: Faster code reviews = 50% higher software delivery performance
The 2023 Accelerate State of DevOps Report provides a key insight for teams looking to boost their software engineering efficiency.
With over 33,000 survey respondents, Google’s DORA research is the most comprehensive qualitative look at how engineering teams are performing, and they found that teams with faster code reviews have seen their overall software delivery performance improve by 50%.
The head of Google Cloud’s DORA team, Nathen Harvey, recently spoke to Dev Interrupted about this critical connection between code reviews and software delivery.
“One of the things that we saw that was fascinating was that the teams with faster code review times had 50 percent better software delivery performance. 50% better!”
- Nathen Harvey, Head of Google Cloud’s DORA team
Quantitative data confirms: Improve code reviews to increase delivery
To complement the results of Google’s research, software delivery management platform LinearB analyzed quantitative data from 2,000+ dev teams and 3.6 million code branches in its 2023 Software Engineering Benchmarks Report.
Just as in Google’s qualitative data set, LinearB’s data scientists identified the same performance gains in their empirical data: teams who introduced workflow automations to their code review workflows saw significant improvements across their performance, most importantly cycle time 👇
Additional benefits of faster code reviews
While the primary goal of engineering orgs is to improve the efficiency of software delivery, a host of other compounding benefits come from updating how teams handle pull requests and code reviews.
Improved code quality
In research, qualitative and quantitative data both show that code quality improves when pull requests are smaller and picked up quickly. We’ve identified several reasons behind this positive correlation:
Limited Cognitive Load: Smaller pull requests are easier to dedicate full, critical attention to, increasing review quality.
Minimized Time Fragmentation: Smaller pull requests are more likely to be picked up quicker because reviewers don’t need to set aside as much time and can fit it into their day more easily. They’re also less likely to get started and then put aside the review for other priorities like meetings, which fragments time spent on the PR.
Reduced Context Switching: A smaller pull request will be sent back to the original engineer more quickly, allowing them to tackle any required changes before their mental context changes to a new task.
Improved developer experience
The No. 1 causes of stress and burnout in engineering are things that make merging code difficult. Things like toil, rework, and never seeing projects to completion are routinely listed as our industry's primary causes of burnout.
Conversely, high developer satisfaction comes with a frictionless workflow through the development cycle - from initial idea to writing code, pull request, review, and merge.
4 methods to speed up code reviews
There are multiple ways that teams have approached improving their code review quality and speed.
1. Pair programming
This approach involves two developers collaborating on a piece of code. One takes the lead as the "driver," while the other acts as the "navigator" or observer, offering real-time feedback. They can swap roles as required. Though pair programming can demand more person-hours, it often results in reduced software defects. However, it's worth noting that introducing pair programming, especially in remote settings, can pose challenges for some teams.
2. Goal setting & benchmarks
Establishing benchmarks for pull requests and code reviews – like PR size and pickup time – is a game-changer for the speed and efficiency of code reviews. These benchmarks provide a clear and consistent standard, ensuring that every developer on the team understands the expectations and criteria for code reviews.
As a result, many common ambiguities or uncertainties surrounding code quality are eliminated upfront, making the review process smoother and faster. When developers are aware of these benchmarks during the coding phase, they are more likely to produce code that aligns with the team's standards from the outset—in essence. Having team goals around code reviews acts as a guide and a filter, streamlining the review process and fostering a culture of clear, high-quality coding practices.
The key goal to set? Smaller PRs.
Smaller PRs have been shown in research to correlate to increased throughput for engineering teams.
Small PRs take less time to review, increasing quality of review (less skimming) and reducing PR idle time.
Leveraging benchmarked goal-setting to drive smaller PRs will speed up your code review process, subsequently increasing your team’s deployment frequency.
3. Continuous merge
For teams eager to expedite their code-review processes, embracing continuous merge techniques is a must. At its core, continuous merge ensures that once code clears automated testing and undergoes workflow scrutiny, it's promptly integrated into the main branch through predefined rules.
We studied the impact on code reviews of the no-cost continuous-merge tool gitStream, which streamlines the journey from code creation to deployment. The results were compelling:
Software delivery cycle durations plummeted by 61.07%
Time spent on PR reviews was significantly reduced by 38.14%.
These enhancements align to adaptive, configurable workflows that:
Auto-assign the best reviewer to pull requests.
Add essential context, like estimated time to review and modified resources.
Automatically merge low-risk pull requests if they pass testing.
Instantly flag issues with code before assigning a human to review it.
4. Use AI for code review
Using generative AI to automate code reviews has proven to be a significant advancement. Recently, Uber revealed its AI project has streamlined their code reviews by harnessing generative AI. According to a recent talk at DPE Summit, Uber estimates they’re on track to save $10 million per year and 2,000+ dev hours per week by automatically fixing code review feedback with AI.
Areas where AI excels in code reviews include:
Speed & scalability
AI tools rapidly analyze code, reducing review times and accelerating the software development lifecycle.
AI ensures unwavering attention to detail, avoiding human lapses due to fatigue or distractions, which is especially beneficial for round-the-clock global teams.
AI's ability to detect intricate patterns uncovers anomalies and vulnerabilities that might escape human reviewers, refining its detection with every iteration.
Finding this article valuable? Make sure you’re subscribed to get weekly deep dives + our podcast 👇
AI tools monitor code metrics, offering insights into code quality and trends while suggesting improvements based on historical data and best practices.
An AI-driven review ensures objective, unbiased assessments, promoting fair evaluations and team harmony.
AI's versatility allows it to review code across multiple programming languages, making it adaptable for varied development environments.
Better code reviews lift all boats
Software engineering leaders are mandated to improve efficiency and consistently deliver business results. When proven improvements come to light, like the power of better code reviews on overall software delivery, the question isn’t if you should implement them, but which methodology is right for your team—and how soon can you start?
Use free automations to speed up your team's code reviews
We recognize the importance of workflow automations for the code review process. That’s why we built gitStream, a free tool that allows you to customize your code review workflow for each pull request based on the content of the code. Your team can:
Add essential context to PRs.
Automatically find code experts for reviews.
Automate the merge process to maximize developer productivity.
Create custom rules of your own with YAML configurations.