Live data from Hacker News

Towards an understanding of technical debt

laughingmeme.org

11–20 of 26 posts

Re: Towards an understanding of technical debt

#11
post #10
post #9

(This is not disagreement with the original post, but further musings.) One of the other problems with the technical debt idea is, debt relative to what ? Since I think most people do not consciously instantiate an answer to that question, I think most of us non-purposefully choose by default a comparison to an idealized perfect code base that is somehow perfectly correctly factored, yet also as fast as completely op…

>OK, but that was never on the table, though. What I described isn't even possible to manifest, and even if you back it down to what is at least sort of possible, you don't have the resources to manifest it before you simply run out due to lack of customers. You're not really taking on "debt" if you fail to manifest that, any more than you are taking on "debt" if you fail to make every possible dollar you could if yo…

"I don't think that's such a problem, though. The "perfect" codebase should be the baseline to which you compare your current debt."

What I described isn't perfect; it's impossible. It destroys the utility of the idea of technical debt if that's the baseline, because it means that all choices are between "really bad" and "really bad".

"Aside, the first and last lines of your comment reminded of this post:"

Oh, certainly. But people do tend to assume that all comments that are not completely complimentary are intrinsically disagreement, and, well, let's be honest... statistically, it's true, so it's hard to be too annoyed that people's brains make that inference by default.

Re: Towards an understanding of technical debt

#13
Technical debt is usually a result of poor planning, a misunderstanding of requirements or complete lack of requirements, or trying to do too much when you should have built an MVP with limited scope.

I think the SE Radio episode on Technical Debt http://www.se-radio.net/2015/04/episode-224-sven-johann-and-...

Does a good job of explaining why technical debt occurs, how to avoid it and when technical debt is ok.

I strongly recommend everyone listen to this episode. It's quite insightful.

Re: Towards an understanding of technical debt

#14
I combat this by ensuring that it is perfectly acceptable for a change to consist primarily of deletions.

You don't want a culture that only adds features, forever growing the pile. Developers need to be free to identify and aggressively throw out old functions, old tests, obsolete documentation or anything else. This means that a list of deprecated items should be expected in most projects, and mean it when you warn other teams that you plan to completely remove those items in 6 months.

This freedom to delete doesn't mean that total rewrites will be encouraged. Rather, it acknowledges that in an evolving system, some things do become obsolete and mistakes will be found (despite highly competent architects) that ought to be corrected. Ultimately it frees people to easily identify and maintain only what really matters.

Re: Towards an understanding of technical debt

#15
post #8

There's a lot of ways to parse technical debt. The simplest one I've found, while it has its shortcomings, is this from a Deloitte article: They state, in general, it costs $3.61 technical debt / line of code. "Technical debt is a way to understand the cost of code quality and the impacts of architectural issues. For IT to help drive business innovation, managing technical debt is a necessity. Legacy systems can cons…

Well the problem with that analysis is, what qualifies as a "line" of code?

An efficient algorithm may be punished over an inefficient one. An optimal one-liner can certainly cost a lot to develop (maybe you need a smart engineer, a lot of testing and a lot of time to figure it out) yet it would appear to be cheap.

Then there's just textual differences. It depends on the programming language. And it can be different even in the same language...

This function has one line:

    void f() { ... }
This function has 5 lines:

    void
    f()
    {
       ...
    }
This function has many lines:

    /*
    
    */
    void
    f()
    {
       ...
    }

Re: Towards an understanding of technical debt

#16
Technical debt is a very artificial concept. With real financial debt one knows immediately the exact dollar amount, the interest rate, the payment terms and so forth. There is usually no ambiguity or judgment. In contrast, technical debt is based on theories about software development and uncertain predictions about future changes to the software. As the old saying goes: "prediction is hard, especially about the future."

As a business, if I buy a computer on a company credit card, I know immediately that I owe $1200.00 at 23 percent interest per year. In contrast, if I develop a piece of software and decide to use global variables to speed up development, I may immediately gain a mythical man-month in development time BUT I have no idea how much it may slow me down in the future if at all. Sometimes global variables are the way to go and development will be consistently faster for the entire lifetime of the software compared to using local variables. This tends to happen, not surprisingly, when the data in the global variables needs to be used widely throughout the program.

Re: Towards an understanding of technical debt

#17
post #8

There's a lot of ways to parse technical debt. The simplest one I've found, while it has its shortcomings, is this from a Deloitte article: They state, in general, it costs $3.61 technical debt / line of code. "Technical debt is a way to understand the cost of code quality and the impacts of architectural issues. For IT to help drive business innovation, managing technical debt is a necessity. Legacy systems can cons…

