Índice do artigofaltam 5 min de leitura
You ask the team that looks after your system for a change that seems small, like a new field in the signup form or an extra column in a report, and the answer comes back in weeks. The previous change, a similar one, came out much faster. And nothing is broken: the system works and sales keep coming in. You are left torn between paying someone to clean things up, continuing to ask for new features or switching vendors.
Martin Fowler, author of programming books including "Refactoring" and chief scientist at the software company Thoughtworks, explains this delay with a calculation every manager knows: paying interest.
Why does today's change cost more than yesterday's?
Every system accumulates, over time, things that were handled poorly inside the code. They are invisible to users, but they make it harder to change and extend what already exists. Fowler gives an example from a programmer's daily life: if the parts of the system were well organized, he would take four days to add a new feature; with the mess that is there, it takes six. The difference is the interest, and it is charged again on every change that goes through that section.
Think of a stockroom arranged in a hurry during a busy week. The goods came in stacked wherever they fit, without labels, and everything is there. But whoever needs to fetch something from that corner loses time searching and unstacking, and that extra time is only charged when someone goes there. The corner nobody visits costs nothing. Tidying up takes a few days all at once, and it only pays off if the corner is visited a few more times. Fowler does the same math with code: cleaning up the mess for a single change is a loss; with other similar changes in the queue, it is faster to clean up first.
The name engineers give this is technical debt. The comparison with money was coined by Ward Cunningham to explain to his boss, on a financial software project, why the team stopped to clean up the code.
Is every shortcut in the code a mistake?
No. Some shortcuts are sensible decisions. In another piece, Fowler splits debt into types, crossing one question with another: did the team know it was taking a shortcut? And was it working carefully or improvising?
The conscious shortcut, shipping now and dealing with it later, is a legitimate business decision: the company launches earlier knowing it has taken on a cost, after weighing whether the early launch pays off. Fowler considers "now we know how we should have done it" inevitable, because even the best teams learn along the way. The problem is the shortcut taken carelessly, which becomes the most expensive bill.
For whoever pays the bill, what matters is where the debt sits. Interest is only charged when someone touches that part, and here, Fowler says, the comparison with a bank breaks down: at a bank, interest accrues over time. That is why a messy but untouched section can stay as it is. The part that changes every week, on the other hand, calls for zero tolerance, because there the interest is suffocating. And paying it off usually works better little by little, as with a bank loan. A shortcut taken to speed up a delivery also has a short shelf life: according to Fowler, within weeks, not months, it starts costing more than it saved.
How Slack started paying the bill without stopping the app
Slack, the business messaging app, went through this and described how it did the first stage. Tracy Stampfli and Bryan Stern, engineers at the company, reported on the engineering blog that the mess accumulated in the mobile apps' code had made work slow enough to affect the product's feature roadmap. The parts were so tangled that a change in one corner could easily break another that seemed to have no connection at all.
The way out came through decisions made in this order:
- Clean up from the inside, without rewriting from scratch, with the app in use: less risk, results seen sooner and only one codebase to maintain.
- Show leadership what they would get in return, because the investment was long and would compete for room with the company's other priorities.
- Pay off first what got in the way most, listening to the people who work in the code every day and measuring which parts were worst.
- Protect a dedicated team, with leads for the iPhone and Android versions, so nobody got pulled back to new features halfway through.
If your vendor asks for budget to clean up, that is what you should demand: what improves, in which parts and when you will notice it. After six months, the first phase ended with every goal met and on schedule. The account of this phase does not say how much faster the work became.
When the interest comes due all at once
X-Apps, the software company that writes this blog, found this situation in the events app of StartSe, a Brazilian business education company. The app was already in use on both app stores, but the tool it had been built with was on an old version, and moving to the new one was not a one-click update: it meant rebuilding the structure. The initial assessment found that the Android version could not be built for the store, the app froze on launch and the code had piled up coding-standard errors. Nobody had to make a mistake to get there: it was the interest coming due all at once.
The way out was to rebuild the structure in a new project, bringing the app's pieces over, while it stayed published and the events calendar kept running. In the end, the Android version could be built again, the app stopped freezing on launch and the coding-standard errors were sorted out.
What to ask whoever looks after your system
You do not need to read the code to notice the debt. The signs show from the outside: similar changes with ever-larger estimates, a fix in one place that breaks another with no apparent connection, system tools stuck on old versions.
Which parts of the system change the most, and how much does the mess add to the cost of each change there? A good answer is a short list of those parts, with how long the latest changes in each one took.
How much time per month goes into cleaning up the system on the inside? A good answer is a fixed, agreed share that does not vanish at the first emergency and shows up separately in the monthly report.
Which shortcuts did we take on purpose, and what are we going to do about them? A good answer is a list you can see, with the reason for each shortcut and when the team plans to come back to it, or why it can stay.
If the proposal is to rebuild from scratch, why not clean up from the inside? A good answer compares the risk of both paths and when each starts paying off. If the decision really is to rebuild, the piece on redoing what already works shows the choices of those who went down that path.
Switching vendors does not erase the debt: whoever arrives inherits the same interest and still has to learn the system. Switching makes sense when these answers do not come, or come with nothing you can check.
A shortcut in the code is a loan: you can take it, as long as someone knows how much interest you pay and when you pay it off.
Sources read on November 16, 2026: Martin Fowler, "Technical Debt", May 21, 2019, and "Technical Debt Quadrant", October 14, 2009, martinfowler.com.
Tracy Stampfli and Bryan Stern, "Stabilize, Modularize, Modernize: Scaling Slack's Mobile Codebases", Slack Engineering, January 12, 2022.




