Live data from Hacker News

All code is technical debt

tokyodev.com

161–170 of 178 posts

Re: All code is technical debt

#161
post #5

> Technical debt, as originally coined by Ward Cunningham, is the idea that you can gain a temporary speed boost by rushing software development, at the cost of slowing down future development. No! Ward's blog post linked in this very paragraph [0] describes the original definition quite clearly, and it's not this. The term was originally intended to describe the delta between a programmer's current understanding acq…

From what I can tell, the definition in the link you provided is precisely what you're saying it's not. He says this: > The explanation I gave to my boss, and this was financial software, was a financial analogy I called "the debt metaphor". And that said that 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 s…

Right, and I think the example here is instructive. He's not talking about rushed, shoddy, buggy code. He's talking about not taking the time to implement the right design. The resulting code might work just fine and doesn't necessarily impose additional maintenance costs, but the design issues mean that every time you're adding or modifying a feature you have to do extra work to translate from the 'correct' theoretical design of the feature to the actual design.

Unfortunately, while managers are often happy with "it'll make page load faster" or "it'll increase uptime" as a justification for a project, and "it'll reduce bug reports" and even sometimes "it'll automate manual tasks", "it'll make development easier" can be a really hard sell. It sounds pretty abstract and I think some managers start to think that it's just an excuse. It's certainly hard to quantify the impact, especially if you're expected to do that in $/yr.

Re: All code is technical debt

#162

Earlier quoted context omitted.