Well the problem with that analysis is, what qualifies as a "line" of code? An efficient algorithm may be punished over an inefficient one. An optimal one-liner can certainly cost a lot to develop (maybe you need a smart engineer, a lot of testing and a lot of time to figure it out) yet it would appear to be cheap. Then there's just textual differences. It depends on the programming language. And it can be different…

You are pointing out that "lines of code" is a terribly imprecise metric. That is TRUE, but not HELPFUL. We all know that "lines of code" is a terrible metric. And for only $100/hr, for a few hours you can hire an expert to evaluate one file from your codebase and determine its size in something more reliable -- "function points" or some other system that you devise.

The thing about "lines of code" is that it's CHEAP and EASY. It is also WAY better than having nothing. Which system is more complex, system A written in C++ 2003 or system B which was written Java in 2013? Which system is more complex, System C which is 200,000 lines or system D which is 10,000 lines? Even if I don't tell you how "lines" were defined in those two estimates, you can still tell more about C and D than about A and B.

"Lines of code" is a terrible metric, which can give only order of magnitude estimates. But that makes it enormously better than no metric at all, or a complex metric which we haven't actually measured.

Re: Towards an understanding of technical debt

#18
post #8

There's a lot of ways to parse technical debt. The simplest one I've found, while it has its shortcomings, is this from a Deloitte article: They state, in general, it costs $3.61 technical debt / line of code. "Technical debt is a way to understand the cost of code quality and the impacts of architectural issues. For IT to help drive business innovation, managing technical debt is a necessity. Legacy systems can cons…

Well the problem with that analysis is, what qualifies as a "line" of code? An efficient algorithm may be punished over an inefficient one. An optimal one-liner can certainly cost a lot to develop (maybe you need a smart engineer, a lot of testing and a lot of time to figure it out) yet it would appear to be cheap. Then there's just textual differences. It depends on the programming language. And it can be different…

You missed the point I think.

Ideally, you want minimal technical debt. Any code you develop should aim for minimizing technical debt. Technical debt is not about evaluating the value of a line of code or program, but about it's potential maintenance cost.

I work at a large organization that maintains over 300+ modules of code and custom software programs, varying in size from a thousand lines of code to massive ones. Any one of which can be sold at any time, and all of which is supported in some fashion or another, and all of which should be able to work together.

You need some sort of metric to see where to invest ones time. If you don't manage the technical debt, everyone spends all their time doing tech support.

So, how the helpful concept of technical debt is evaluating where to put effort into improving the code base, and evaluating potential support cost of adding more modules? Lines of code, while flawed, provides a pretty good starting point.

Re: Towards an understanding of technical debt

#19
As en engineer I understand and agree with what the author is saying: technical debt is a loaded term and it feels wrong to throw it around liberally to cover things that should have discrete and distinct meanings. However: the term "technical debt" is not for engineer-to-engineer communication: it is for communicating to management and other non-technical actors - and in that role the term perfectly suits its purpose.

To understand why, let's consider a normal interaction with a corporate legal team. The content team submits some copy to the legal team for approval and the legal team needs to communicate to the content team that they can't make the claim they are trying to make about the product. Now, it's more true in the technical sense for legal to say things like "Section 3 paragraph 7 of the Fair Sales Act states that Consumer Entities as defined in Section 1 Paragraph 3 may not represent their products in such a way as to potentially mislead a Purchaser as defined in Section 2 paragaph 9. Furthermore this issue has been thoroughly litigated at both the federal appellate and Supreme Court levels which have reinforced those interpretations unfavorable to the aforementioned Consumer Entity." But that wouldn't be great for either department. It's more useful for Legal to just say "You can't claim that - we'll get sued." In a similar way, it's more useful as a software engineer to just say "that decision will add to our technical debt" than to try and discuss the minutiae of how a certain bad architecture decision will make the system "resistant to change". As a fellow engineer, I'd rather have the latter conversation with you and the one about "technical debt" with my business manager.

Re: Towards an understanding of technical debt

#20
post #4

I feel like this post misses the point of the whole "technical debt" analogy. They way the author talks, it seams like their org. uses it as a catch-all term for complaining about the code base. But that's never been the point of the term. "Technical debt" is the justification for process and development decisions that require more time up-front but will save time in the long run (especially as a term to communicate…

I think it's more complex than that. If you look at a practice like Unit testing, you tend to find some organizations are having success with it and others not. Some of them see it as a "waste of time" and others see it as a "timesaver". How the practices are implemented are as important as the practices you decide to use. If the unit tests for your project take 3 minutes to run you may have a problem. If you are wri…

All Unit tests take 3 minutes to run? Wow, running all 200+ unit tests would take at least 1 hour for me
Post reply on HN