I made an offhand remark about technical debt to a friend and he interrupted me, saying: "technical debt is just bullshit". In his experience, people talking about technical debt were mostly trying to:
- cover up bad code
- cover up unfinished work
Calling these issues 'technical debt' seems to be a tactic of distancing oneself from these problems. A nice way of avoiding responsibility. To sweep things under the rug.
Intrigued, I decided to take a better look at the metaphor of techical debt, to better understand what is actually meant.
Tip: this article on Medium by David Vandegrift also tackles this topic.
A definition of technical debt
Right off the bat, I realised that my own understanding of technical debt was wrong. Most people seem to understand technical debt as:
"cut a corner now, to capture short-term business value (taking on debt), and clean up later (repaying the debt)".
I think that's wrong.
Ward Cunningham, who coined the metaphor of technical debt, wrote:
You know, if you want to be able to go into debt that way by developing software that you don't completely understand, you are wise to make that software reflect your understanding as best as you can, so that when it does come time to refactor, it's clear what you were thinking when you wrote it, making it easier to refactor it into what your current thinking is now.
In some sense, this reads to me as a form of prototyping. To try out and test design/architecture to see if it fits the problem space at hand. But it also incorporates the willingness to spend extra time in the future to change the code to better reflect the current understanding of the problem at hand.
... if we failed to make our program align with what we then understood to be the proper way to think about our financial objects, then we were gonna continually stumble over that disagreement and that would slow us down which was like paying interest on a loan.
The misalignment of the design/architecture and the problem domain creates a bottleneck, slowing down future development.
So I think it's clearly not about taking shortcuts for a short-term business gain.
It is more a constant reinvestment in the future. It may temporary halt feature work, but it should result in more functionality and features in the long run. It doesn't seem short-term focussed at all to me. And you need to write 'clean' code and do your best because it is likely that you will have to rewrite parts of it.
These two articles by Ron Jeffries already discuss this in great detail.
A logical error
Reading up on the topic, I noticed something very peculiar. Somehow along the way, everything that hinders software development has become 'technical debt'.
Anything that creates a bottleneck, is suddenly put into the basket of technical debt. I started to get a strong sense that a lot of people are somehow making a logical fallacy.
If you have technical debt, you'll experience friction when trying to ignore it and just plow ahead. The technical debt creates a bottleneck.
But then people reason the wrong way around: I notice a bottleneck in my software development process, so we have 'technical debt'.
However, because technical debt creates a bottleneck, it doesn't follow that every bottleneck is thus technical debt.
I think it's this flawed reasoning that turns every perceived obstacle into technical debt2.
Maybe I'm creating a straw man argument, but I think I have some examples that show that people are thinking the wrong way around.
If we look at the wikipedia page about technical debt, there is a long list of possible causes of technical debt.
To site some examples:
- Insufficient up-front definition
- Lack of clear requirements before the start of development
- Lack of documentation
- Lack of a test suite
- Lack of collaboration / knowledge sharing
- Lack of knowledge/skills resulting in bad or suboptimal code
- Poor technical leadership
- Last minute specification changes
Notice that these issues are called 'technical debt' because they can have a similar outcome as technical debt. They can create a bottleneck.
But why the hell would we call these issues technical debt?
These issues are self-explanatory. Calling them technical debt not only seems inappropriate, it just obfuscates the cause of these problems and it doesn't provide any new insight. Even in conversations with laypeople.
A mess is not a Technical Debt
Unfortunately there is another situation that is sometimes called “technical debt” but that is neither reasoned nor wise. A mess.
A mess is not a technical debt. A mess is just a mess. Technical debt decisions are made based on real project constraints. They are risky, but they can be beneficial. The decision to make a mess is never rational, is always based on laziness and unprofessionalism, and has no chance of paying of in the future. A mess is always a loss.
Cunningham's definition of technical debt shows that it's a very conscious and deliberate process. Creating a mess isn't. It's totally inappropriate to call that technical debt. It's just a mess.
I think that nicely relates back to that earlier list from wikipedia. Just call things out for what they actually are.
Is quibbling over 'technical debt' as a metaphor missing the point?
He even introduces a quadrant:
|Deliberate||"We don't have time for design"||"We must ship now and deal with consequences (later)"|
|inadvertent||"What's Layering?"||"Now we know how we should have done it"|
This quadrant makes me extremely suspicious. Because in this quadrant, everything is technical debt. He just invents different flavours of technical debt. It's never not technical debt. It's technical debt all the way down.
It seems to me that Martin Fowler twists the metaphor of technical debt into something that can never be falsified, like psychoanalysis.
It's not 'bad code', a 'design flaw' or 'a mess', it's 'inadvertent & reckless technical debt'. What is really more descriptive of the problem?
Maybe it's just my lack of understanding, but I fail to see why it is in any way helpful to call every kind of bottleneck 'technical debt'. I again fail to see how this conveys any meaning.
In the end, what Fowler does is just pointing out that bottlenecks in software development can be due to the four stages of competence.
|Concious||"We don't have time for design"||"We must ship now and deal with consequences (later)"|
|Unconscious||"What's Layering?"||"Now we know how we should have done it"|
I don't think we need new metaphors for things we (even laypeople) already understand.
Does technical debt (even) exists?
The HFT Guy goes as far as to argue that technical debt doesn't really exists, it isn't a 'real' concept.
After decades of software engineering, I came to the professional conclusion that technical debt doesn’t exist.
His argument boils down to the idea that what people call technical debt is actually mostly maintenance.
So reincorporating a better understanding of the problem at hand into the code (design) is seen as an integral and natural part of software development, illustrated by the substitute metaphor of mining (alternating between digging and reinforcing). At least that's how I understand it.
Substituting one metaphor with another, how useful is that really? But in this case it's at least less generic and more precise.
Although Cunningham meant well, I think the metaphor of technical debt started to take on a life of its own. To a point where code that doesn't conform to some Platonic ideal is called technical debt4.
Every mistake, every changing requirement, every tradeoff that becomes a bottleneck within the development process is labeled 'technical debt'. I don't think that this is constructive.
I think my friend was right: the concept of technical debt has become bullshit. It doesn't convey any better insight or meaning. On the contrary, it seems to obfuscate the true cause of a bottleneck.
At this point, when people talk about technical debt, I would be very sceptical and would want more details. Technical debt doesn't actually explain why we are where we are. It has become a hollow, hand-wavy 'explanation'.
With all due respect to Cunningham, because the concept is so widely misunderstood and abused, it may be better to retire it.
if you are not working on a new feature, you are working on technical debt. ↩
I think that Uncle Bob's definition of technical debt in this article is not correct. He also defines it basically as cutting corners for short-term gain. ↩