Business Impact of Low Code Quality
Business Impact of Low Code Quality
The business
impact of low
code quality
This paper presents data from a large-scale study on how code quality
impacts software companies in terms of time-to-market and product
experience. We conclude with an analysis of the impact and speci c
recommendations towards successful software development.
Content
6. Fu ther information
The code analysis platform 14
About the author 14
Credits 14
Key takeaways
1
Everyone in the software industry “knows” that code quality is impo tant, yet we never had any
data or numbers to prove it. Consequently, the impo tance of a healthy codebase is largely
undervalued at the business level.
With this paper we remove the quotation marks so that “knows” becomes knows by attaching
numbers on the impact of unhealthy code. That way, code quality can nally become the
business concern that this study shows that it must be.
1 A. Tornhill & M. Borg (2022), “Code Red: The business impact of code quality - A Quantitative
Study of 39 Proprietary Production Codebases”. Accepted for publication in Proc. of International Conference on
Technical Debt 2022
fi
fi
r
fi
fi
r
r
r
r
fi
4 of 14
1. Introduction: a software
tragedy
One of the great tragedies in software This implies that there is an untapped
development is that code quality lacks potential for software projects if the code
visibility. Hence, it becomes far too easy to quality is improved and technical debt paid
trade sho t-term wins like new features for down.
the long-term maintainability of the code
base. Until now, the business impact of code
quality has been vague and frequently
This puts the business at risk: ef cient dismissed as a technical concern. Our
software development is a competitive mission is to change that view: in this paper
advantage that enables companies to we present our ndings from studying 39
maintain a sho t time-to-market without proprietary production codebases with
compromising the quality of their products. respect to lead times for new features and
Adding to that challenge, our industry also the business risks in terms of defects.
faces a global sho tage of software
developers; demand substantially outweighs Our results indicate that improving code
supply. quality could free existing capacity; with 15
times fewer bugs, twice the development
So at the same time that our industry is speed, and 9 times lower unce tainty in
struggling with recruiting enough talent to completion time, the business advantage of
meet ever sho ter product cycles, research code quality is unmistakably clear.
indicates that up to 42% of developers' time
is wasted dealing with technical debt.
“With 15 times fewer bugs, twice the development speed, and 9 times
lower unce tainty in completion time, the business advantage of code
quality is unmistakably clear.”
r
r
r
r
fi
r
r
fi
5 of 14
23
2 Besker, T., Ma tini, A., Bosch, J. (2019) “Software Developer Productivity Loss Due to Technical Debt”
3 https://codescene.com/technical-debt/whitepaper/calculate-business-costs-of-technical-debt.pdf
r
r
fi
fi
r
r
fi
fi
fi
r
r
6 of 14
of code quality
Everyone in the software Development data from 39 companies
industry “knows” that code To measure the relationship between code
quality and the business impact, we collected
quality is impo tant, yet there data from 39 proprietary codebases under
is little data suppo ting that active development. The collected data
represents all development tasks that were
claim. completed over the past 6-12 months,
depending on codebase.
Without quanti able values, we — as an industry
— are unlikely to bridge the existing We included codebases from industry
communication chasm between engineering segments as diverse as retailing,
and business. This is evident in the previously construction, infrastructure, brokerage, data
referenced studies: even though technical debt analysis, and more to ensure a representative
wastes up to 42% of developer’s time, less than sample. We also capture data that generalises
10% of all business managers actually manage across implementation technologies. Hence,
their technical debt. our dataset includes codebases implemented
in 14 different programming languages
But it gets worse. Much worse. A study by (Python, C++, JavaScript, C#, Java, Go, etc.).
Besker et al. repo ts that “none of the
interviewed companies had a clear strategy on All companies gave their consent to
how to track and address the wasted time”4. pa ticipate in the study, and provided us with
This implies that the majority of companies: access to their source code repositories and
Jira product data.
A. don’t know how much time they waste on
poor quality code and technical debt, The measurements are performed through
the CodeScene tool, which automates the
B. don’t know where the main development code quality classi cation as well as
bottlenecks are amongst millions of lines of measuring the cycle time in development and
code, or the ratio of software defects. Let’s look at the
metrics and results.
C. don’t have a strategy to reduce that waste.
The study and numbers presented in this white • 40,000 software modules
paper aim to change the situation by offering
• 14 programming languages
statistically signi cant data on the relationship
• Multiple industry segments
between code quality and business outcome.
4Antonio Ma tini, Terese Besker, and Jan Bosch. 2018. Technical debt tracking: Current state of practice: A survey and
multiple case study in 15 large organizations. Science of Computer Programming 163 (2018), 42–61.
r
r
fi
fi
r
fi
r
r
7 of 14
Measure
5
Code Quality via the
Code Health metric
Our research uses the Code Health metric
as a proxy for code quality. Code health is
an aggregated metric based on 25+
factors scanned from the source code. 5
The code health factors are known – from
research – to correlate with increased
maintenance costs and an increased risk
for defects.
Based on the code health score, each
source code le is automatically
categorised by the CodeScene tool as:
5 https://codescene.com/code-health
r
r
fi
fi
fi
fi
fi
fi
fi
r
fi
fi
8 of 14
All ndings repo ted in this paper are statistically signi cant. Peer reviewed & accepted for
That means, in layperson terms, that the ndings are the International Conference
unlikely to be just a uke or randomness in the data. on Technical Debt 2022
software
Given that software companies waste up to 42% of
developers’ time on technical debt, it is surprising that as few
as 7.2% of organizations methodically track technical debt6.
6Antonio Ma tini, Terese Besker, and Jan Bosch. 2018. Technical debt tracking: Current state of practice: A survey and
multiple case study in 15 large organizations. Science of Computer Programming 163 (2018), 42–61.
fi
fi
fi
r
fi
fi
r
r
fi
fi
r
11 of 14
Reduce
7
unce tainty in estimates and commitments
Without visibility into your product’s code prioritising features. Planning a feature that
quality it becomes too easy to ignore any involves Red Code implies that the outcome
warnings from engineering. Over time, the is:
problems will deepen: features that took one A. higher risk,
day to develop a year ago now need 2 weeks, B. more expensive in terms of development
and often lead to unexpected rework. Low time, and
code quality kills innovation and progress. C. a large unce tainty in completion time.
Instead, knowing the health of your code That way, you can make data-driven decisions
reduces risk and aligns expectations. on whether to go ahead with the feature as
Consider a Product Manager (PM) responsible planned or, in case of code health issues,
for the company’s roadmap. If you — as a decide to sta t by refactoring/improving the
potential PM — knows the health of your existing code to reduce the risk.
code, then you’d use that when planning and
Example of a code health visualisation of React.js from Facebook: we immediately see where the risks
area (visualisation via the CodeScene tool).7
7 https://codescene.com/blog/evaluate-code-quality-at-scale/
r
r
r
12 of 14
Speed
89 + Quality — you can have it all
Figure. The scope of this white paper and how it complements the FMK from Accelerate.
8N. Forsgren PhD J. Humble and G. Kim. 2018. Accelerate: The science of lean software and devops: Building and
scaling high performing technology organizations. IT Revolution.
9 https://www.devops-research.com/research.html
fi
fi
r
13 of 14
Finally, we acknowledge the fact that correlation • Development teams: these research ndings
doesn’t imply causation. We plan to conduct future offer a way to communicate improvements to
studies that help uncover the impact of code the product and leadership teams. Many
quality. developers are forced to take on technical debt
when the organisation pushes for wishful
deadlines; use the Code Health views to
There’s more: communicate the risks using a terminology that
Prioritise code health issues via Hotspots means something to the business. Also, use
Code Health trends10 to show the negative
Organisations need to balance sho t- and long-
impact in uenced by accumulated technical
term goals. No matter how much we want, we
debt.
simply cannot x all Red and Yellow code at
once. Instead, we need to prioritise by impact.
10 https://codescene.com/blog/3-code-health-kpis/
r
fl
fi
fi
fi
r
r
r
r
r
fi
r
fi
14 of 14
6. Fu ther information
Credits
A big, big THANKS to Markus Borg from Lund This paper represents the progress towards a
University for co-authoring the original long-term goal of mine: make code quality a
research paper. Invaluable contributions! rst class citizen of business. On this journey,
I learned a lot from the technical debt
Thanks to Aslam Khan, Joseph Fahey, and community as well as from all the people that
Romanela Polutak for reading drafts of this I had the chance to meet and discuss with
paper. Your feedback and comments made over the years. Thanks!
the paper so much better than what I could
have done on my own.
Contact Blog and a ticles
Contact: [email protected] www.codescene.com
Twitter: @codescene www.codescene.com/blog/
LinkedIn: https://www.linkedin.com/
company/codescene