What are intelligent strategies to keep technical debt at bay?
What kind of smart strategies did you find to reduce technical debt in relatively new code bases?
As an aside, in the last time, I have heard several times that using new programming languages / language standards like C++20 or Python 3.10 helps against technical debt. I am not so sure about that one. Sure, code bases with new language versions or standards are overall newer, and therefore, they tend to have less technical debt. This is quite logical to me. But my impression is that good practice and experience is what makes the crucial difference seven of eight years later. In fact, I suspect that languages that are evolving rapidly might accumulate more technical debt, as they are less stable by concept.
All this is superimposed with business fields where few codebases are older than some three years (like typical start-ups) and others where a vast amount of code runs 20 years or more (like industrial automation and banking). And there are even some communities which are using rather old languages because of their (real or perceived) stability.
14 comments
[ 3.0 ms ] story [ 32.7 ms ] thread- Get metrics the reward teams with Stable and Reliable systems, and avoid metrics that just reward teams that commit the most features
- Make sure the code reviewers have skin in the game, and that what they allow to pass reviews is also theirs to fix, not the the original coder.
Ideally simplicity leads to adaptibility, simple things make less assumptions, and maintainability, it's easier to understand the behavior of simple things. That being said simplicity for it's own sake is not important, adaptibility and maintainability is what's important.
Using a language that changes often and have a lot of subtlety or features, especially macros hurts maintainability, because one needs to understand the language first.
It is not technical debt if there is no explicit decision, or it is the gradual and continuous bitrot that all codebases suffer. I usually refer to this as cruft and while good design and writing code to optimise for readability / understandability reduce the rate that cruft accumulates, it cannot be stopped due to the nature of software. The best practice I have found to fight cruft is many small refactorings and cleanups as part of every piece of work I deliver. This strategy is outlined in https://ronjeffries.com/xprog/articles/refactoring-not-on-th....
I am currently refactoring a giant system that had a badly normalized object model that couldn’t be extended and have been doing so for over a year.
One can use views and modification triggers to split the public interface and a private implementation of a db. Whether it's feasible or worthwhile - it depends of course...
It doesn't help with migrating the production dbs though and it's because of this I generally agree with your sentiment.
Technical debt may be nothing more than a prioritization strategy that is either intentionally or unintentionally blindsided by a technical asymmetry of attention to a rate of system degradation.
Smart organizations will throttle the degree to which development performs like an ever insatiable desire to maximize efficiency at the cost of mortgaging away the responsibility for system refreshment.
Just as "fitness functions" are desirable sensors for expiring licensing and contractual renewals so should an enterprise think about and implement ecosystem fitness functions that compare existing system state against the latest industry trajectories. Identifying, recognizing, and rectifying business ecosystem weaknesses will go a long way in preventative maintenance and reduced technical entropy and debt.