24 points · by thinkingserious · 12y ago · 40 comments
The article draws a distinction between bad code and technical debt - that things that make it hard to refactor a system are not 'technical debt' but 'bad code'. It's my experience that being unable to refactor systems is a consequence of accumulated technical debt - that as the interest compounds, bad designs build on top of bad designs and you can't fix the first bad design because the second bad design relies on it.
And the more expensive it gets to pay down the technical debt, the less anyone wants to pay to do it.
Backend team: As we are building an MVP, this database table will have a poorly designed schema we will iterate on later.
Frontend team: We need some data that only exists in that other team's database. We will accumulate some technical debt by reading their database directly. This will let us deliver working software quickly.
Backend team: The time has come to refactor that badly designed schema.
Frontend team: That will break everything. You must not do it.
Backend team: Please will you pay off that technical debt?
Frontend team: It's not hurting us much at all, and we would rather be working on new features and things that make money. We are busy and many people are asking us for important things. Here is a link to an article saying technical debt is not a bad thing.
Backend team: I am sad because I'm stuck looking after this badly designed table. I wish I had done a big design up front.
Technical debt should be viewed the same as any debt. With a major caveat being that there is no time limit on it. And to that end, you don't always have to pay down your debt.
The problem, I think, is everyone applies personal financing to thinking of technical debt. Very rarely can an individual accrue debt that will allow them to make money. It is not at all uncommon to make a design trade off that "pays dividends" pretty much immediately.
And, not too shockingly, xkcd has a good visualization on this. http://xkcd.com/1205/ (Granted, I can see how this is not necessarily the same thing. But I often feel that what folks call "technical debt" is really, "I wanted a jet liner solution for what a walk down the street could have accomplished.")
I think it relates the discussion of why software is an especially hard thing to write.
A simple way to put it is, "planning a large system is harder than you think it, for any value of 'you'". With another large part being that no only is calculating the time spent on the project hard, calculating how long or short the project will be is hard. And "harder than you think" means that no matter how sophisticated one gets, bad estimates will tend to seduce you based on the deadly combination of ignorance and wishful thinking - everyone experiences wishful thinking and everyone is ignorant of the real implications of a large enough new system.
Now, technical debt involves getting some momentary gain in the present based on planning to take of the problem in the future. And by that token, technical debt will expose you to the risks of planning a larger system immediately.
And this isn't to argue that one can or should eliminate technical debt - just that there's every reason to be more wary of it than ordinary debt.
My personal take, is the debt is actually taken out against the knowledge of others. That is, in technology, knowledge is the currency. To take on technical debt, then, is to leverage other peoples knowledge.
This sounds dangerously close to my saying technical debt is the opposite of NIH. And to an extent, I think I am. Pretty much, identify the areas where you/your company will take full ownership of the technology versus the areas where you will rely on the solutions of others.
I think the metaphor can be seen as double edged in this regard. Companies such as Google can afford to make massive investments in custom build workflows/etc. Smaller companies can not afford these investments and instead must work with standard "off the shelf" ones.
That is, your company may not be able to afford avoiding some technical debt. And the vast majority of the "debt" you take out will never need to be paid back.
A lot of terrible UI code may be acceptable as it rarely infects the rest of the system where a smaller design bug in a tiny utility library may end up causing worlds of pain even if it's rather elegant code that could be reused on other projects just fine.
You are taking out a debt against their knowledge in getting your application off the ground. This directly so if it has to be licensed, but equally true for free frameworks.
My argument is that for many people this will never be a problem. Consider how many games farm out the heavy graphics coding to libraries.
For many software companies and content producers, the content that you are producing is the value they bring. Trying to morph the actual value of a company into a new way of doing this is risky.
Which brings me to a comment I made in another subthread. The one thing people need to remember is that when you take out technical debt by using a framework or library, you are basically entering a contract to do things their way. Take great care when you break this contract.
Our whole financial, investment, and saving system is based on this statement thankfully not being true. You can't successfully save money or value of any kind unless someone successfully borrows it (I.e. Uses it productively).
The rest of us? We take out loans to buy houses and cars. Usually of much higher value than we needed. Or, even worse, to buy toys and other household items.
Seriously, when was the last time you took out a loan on something that had a financial return?
Maybe not make money, but certainly spend less money. Energy efficiency upgrades immediately come to mind. Eating well is another.
Similarly, if you had upgraded to CFLs when they were in their infancy, you would have terrible lights that have a long power cycle and provide little light. (Though, today I get annoyed with family that refuses to buy better lights.)
Most amusingly to me lately, I saw a "call for papers" about converting to DC in the house. Our AC power is effectively "technical debt" in the house hold. Moving from that to a more efficient DC source to power all of your DC items in the house would make sense. Using DC back in the day would not have.
Eating well is an odd one, I think. Rarely are people taking out loans to get food. You can certainly spend your capital more wisely on food, but I'm not sure it fits the metaphor.
If you define 'technical debt' in the re-appropriated sense, it is surprising to see an article title which translates to 'Bad Software is Not a Bad Thing', which is why I immediately read the article. But the original definition makes so much more sense, and actually provides the motivation for thinking of 'technical debt' as having a real place in the philosophical conversation of building software.
http://www.slideshare.net/spullara/managing-technical-debt-1...
Every time I make a technical decision, I ask myself how much debt am I taking on if I skip the "make it right" part. And what am I gaining from skipping that step?
I think the CEO's, CTO's, product managers, mid managers and lead devs all know they are taking on debt (if it has been communicated to them properly), they simply make what looks like the best decision at the time as far as the business goals are concerned.
- The debt can be hidden until, its to late. How many times have you thought, this code is duck tapped from top to bottom and on release its fine? On the other hand how many times do you think code is bullet proof only for it to fail once it hits real world use cases?
Technical debt is a risk vs reward equilibrium and everyone uses their best judgement to decide how much they want to borrow (unless they are ignorant to the the fact that they are taking on debt).
As the author mentions, in the context of a startup taking on technical debt. Its much less risky.
On one side of the equilibrium we have, "build a polished product that no one wants" then on the other side we have "release a buggy MVP, that will drive early adopters away forever".
I would rather save time and get a MVP out ASAP, after that deciding if its beneficial to pay off the MVP debt or to keep iterating faster and release a 2.0.
Then they move on to a new job once the debt becomes untenable. This works quite well (as an "economic" strategy) for industries of all types. I bet you can think of a few.
"Technical Debt is Not a Bad Thing"
"When you don’t pay down technical debt, just like real debt, it becomes a big problem, as I explained in Dirty Socks and Technical Debt."
So, you can't just "borrow" everywhere, and think that you are able to repay. It is important to refactor and downpay immediately, when you realize that you are going to depended on the debt elsewhere, or you'll get accummulated debt when you'll have to downpay the dependencies as well.
I'll coin that as the "future value of money syndrome". :)