dev-resources.site
for different kinds of informations.
How expensive is a bug?
If youāve been working in the IT industry for any significant time, thereās a high probability that youāve heard claims like āIt costs 1,000 times more to fix a bug in production than during the design phaseā. Such claims are often accompanied by charts or tables that look something like this:
Phase | Repair cost |
---|---|
Design | $100 |
Development | $1,000 |
Testing | $10,000 |
Production | $100,000 |
Thatās enough to make you want to try really really hard to design the right thing right, isnāt it?
Now, every version you find will have different multipliers, and maybe even different stages, but the particulars arenāt the point Iām talking about today (the particulars are apparently fiction anyway).
What I want to point out about this entire train of thought is that itās based on an outdated premise. That premise is called, in a word āwaterfallā.
So what if we apply this principle to proper agile software development practices, and teams using CI/CD and the like?
Well, the first thing weād notice when trying to apply this table to a proper agile team is that there are no designated ādesignā, ādevelopmentā, and ātestingā stages. These are all activities that happen continuously, in an intermingled way.
But letās brush that aside for a moment, and agree to try to apply the concept in a more conceptual way.
On the most agile teams Iāve worked on, it usually takes no more than about 20 to get a bug fix into production, or if the bug fix is taking too long, a rollback to stop the hemmoraging while the bug is investigated. But letās be generous, for the sake of calculation, and assume that it takes a full hour to remedy a production bug. And that the engineer doing this (working alone) earns US$200,000 per year. That means the cost to fix this production bug is aproximately US$103.
So hereās the thing: When you operate in an agile way, with short feedback loops, the point at which you detect a bug becomes almost immaterial to the cost of fixing the bug. Every new line of code spends less than 8 hours in queue (thatās the definition of Continuous Integration) before being deployed to production. In this working style, Design, Dev, Test, and Production are all burred into each other.
When fixing a production issue takes 20 minutes, the relative dollars-and-cents cost of the stage in which we fix a bug is meaningless. Who cares if it costs 1000 times practically-nothing?
Of course, there are reasons to detect bugs as early in the process as possible, and Iām sure Iāll talk about them in the future, but theyāre more aligned with the idea of optimizing flow through the system, not in reducing the bug fix cost.
If you enjoyed this message, subscribe to The Daily Commit to get future messages to your inbox.
Featured ones: