Tech Deb

Tech debt compounds. The longer you leave issues without fixing them, the more parts of your codebase become infected with the impacts of the debt. The longer this goes on, the more potentially difficult it becomes to rectify the debt.

  • For this reason, when taking on tech debt we must do the mental exercise of determining how many areas of the codebase will be impacted by this tech debt, and how often it is for those changes to occur
    • ex. In NeverForget, we have the concept of change objects, which represent a database modification that needs to be made. A special kind of change object, a junction change object, is made when a junction table needs to be modified. The code that processes change objects makes the assumption that there is only one type of junction change object, which is for the buckets_nugget table. This tech debt was worthwhile to take on, because to make a truly universal approach to handle all types of junction change object would take significant effort. At the same time, the recognition was made that although it's reasonable to assume that new junction tables will be added in the future, that new new number was likely to be small. It's easy enough to modify the code in a few places when and if this does occur. Thankfully, we can simply document the process and go through it when we need to.

The decision of taking on tech debt should be a group decision. Any time you want to introduce a new piece of tech debt to the codebase, the merits and detriments should be discussed. If it is deemed a worthy debt to take on, then it should be documented in a cental tech debt documentation.

  • develop the habit of reviewing tech debt periodically. It doesn't have to be often (biannually is fine), but team members should be generally aware of the tech debt that currently exists. This is important, because tech debt often serves as a foot gun, creeping up when it's least expected. As a developer, the less surprises you have about a system's behaviour, the better.