Stuie Clarky wrote:
How do you think would be a good way to approach us paying off some of the technical debt?
We have dedicated a whole chapter (8: Repaying technical debt in practice) for this topic. But here I am focusing on one specific model named as IMPACT for planned repayment of technical debt.
Refactoring is best performed as an integral part of the development cycle, i.e., continual refactoring performed whenever fixes or feature additions are made to the software. However, when repaying technical debt in a larger scale, especially in large projects, critical projects, or legacy projects, it is important to follow a structured approach while refactoring. In our book, we describe a process model called “IMPACT” that provides guidance for systematic refactoring in practice. It is a simple model with following four fundamental steps (executed iteratively):
1. Identify/Mark refactoring candidates. Use manual code/design/architecture reviews and use automated code/design/architecture analysis tools to find smells and determine candidates for refactoring. Especially in large projects it is more efficient to run sophisticated tools to identify refactoring candidates (for example, applying tools such as InFusion & Sotograph for design and architecture smells respectively).
2. Plan your refactoring activities. Once you identify smells using design analyzers, clone analyzers, metric threshold violations, or manual reviews, analyze their impact, prioritize them, and prepare a plan to address them.
3. ACt on the planned refactoring tasks. This is the focus of many books on refactoring and is the easiest part to automate as well (to a large extent, you can use automated refactoring support provided by IDEs such as Eclipse/VisualStudio/IntelliJ/.. to perform refactoring tasks.)
4. Test to ensure behavior preservation. Of course it is widely accepted that refactoring should be followed by automated unit tests to ensure that the behavior remains unchanged. But our hard-earned experience in large industrial projects suggests that in many situations it is not enough! For example, in one of the cases involving multithreading, all tests passed for the performed refactoring, but the software crashed in the customer site after a few months. Because multithreaded problems aren't deterministic, relying on testing also isn't sufficient. Using static analyzers, dynamic analyzers and code/design reviews can catch such problems. Hence, we recommend complementing regression tests with at least manual reviews after refactoring.
Stuie Clarky wrote:
It seems silly to me that there are companies/ decision makers out there that would freak out if you told them the rent payment was late, but don't seem to care at all about technical debt.
Stuie
It is interesting to note that the term "technical debt" itself was coined by Ward Cunningham as a metaphor to communicate to non-technical managers (on the cost of not repaying for the shortcuts we take in the development process.) We have also come across situations where decision makers have commented that "refactoring is needless rework!" and we wrote an article on that (see
http://www.designsmells.com/article.php?id=7)... So, your scenario is not at all uncommon.