Build Times and Developer Productivity
This is the latest issue of my newsletter. Each week I cover the latest research and perspectives on developer productivity.
This week I read Build Latency, Predictability, and Developer Productivity, a paper by Google researchers Ciera Jaspan and Collin Green. This paper is part of their ongoing series, Developer Productivity for Humans, which has previously covered topics such as the challenges of measuring productivity, productivity in remote teams, and managing tech debt.?
This paper specifically shares findings from a Google-based study on the benefits of improving build times. For leaders deciding whether to invest in improving their organization’s build processes, this study provides evidence that even moderate improvements to build latency lead to productivity improvements. It also demonstrates the importance of nudging developers’ behavior when making changes to development tools, in order to achieve the expected productivity improvements.
My summary of the paper
One of the goals of the Developer Productivity for Humans series is to emphasize the human aspects of software engineering and encourage leaders to consider these aspects when attempting to improve productivity. In line with this goal, the study discussed in this paper explores the issue of improving build times with a focus on understanding the human elements that influence the relationship between build time improvements and productivity.?
“On the surface, build latency is a purely technical problem. But humans experience and respond to it in interesting ways: forming expectations, making choices, and organizing work around build latency and similar factors.”
The researchers focused on three questions for this study:
Here’s what they found:?
There’s no magic number for how fast builds need to be
While waiting for builds to complete, developers will often work on another project, check email, get a coffee, or go get lunch. The researchers wanted to understand whether there is a specific threshold for build times where developers are more likely to stay on task.
To investigate this, the researchers tracked developer actions within their tools to understand how long it takes for developers to go off task during a build, and how long it takes for them to return to their task once the build completes.?
The authors initially thought that they would find a “magic number,” such as “if the build takes less than ?? seconds, developers are more likely to stay on task.” However, they did not discover a specific magic number. Instead, they found that every improvement to build latency contributes to developers staying on task and returning to tasks more quickly.
“While it’s disappointing to not have an ideal target number, it’s also an opportunity. Every change to build latency can increase the likelihood of developers staying on task, although if there are longer build latencies, one would need a proportionally larger change to see an impact.”
Providing developers with estimated build times can improve productivity
To understand how developers think about their builds and what task they will focus on while waiting for builds to complete, the researchers ran an experience sampling study for two weeks. Developers were prompted to respond to a survey when starting a build. The survey asked developers how long they expected their build to take, and what activities they engaged in while waiting.?
This study revealed that developers decide whether to go off task and what to work on based on how much time they think the build will take, not how much time they actually have. For example, if a developer thinks a build will take 60 minutes, they might go get lunch. If they think it will take a few minutes, they might go do a short code review.?
However, developers regularly overestimate or underestimate the time they think a build will take, which causes disruptions in their workflow. Despite builds feeling disruptive, the issue here is the developers’ expectation of how long a build will take. If build latencies were consistent, or if the build system informed the developer about the expected time to complete, developers could make better decisions about how to use their time as they wait.
领英推荐
“Reducing build latency is not our only lever to improve productivity here; we can also improve developers’ ability to make decisions around build latency as it is.”
Even modest build latency improvements are helpful?
The researchers also sought to identify the real-world benefits of reducing build times. They were inspired by a team at Google that is responsible for build machines: the team was exploring whether to use a more expensive system, and wanted to understand whether the investment was worth it.
To evaluate this, the researchers performed a blind experiment: 15% of developers were selected to have their builds supported by upgraded machines (the experiment group). This group experienced only slightly faster builds, with the median developer having builds improve by just a few seconds.?85% of developers had their builds supported by existing machines (the control group).
Over three months, the researchers tracked whether the experiment group saw changes across the following outcome measures:
In the study, the experiment group showed slightly higher self-reported productivity and slightly higher self-reported velocity. Satisfaction with build latency also increased in this group. All increases were statistically significant increases over the control group.?
Evaluating the behavioral metrics, researchers saw no changes to either of the groups for the first two months of running the study. In the third group, however, they saw a slight improvement for the experiment group: that group, on average, ran one more build a week and submitted 24 more lines of code per week. Additionally, the developers in the experiment group were faster to complete small and medium changes (11% faster active time and 14% faster wall-clock time). The delayed change in behavior was a surprise, so the researchers extended the experiment for two additional months. The behavior was sustained.
The delayed change in behavior surprised the researchers, but they attributed it to developers adapting to the faster build latencies.?
Overall, an incremental change in build latency has several effects on developers’ behavior and perception (albeit at a delay) that can and should be considered benefits of faster builds.?
Final thoughts
This paper is helpful in several ways:?
1. It gives leaders evidence that even modest improvements to build times are helpful. Developers with upgraded machines were able to fit in one more build a week, which meant just a few more lines of code submitted each week. They showed slightly higher self-reported productivity, velocity, and satisfaction with build tools. Additionally, their slightly faster iteration time resulted in overall velocity improvements for smaller changes.?
2. It surfaced the insight that developers need to be aware of the faster process in order to optimize around it. If they don’t notice the change, they may not update the way they use the systems.?
3. The researchers also suggested that, even if you can’t improve build times, you can improve developer productivity by making these processes more predictable. In the case of builds, we can improve predictability by either making builds take similar lengths of time or by informing developers of how long they are expected to take.
“Build latency is one narrow example, but a general approach to improving productivity falls out of this discussion: if you can’t make a process faster or easier, at least make it more predictable so that developers can optimize around it.”?
Developing with friends at #MercadonaIT
1 年so basic yet so profound
Software Product Developer | Agile & Kanban Expert | Exited Founder | Author & Publisher | Inventor of KEDE;
1 年The key advantage of faster builds is the allocation of larger, uninterrupted chunks of time. Build induced waiting time can lead developers to switch their focus, possibly to social media, often extending beyond the build time. Reducing the build time to 30 seconds or less decreases the frequency of such distractions. Let's consider the case of Reddit's new 2021 M1 MacBook acquisition. "We recently found that the new 2021 M1 MacBooks cut our Android build times in half. So for a team of 9, $32k of laptops will actually save $100k in productivity over 2022. The break-even point happens at 3 months. TL;DR Engineering hours are much more expensive than laptops!" — Jameson (@softwarejameson) November 3, 2021 However, this raises a crucial question: How does a faster computer equate to increased productivity in knowledge work? A faster computer might not reduce thinking time, but it could allow for more uninterrupted thinking periods. So, how can we validate and quantify these time-saving benefits? Here is how: https://docs.kedehub.io/kede-manage/kede-management-validation.html#applications
Lead Software Engineer at Supermetrics
1 年My dev environment requires containers running on my machine doing lots of disk I/O with the host. On Mac, it's a morbid story. It was day and night when I was given a green light to switch to a different machine with Linux on board. I could feel a productivity boost, I was more content, and maybe even just happier. Dev machine upgrade is a 1x improvement though. The dividend grows when automation times are positively affected, be it build, test or deployment, or anything in between. The notion of predictability, esp. "advertised predictions" is interesting. It reminds me of the counter-intuitive effect of placebo: it helps even if you know it's fake.
Sr. DevOps Consultant at DevOn - Agile/DevOps coach at De Nederlandsche Bank
1 年Rahul Sah Rini Solingen, van
Senior Software Engineer, Technical leader
1 年I find it interesting, that best practices about UI/UX (perceived performance and ways on how to manage waiting times) generally align with findings in this research