48

Disclaimer: I don't expect zero tech debt. In this post, technical debt problem refers to severity that has been causing negative impact, say productivity.

Recently I was thinking to build a tool to automatically generate tech debt report from issue tracker - introduction rate vs cleanup rate over the time. Apart from the total, there'll also be numbers broken down by project team and by manager, so that managers could easily get insight on current tech debt level, without delving into issue tracker and details (such tool might already exists, I need to research to avoid reinventing wheel).

Motivation wise, tech debts have been snowballing for years. Whenever developers increase project estimate to include tech debt clean up, more often they will be asked to remove those numbers from estimate, so refactoring/clean up works usually ends up indefinitely postponed. I hope the periodic report will help to improve tech debt management issue.

However, on second thought, I wonder will increasing visibility of tech debt level really helps to raise priority. Generally, is tech debt issue an org culture issue or just lack of tool/insight? I supposed there's no universal answer, I wonder which is the more common cause. What's your experience?

--- Update 2/28

Clarification: I believe most management are intelligent enough to realise there's impact, especially after teammates reported pain in terms of project productivity. My gut feeling is that, they don't have a concrete picture about how serious problem is. My idea is to help management to gain clearer picture, via two steps:

  1. Have techdebts logged, and have their impact tracked. (there are challenges, but that's beyond scope of this question)
  2. Have a report for introduction rate vs cleanup rate (there could be further breakdown by high/low impact).

My curiosity comes from, will these efforts help or are they just waste of time, generally speaking (not specific within my org) - hence the question what's your experience. If it's org culture issue, then most likely these efforts won't help much.

shiouming
  • 655
  • 2
    Instead of analysing the bug tracker, analyse the source code repository. You can see how complex the software is, how often the complex parts are being edited, and how many and who are across the contents of each file. Place that in some pretty graphics and you can highlight why 5 years ago code change was so much easier than now. – Kain0_0 Feb 26 '20 at 05:10
  • Good idea. We do have static analyser scanning repo as part of build. Once false positive rate improved to acceptable level, it's worthy to find a way to integrate that result into report. Doubts: (1) The primary concern is about more complex debt such as design-implementation gap/shortcut implementation. To auto detect from repo, don't we have to manually document such debts as TODO and check-in? (2) Do code analysers support custom scripting? We need to be able to correlate offended code with developer and their team/manager, as the same product is co-owned by multiple managers. – shiouming Feb 26 '20 at 05:40
  • 1
  • You could do that. How about this: measure how complex a file is (any metric will do), and measure how often that file changes. You will find that this will clearly identify where the most deadly tech debt lives. 2) Depends, that should be able to give you line information in their reports which can be correlated against line information from source control. 3) The import thing to look at isn't a particular commit, but how the source has changed over time. You can see how quickly dangerous files are growing/shrinking, and by team: where the knowledge boundaries are.
  • – Kain0_0 Feb 26 '20 at 06:15
  • 25
    This seems to assume that the technical debt is known and recorded - but its usually like an iceberg, 90% of it is out of sight and only becomes known when it causes a problem. – afaulconbridge Feb 26 '20 at 14:41
  • 12
    "tech debt clean up, more often they will be asked to remove those numbers from estimate"

    That is a red flag right off the bat. It's a culture issue. It's a trust issue. It's a management and leadership issue.

    – Brandon Feb 26 '20 at 18:17
  • IMO, a software developer owns their estimate. Stick to your estimate. Do things correctly. If someone bullies you into cutting corners and/or lowering your estimate, say no.

    The only person you can't say no to is your boss. If you get to a point where your boss is demanding you do bad work, then it's time for a new job.

    – Brandon Feb 26 '20 at 18:23
  • 3
    Cleanup rates can be gamed. Google has over 50,000 improperly closed bug reports in Android alone. – StackOverthrow Feb 26 '20 at 20:41
  • 9
    My rep is too low for an answer but I feel that flaters answer, good as it is, is too verbose to really bring the crux of the matter home: Management loves cowboys The more you prioritize short term gains over long term viability, the more you will be rewarded. That senior dev that writes spaghetti code and dumps the fallout on your desk? He's gonna get a promotion, cause he "understands the buisness". – Douwe Feb 27 '20 at 10:32
  • @afaulconbridge: Extending your iceberg example, I don't need to see the other 90% of the iceberg to know it's there, even though I don't know its exact shape. Similarly, you're correct that the majority of the problematic situation isn't known about, but its existence can be inferred based on experience and being aware of the other 10%. Planning wise, management doesn't care about the shape of the iceberg even if they were fully willing to address it. They care about the existence and approximate size. – Flater Feb 27 '20 at 10:45
  • [Insert "Why Not Both?" meme here] – Mason Wheeler Feb 27 '20 at 17:35
  • How will you do the measuring? – Thorbjørn Ravn Andersen Feb 27 '20 at 22:11
  • Unless legacy software costs you money every year - interest - it's not technical debt, it's just legacy software. The reason to pay tech debt down is to reduce ongoing and future costs, nothing else. Software doesn't rust. – Ben Feb 28 '20 at 09:10
  • @afaulconbridge in a lot of cases it is already enough to track the underlying semantic/business logic technical debt, e.g. needing to support some legacy protocol in this and that module, which a) explains why a huge iceberg of technical debt might be in the code and b) can act as the trigger to clean up that part once the requirement is no longer valid. Without such tracking indeed all of that iceberg becomes invisible until one looks at that module and drowns. – Frank Hopkins Feb 28 '20 at 14:24
  • The problem with refactoring technical debt is that what qualifies as technical debt is often in the eye of the beholder. One developer sees a perfect class, the other sees a design issue. And refactoring itself means that they functionality that touches that code should be completely re-qaed. A lot of technical debt expeditions end in bugs going into production because not enough testing and qa occurred, – Mark Rogers Feb 28 '20 at 17:08
  • @Kain0_0 That's a pretty good idea; Source and revision complexity does sound like it would be a great metric for tech-debt. That's certainly the case in what I've experienced as well, when you're having to make complex revisions in complex files or methods then maybe it's time for a some housekeeping.. – xtratic Feb 28 '20 at 19:39
  • 1
    @xtratic I can't claim the idea as mine, just can't remember where I got it from. I think it was the Code as a Crime Scene idea I saw a few years ago. But anyway yes, it aligns very well with anecdotal experience. Which leads me to the opinion that all code is Technical Debt. The difference is that some of it charges exorbitant interest and transaction fees, while the rest of it is quite happy to sit there for pennies every few years. – Kain0_0 Mar 01 '20 at 23:55