Live data from Hacker News

Technical Debt Is Like a Tetris Game

fluentcpp.com

31–40 of 122 posts

Re: Technical Debt Is Like a Tetris Game

#31

The best analogy for technical debt is debt - that is where it got the name from! Just like financial debt, technical debt is not necessary a bad thing, but a tool - and something to manage, control and track. And just like financial debt, taking out too much technical debt without paying it back can crush you. There is nothing wrong with taking out a mortgage (and thus getting into debt) to buy a house - you just ne…

Another thing worth noting is that company success doesn't mean you're more easily able to pay off the debt like you would your mortgage. In fact the opposite may be true and it may limit future earnings if it bites you in the wrong place.

Re: Technical Debt Is Like a Tetris Game

#32

The best analogy for technical debt is debt - that is where it got the name from! Just like financial debt, technical debt is not necessary a bad thing, but a tool - and something to manage, control and track. And just like financial debt, taking out too much technical debt without paying it back can crush you. There is nothing wrong with taking out a mortgage (and thus getting into debt) to buy a house - you just ne…

The difference though is that financial debt is very easy to measure and quantify but technical debt is not.

I like the Tetris analogy because that game has a type of debt that anyone who has played it can understand, yet is not as easily quantifiable as financial debt.

Re: Technical Debt Is Like a Tetris Game

#33
Software with significant technical debt is like a car held together with duct tape and kept moving with WD-40.

1. You wouldn't pay good money for it if you knew what was under the hood.

2. Most mechanics are reluctant and embarrassed to work on it.

3. Maintenance is going to cost more than you think, probably by a wide margin.

4. You wouldn't expect a major manufacturer to ship a brand new vehicle this way.

5. Nobody who knows what they're doing will ever brag about having a hand in creating it.

Re: Technical Debt Is Like a Tetris Game

#34

The best analogy for technical debt is debt - that is where it got the name from! Just like financial debt, technical debt is not necessary a bad thing, but a tool - and something to manage, control and track. And just like financial debt, taking out too much technical debt without paying it back can crush you. There is nothing wrong with taking out a mortgage (and thus getting into debt) to buy a house - you just ne…

Financial debt is well understood, and its impact is easy to measure.

Technical debt is not well understood, and its impact is not easy to measure.

This analogy is probably why so many companies make the (usually wrong) decision regarding technical debt.

Re: Technical Debt Is Like a Tetris Game

#36
Here's the insidious part of technical debt. There's two types:

Known and unknown.

If you are not knowingly accumulating technical debt, then 90% of the time you are accumulating it unknowingly. This is the most insidious form of debt.

I have searched my entire career in software engineering for the solution to unknown technical debt. The problem isn't just solving it, it's also clearly defining what is happening to your software over the years even when you spend the utmost care in not allowing technical debt to accumulate.

I think I sort of nailed down what's going on in a fuzzy way. I also sort of have a fuzzy solution to the problem. Allow me to elucidate:

Eventually most projects will hit a point where you realize that your initial design was poor. You are given a new feature and your old design is simply not flexible enough to accommodate the change. In order to put the feature in, you either do a massive rewrite or you hack it in.

In this way the technical debt that was accumulated unknowingly may force the programmer to begin accumulating debt knowingly. In fact they often forget about the unknown technical debt. They think that the only proper solution is to contemplate between the cost of a hacky shortcut or a massive rewrite without thinking about what caused the need for the massive change in design. What exactly is the thing that is causing the "need" for the massive rewrite?

What's happening is, whenever you design something you are predicting the future. You are assuming your design can handle certain current requirements and future ones. However, the future is actually unknown, there is very little chance you can ever predict the future in an accurate way. Thus by your lack of ability to predict the future, your design will usually in the majority of cases fail to predict the future and this problem will always occur.

That is all that is happening with unknown technical debt.

The best solution (not a full solution) to this is to design all your projects with the maximum flexibility possible. That means every corner of your code that can be factored into multiple modules or be easily factorable in the future. By coding this way, you maximize the reusability and reconfigurability of your code giving the best possible insurance for an unknown future.

If you heard of ravioli code, this is it. It has bad connotations but ravioli code is my best known solution to unknown technical debt. Most people feel ravioli code is hard to read or maintain... In a way it is, but the key here is deal with the program in layers of abstraction. Your complicated ravioli code of 100 primitives at the lowest layer must be able to "compose" into higher level layers where you only have to deal with a manageable 20 primitives.

So the key isn't just ravioli code, but ravioli code with highly compose-able modules you can use to simplify your code into layers. Think of it like a slider between flexibility and simplicity. The higher the flexibility (more primitives) the more complex your program is; the lower the flexibility (less primitives) the more simple your program is... A good design is one where at any moment in the projects life time you can move from layer to layer and readjust the flexibility and simplicity of the program at will.

Unknown to most people there is a programming style that does the above almost mechanically:

Typed Functional programming.

You may have done some FP and seen it get messy (especially with JS), but to really see why this is the solution you should take a look at Typed FP using the point free style. The point free style will help you understand the true nature of a compose-able primitive.

Re: Technical Debt Is Like a Tetris Game

#37
Technical debt is risk. Just like in financial systems, taking on SOME risk is how you make money, but you need to measure it and minimize it and be prepared for if the risks taken all end unfavorably. This product risk (see also dependency risk) is intertwined with the combined risk of other projects going on, whether they're public relations risk, technical risk, staff risk, etc. and taking on too much risk means you have too many flipped coins in the air to count on them all landing favorably for you, even if they're weighted.

Re: Technical Debt Is Like a Tetris Game

#39
post #3

I tend use the "Leaning Tower of Pisa" metaphor. If it leans too much, the tower will fall down. If it doesn't tilt at all, you won't sell tickets to tourists. The art is to find the sweet spot.

I often use the leaning tower metaphor too but with a different meaning: https://bonkersworld.net/all-engineers-are-the-same

Re: Technical Debt Is Like a Tetris Game

#40
post #32

The best analogy for technical debt is debt - that is where it got the name from! Just like financial debt, technical debt is not necessary a bad thing, but a tool - and something to manage, control and track. And just like financial debt, taking out too much technical debt without paying it back can crush you. There is nothing wrong with taking out a mortgage (and thus getting into debt) to buy a house - you just ne…

The difference though is that financial debt is very easy to measure and quantify but technical debt is not. I like the Tetris analogy because that game has a type of debt that anyone who has played it can understand, yet is not as easily quantifiable as financial debt.

I wonder if there was a time in history where financial debt was not well understood. This would have to be either before the invention of algebra, or possibly also during a time of very poor education.
Post reply on HN