I kind of despise the term 'technical debt'. It seems that in the beginning it was introduced to make the business side take code quality issues more seriously by likening them to something they could understand, i.e., debt, but now it seems to function as a way to postpone the fixing of issues, perhaps indefinitely. I think most things that go under the moniker of technical debt have an interest rate that is far higher than any business would enjoy taking out in terms of a loan.
Let me give an example. Some code can be badly formatted. This hardly costs any time to correct but maybe it is also not worth it? Well, I once encountered some code that clearly was in the wrong function, so I asked the colleague who tends to know about that part of the application. Then it turned out it actually was not in the wrong function but instead there was no blank line between the two functions making me not notice that it was actually two function instead of one. In the mean time I had disturbed a colleague which also has a real cost in terms of getting back into whatever he was busy doing. All code quality issues have costs associated to them that are very difficult to know beforehand but I think the safer way is to always be improving code quality and that which is called the internal quality of software should actually just be maximalized and that technical debt most of the time has more costs than benefits and that the costs will come sooner than anyone expects, long before you MVP is actually finished so that you might actually have paid it off profitably beforehand.
Tech debt is getting a feature out there, asap by creating work around that normally would require some refactoring.
In a lot of cases, it is forgoing optimization. We have several places in our app where we need to refactor some of our database tables in order to properly join the data and get it in an efficient manner.
But that will take a few days of refactoring and testing so instead, we just query the missing data in a subquery 200 times or whatever.
For now, it works fine, but as the dataset grows, that will obviously become slow and expensive.
But by then, we will have more customers and more budget and hopefully more developers that we can afford to refactor that code.
If we had unlimited time and resources, sure, go ahead and refactor your entire codebase every time you add a feature.
You'll build an amazing company, assuming your customers pay you based on how awesome the source code is, rather than what it can do for them right now.
[edit] hell, communicating that in a way the weaker end of technical managers will care about can be hard, for that matter. If they came up “doing it wrong” and are of a certain mindset, good friggin’ luck.
I personally force stakeholders to define sunset dates on the system / code ill be writing.
If its sunset date is never, cost of development proportional to roi approaches zero.
If the sunset date is near, cost of development gets very, very expensive.
Having that information both informs my priorities and the understanding of how long development will take / cost.
I am not sure that is good economics, because the discount rate for the future revenue approaches 100% over extended time.
Not everything is monetarily cost based.
Cant recreate a space probe 30 years ago to replace the one malfunctioning now.
Cant recreate makret share gained against compeitors with stability problems.
Interesting point though, definitely ignored it til now.
Iguess the point is, everything is a trade off, and we shouldnt be acting like its either high quality or high throughput or high cost. Its somehwere in between and you get to choose depending on your contlstraints and needs.
And lots of organizations would be willing to borrow money at a usurious interest rate-- why not borrow technology for the same? ;)
We have a small but dedicated percentage of sprint bandwidth dedicated to engineering's internal priorities, off limits to PMs. It works decently well. Certainly better than letting PMs make calls on which modules are most in need of refactoring.
I do something like this approach too - Friday mornings I try to start with devops / tech debt / hacking instead of product priorities.
Every feature added to a section of code is new information about the shape of the project. Making better decisions as new information arrives is a perfectly reasonable way to stay between drowning in tech debt and deadlocked in over-engineering. YAGNI (yet) comes up so often I think it should just be YAGNIY. Also gets around the people who want nobody to ever enjoy their work by poo-pooing every single attempt at improvement.
Notice also that in TDD refactoring is part of the TDD cycle: write test, write code, refactor. Doing TDD would make you do what is described in the previous paragraph as part of the cycle. So generally one would refactor something multiple times a day.