<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Hannu Kokko on Medium]]></title>
        <description><![CDATA[Stories by Hannu Kokko on Medium]]></description>
        <link>https://medium.com/@hannukokko?source=rss-6182572410b0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*tWC-nxCohjGPtVOc.</url>
            <title>Stories by Hannu Kokko on Medium</title>
            <link>https://medium.com/@hannukokko?source=rss-6182572410b0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 22:46:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hannukokko/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Technical Debt — Some Points of View]]></title>
            <link>https://medium.com/@hannukokko/technical-debt-some-points-of-view-25981133e006?source=rss-6182572410b0------2</link>
            <guid isPermaLink="false">https://medium.com/p/25981133e006</guid>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[product-development]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[technical-debt]]></category>
            <category><![CDATA[refactoring]]></category>
            <dc:creator><![CDATA[Hannu Kokko]]></dc:creator>
            <pubDate>Thu, 16 Apr 2020 05:10:16 GMT</pubDate>
            <atom:updated>2020-04-16T05:10:16.899Z</atom:updated>
            <content:encoded><![CDATA[<h3>Technical Debt — Some Points of View</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*BgRZfbU7Jyyaqhp4CaW65g.jpeg" /></figure><p>Technical debt occurs in many, if not most software development projects. Technical Debt is an aspect of system and code quality. Here are some points of views on it, how to live with it and how to control it. The subject has fascinated me for a long time. The term was <a href="http://www.youtube.com/watch?v=pqeJFYwnkjE">invented by Ward Cunningham</a> and I remember first encountering the term in <a href="http://martinfowler.com/bliki/TechnicalDebt.html">Martin Fowler’s presentations</a>. There are many blog posts (<a href="http://blog.crisp.se/2013/10/11/henrikkniberg/good-and-bad-technical-debt">for example a really good one by Henrik Kniberg</a>) and presentations and at least one book on the topic. This post is mostly written from multi-team, multiyear product (or system) point of view.</p><p>There are many varieties of technical debt — the following ones are often encountered</p><ul><li>allowing your software get out of shape</li><li>allowing your software to depend on too old third party software</li><li>allowing your codebase to gather unreasonable amount of code that is built with bad coding practices</li></ul><p>Most of the observations below are for system that lives long or large life — systems that needs care by multiple teams, teams in multiple sites or over multiple years.</p><p>It can be hard to measure the technical debt or its effect on product development. Individual classes or modules might look pretty much ok. The cumulative effect can still be devastating to your velocity especially if the lifespan of the software is long. You might also encounter a situation when you just have to pay back the debt at very inopportune time.</p><p><strong>Getting out of shape</strong></p><p>Software gets out of shape with every change done to it if you are not observant. Every change is an opportunity to refactor the software for it to be easier to change in future. If you have not done proper amount of <a href="http://www.refactoring.com/">refactoring</a> your codebase may get so out of shape that changing or adding features is so slow that it hurts your time-to-market and effort per feature is not competitive.</p><p>Software can get out of shape at both macro (system) and micro (application, service, package, class, method) level. At both macro and micro level you might have debt in form of quick and dirty solutions that will not stand the test of time. Those might make it harder or costlier to change or scale the system or code. There might be inefficient, error prone or hard coded parts that will work in the current situation but will need to be changed when the usage or system expands. At macro level system might contain multiple libraries, frameworks or approaches for solving the same problem (multiple UI frameworks, database frameworks, messaging frameworks, multiple databases and so on). This might cause inefficiencies in doing changes to the system by needing people to learn multiple ways of doing the same thing or needing to do extra work in filling the gaps — it also adds extra libraries to take care of.</p><p>You might also have homegrown code for historical reasons when open source or commercial library would fit better now. <a href="http://perfcap.blogspot.fi/2011/08/i-come-to-use-clouds-not-to-build-them.html">Adrian Cockroft from Netflix</a> said it well: “Do not do your undifferentiated heavy lifting yourself” already many years ago for the cloud but it applies to all the capabilities not only cloud.</p><p>Constant refactoring is a way of keeping the software in shape so you need to constantly reserve time for that. <a href="https://www.oreilly.com/library/view/97-things-every/9780596809515/ch08.html">Boy Scout Principle advocated by Uncle Bob </a>is a good way to work. You really should always leave the code in better shape than you found it.</p><p>The cost of refactoring in the large (across many classes / modules) might be high if you do not have extensive and fast test harness to test whether the change really works. The temptation to do just the small change for the behavior of the individual method or class that is needed is high.</p><p>Refactoring the code might require changing many classes so the effort and risk to do that might be higher especially if the code is new to the developer or team and test coverage is low. Risk of not refactoring increases also when rapid changes to the code are needed due to project deadline pressure or urgent customer problem. Inexperience in development skills or at the particular language &amp; tooling also add to the risk of getting software out of shape. Code reviews, pull requests and ownership of critical code areas are some ways of tackling the quality of changes. There might not be proper tools available for refactoring or automating the tests so some investment on tool development can be beneficial. Constantly adding to the test coverage and taking care of test code by refactoring needs to be part of every sprint’s work.</p><p>Knowledge of <a href="http://mikamantyla.eu/BadCodeSmellsTaxonomy.html">code smells</a> (from Martin Fowler’s Refactoring ), techniques from Michael Feathers’ book Working with Legacy code and refactoring tools in most IDE’s can help. Use of tools like Lattix or Structure101 can help in detecting whether your software is in proper shape. The tool SonarCube has interesting metrics for measuring the cost of technical debt for code level bad practices and of course large variety of metrics for quantifying your code quality. Currently the tools cannot provide a 100% solution even within one language but they can certainly be helpful. The popularity of using multiple languages within modern stacks makes use of refactoring tools globally in your code more difficult.</p><p>Test driven development can be a good practice to use as well but requires strong discipline and can be time consuming if the code base is already legacy. If your code base is already legacy (has little or no tests) the cost of refactoring in the large and TDD needs to be evaluated against business value, not chanted as a mantra.</p><p><strong>Allowing your software to depend on (too old) 3rd party software</strong></p><p>This chapter mostly relates to product software in large environments because those usually have longer lifespan than small custom projects.</p><p>One part of productivity comes from letting others do the work for you — at any time most of the innovation in IT domain is anyway happening outside your company. This means changes that can help you be more productive happen every day/week/month in the form of new versions of especially open source but also commercial software updates.</p><p>One of the key enablers for agile development is continuous integration — taking changes in constantly and testing them. You may not want to take third party software in at every patch and release they deliver but you should take them in at sensible intervals. What is a sensible interval: it is a reasoned compromise of the effort and risk of taking a new version and not taking it and having to take it in at awkward timing later.</p><p><strong>Effect of delaying library upgrades</strong></p><p>If you delay too long you will find out that this</p><p>· may cause additional work in the form of workarounds</p><p>· may cause incompatibilities of some other software that needs to work in your runtime environment</p><p>· you may lose the productivity benefits of the innovations of this version for the duration of delay (for example: speed, convenience, new features, better abstractions…)</p><p>· you may need to use older tools which are less effective</p><p>· old versions of libraries might contain security holes</p><p>· the library has fallen out of maintenance</p><p>· the porting effort might be larger</p><p>· if you are forced to upgrade instead of choosing to upgrade you might block development of features that directly add customer value</p><p>This kind of technical debt is easy to accumulate. Advantages of doing the version change can be hard to quantify in business value. Some 3rd party software change so seldom that people might forget that a change might be needed if they are focused only on their current sprint. In addition the effect of living in the current version of the software is affecting most development activities, there might be little understanding what would be the everyday benefits of the new version. There might also be bad memories of large effort spent on previous version upgrade.</p><p>You might find using 3rd party tools to detect changes in open source libraries — for example Veracode and / or Whitesource. Tools might not always detect everything (for example commercial framework versions) or might not support all the languages you are using so you need to have in place a way to manually go thru those.</p><p><strong>How to handle dependencies to libraries</strong></p><p>One should build dependencies to third party software in a sensible fashion so that you can switch to a new version or even completely new library with reasonable effort. One might want to try out the new version parallel with the old one already as soon as it is available. This would also give visibility to benefits. This of course requires that you can afford to have the porting effort to new library done as a spike.</p><p>Being able to switch easily to completely new library is a balancing act as too 3rd party independent approach can fail to take advantage of the key attractors of the 3rd party software. One way to handle this could be to define at system level which of the 3rd party software you will not change and which you might. For those that you might want to change run tests with at least two different versions constantly in your continuous integration environment.</p><p><strong>In brief</strong></p><p>Keep the technical debt in control — it can be used as a tool — borrow just the amount of debt what is needed for just the amount of time you must loan it for. Borrow too much or for too long and you can end up in trouble.</p><ul><li>remember periodically to evaluate whether refactoring in the large would be needed</li><li>be conscious of the reasons and consequences when you add libraries and frameworks to your code</li><li>refactor in the small and increase test coverage constantly</li><li>consider how to keep your changes in control. Code reviews, pull requests and ownership of critical areas have proven to be useful</li><li>keep your libraries current and decide how deeply you want to depend on them</li><li>use of tools can help both in refactoring and detecting upgrade needs</li></ul><p>I would be interested in other people’s experience in how to detect whether your software is in shape and how you are handling technical debt.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=25981133e006" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>