"My point today is that, if we wish to count lines of code, we should not regard them as "lines produced" but as "lines spent": the current conventional wisdom is so foolish as to book that count on the wrong side of the ledger." -- Dijkstra in 1998 ( https://www.cs.utexas.edu/users/EWD/transcriptions/EWD10xx/E... )

That was in 1988! For similar sentiments consider "Science and the Compulsive Programmer" from 1976. https://www.sac.edu/AcademicProgs/Business/ComputerScience/P... "Programming systems can, of course, be built without plan and without knowledge, let alone understanding, of the deep structural issues involved, just as houses, cities, systems of dams, and national economic policies can be similarly hacked together. As…

Doh! Yeah that was a typo. Sorry I can't edit now. Thanks for the correction.

Even though I don't use any of his techniques, Dijkstra's "A Discipline of Programming" did affect the way I see things considerably.

Re: All code is technical debt

#163
Reading this article reminded me that we need to think more about the whole lifecylce of a software product. I usually make the mistake developing a product thinking that it will exist forever and new features will be added continuously. The truth is: Almost every software product has a point in time where it is obsolete. (Maybe except some really big enterprise solutions or OS libraries).

I see these phases for many small software product:

1. Development Phase (Features are added continuously)

2. Maintenance Phase (No features are added, compatibility is ensured and bugs get fixed)

3. End of Support Phase (Basically no development happens for the product any more.)

The second phase "Maintenance Phase" is usually much longer than the development phase for a successful product. The cost during this phase heavily depends on the amount of features, that were added in the first phase. So be careful what you develop, you need to maintain it for a long period of time and at one point in time it will be obsolete anyways.

Re: All code is technical debt

#164
post #160
post #87

Earlier quoted context omitted.

What I don't like about "technical debt" is that it's usually interpreted as "technical" debt: it's only a problem for the developers, the techies. You immediately lose the business stakeholders once you start talking about technical debt. But the problem of technical debt if a problem for everyone, not just the devs, because it is reflected in quality and time-to-market. I feel having that conversation about time-to…

In the contemporary tech industry, there's a pretty good chance that the managers who oversaw the decision to incur technical debt are not going to be the managers who make the call whether to "repay" it. It might not even be the same programmers. The "debt" metaphor makes a lot of sense when you're saying "you are asking for something that will incur a cost that we will later need to repay". It seems less effective…

The thing with actual debt is that you have to pay it back, because you agreed to do that in a formal way. That's not the case with technical debt. No one says you have to pay it back. That's why I think the metaphor falls flat when you use it with business stakeholders.

Re: All code is technical debt

#165
post #111
post #87

Earlier quoted context omitted.

What I don't like about "technical debt" is that it's usually interpreted as "technical" debt: it's only a problem for the developers, the techies. You immediately lose the business stakeholders once you start talking about technical debt. But the problem of technical debt if a problem for everyone, not just the devs, because it is reflected in quality and time-to-market. I feel having that conversation about time-to…

> So yes, the core idea of technical debt resonates with developers, but not with business stakeholders. I think that if this is the case, you are presenting it wrong. Business types are very familiar with the tradeoffs of debt financing, you have present it as being paid in effort vs. $ (which after all, have a close relationship) and they will immediately understand that a large technical debt means you can get les…

I think we're largely agreeing, but a fundamental difference is that actual debt you have to pay back, and with technical debt you don't. So inherently you need to start discussing the trade-offs associated with the debt, and not the actual "debt" itself. Technical debt is not some external thing that we are forced to deal with.

Re: All code is technical debt

#166

Earlier quoted context omitted.

> And all code is an asset. No - runnable programs are an asset. The code to produce those runnable programs is a liability. It's a necessary liability for a sustainable software business, as without the code fixing bugs is nigh-impossible (though not theoretically impossible - long-ago programmers wrote and read raw machine code). But, the code itself is not what produces value. That's the code's output. (Yes, you c…

> No - runnable programs are an asset. > The code to produce those runnable programs is a liability. That is total nonsense. So you throw away all your code after you built the program binary to avoid the liability? Don't think so, that code is a massive asset and throwing it away would make continuing the project unfeasible most of the time. > It's a necessary liability for a sustainable software business, as withou…

Code produces value for programmers, but none for end users. Software businesses can thus usually only charge end users for access to the runnable programs (or running programs, in an SaaS business's case).

You're certainly right that when a business's customers include programmers who want to extend or modify the programs, the source code can be an asset. I was mistaken to say categorically that code's never an asset.

On average, though, I think it's still more often a liability on the balance sheet.

It's why we lionize programmers who cut out thousands of lines without removing any features - they reduced the liabilities while retaining all the assets.

Re: All code is technical debt

#167

Earlier quoted context omitted.

Agreed, or similarly: all software has a carrying (maintenance, but I think that has connotations of not including full ongoing TCO) cost. Code is a liability in the sense that it has a non-zero carrying cost. The ideal software implementing a given functionality has as low of a carrying cost as possible. More code, in quantity and complexity, typically means more carrying costs. One of the appeals of SAAS is that th…

> Code is a liability in the sense that it has a non-zero carrying cost. The under-appreciated corollary to that: tests are code, hence tests have non-zero carrying cost as well. > The ideal software implementing a given functionality has as low of a carrying cost as possible. More code, in quantity and complexity, typically means more carrying costs. You understress the complexity point. Higher quantity of code with…

Not all code has equivalent carrying costs. I think the ideal behind tests is that they reduce maintenance costs of the code they cover by more than they add themselves (ideally).

Re: All code is technical debt

#168

Earlier quoted context omitted.

> Code is a liability in the sense that it has a non-zero carrying cost. The under-appreciated corollary to that: tests are code, hence tests have non-zero carrying cost as well. > The ideal software implementing a given functionality has as low of a carrying cost as possible. More code, in quantity and complexity, typically means more carrying costs. You understress the complexity point. Higher quantity of code with…

Not all code has equivalent carrying costs. I think the ideal behind tests is that they reduce maintenance costs of the code they cover by more than they add themselves (ideally).

Same as the aim of the original code is to reduce some costs by more than it would add itself. It’s the never-ending game.

Re: All code is technical debt

#169
post #78

Earlier quoted context omitted.

I don't think the analogy breaks down per-say. Adding features is akin to adding a percentage interest rate. Some add more than others, but the cost of adding a feature is sometimes (often) dependent upon the existing features in the system. Coding & story-writing is a good analogy. If you are inserting a new scene into a large anthology, you need to make sure the new scene fits with everything else. OTOH, writing a…

> I don't think the analogy breaks down per-say. Sorry for being "that guy", but I think you meant "per se".

It's a pity that there is no DM functionality - but this was a huge help for me! This feels like one of those moments where I learned that "yay" & "yea" sound the same, as do "yeah" and "ya" (and importantly, yea != yeah)

Re: All code is technical debt

#170
post #74

Earlier quoted context omitted.

I don't think the analogy breaks down per-say. Adding features is akin to adding a percentage interest rate. Some add more than others, but the cost of adding a feature is sometimes (often) dependent upon the existing features in the system. Coding & story-writing is a good analogy. If you are inserting a new scene into a large anthology, you need to make sure the new scene fits with everything else. OTOH, writing a…

I disagree. Scaling things up has a cost, but not all costs are debt financed. I think the distinction is worth drawing.

It's a useful distinction, but not necessarily at odds with what I'm trying to say. I'm more saying that all code has interest on it. "bad code" is high interest, "good code" has interest that at times is close to zero.

Another response gives the construction analogy (I try to avoid construction analogies for software building, because it's a bad analogy.. but I would digress - story writing & editing I think is a much stronger analogy for software development).

Let's say there exists two townhomes side-by-side (attached building). Let's say you need to replace one. The cost to replace one is a function of its attachments to adjacent buildings and overall build quality. If that other building were not there, all costs associated with compability would be zero. We can draw this analogy much further though, let's say to inspect the electrical lines - you need to remove half of the dry-wall of the existing building that you do not want to even touch. Had the electrical lines been put in correctly, that re-do and re-painting of the interior, the temporary eviction of tenants would all be unnecessary. This is the example of the overhead that comes with code. Anything that is 'attached' to something else is going to be more expensive to do anything with compared to it not being 'attached' to something else. The cost of considering and maintaining that attachment is not related to the value provided by that attachment, but instead to the quality of the attachment.

The 'debt financed' metaphor comes in when instead of doing something right, it's done badly which means anything that is attached to the 'badly done thing', needs to incur a high overhead cost to even just understand the badly done thing (every time, and whether we are even trying to modify it or not - this is high interest code). In comparison, if the system is decoupled and the APIs clean, that other thing might need only a moment of consideration instead (low interest code)

At the end of the day, it is to say - if you are replacing the 11th floor of a building, you have to consider every floor whether you want to or not. That is more expensive than if you did not have to consider those other floors. Considering the impact to 10 other floors is always more expensive than if those floors did not exist at all. The cost of maintaining those floors though is not a fixed cost, not all floors have the same maintenance cost. The maintenance cost of equivalent floors is not even the same, it's a function of the quality of those floors. Even high quality floors can be low-quality if we are trying to do something the designers did not expect. It's very context dependent, but all of which is to say that the value from features is significantly independent of the cost of the thing that delivers those features. The thing that delivers those feature might be very high cost, or it might be low - but it will have a non-zero maintenance cost. Simply reading a list of 10 items is more expensive than reading a list of 5 items. If anything, those extra "5" modules have at least that overhead cost, it's not zero. The debt financing analogy comes in to describe how high that interest rate is. Saying "code" is a cost is essentially just saying that all code has a non-zero maintenance cost (maintenance being the activity of reading, understanding, debugging, modifying, or deleting code).

Post reply on HN