One thing which continuously punches software is the frequency with which tech debt and bad coding are conflated. Let’s commence with this:
Not all tech debt involves bad coding and not all bad coding leads to technical debt.
Often poor code is just badly coded stuff. Assuming it to be technical debt often feels like a more friendly way of just referring to what could be the result of poor implementation or lower piece of work. It is genuinely a misunderstood word.
What you suggest when you talk about technical debt
The thing which differs tech debt from the other hacky code in a project is the idea that technical debt, by meaning, is something which people knowingly or unknowingly enter into. Often tech debt doesn’t happen by accident. It happens when people opt to achieve something otherwise- unachievable instantly in exchange to pay it pack with interest at a later stage.
You’re the developer working on a SaaS product and the sales department is courting one of your most prestigious client- a client that you cannot afford to lose at any cost. The client says that till the time you permit them theme the SaaS software as per their branding, they are ready to give you the project. But the issue here is that your CSS architecture wasn’t designed to include theming at any point. And there isn’t a clean way to include a theme in the codebase.
You make a decision that you will hack a theme in the product for few days. It will be messy and ugly but you cannot lose such a big client because of your inappropriate CSS. This is what you can tech debt!!!
You present the theme, the client agrees and all are happy. However, you do have a decision to take:
• Do you go back and include theming in the CSS architecture?
• Do you continue as it is going? Things are going good, clients is paying, why should you invest time and effort?
While Option 1 is acknowledging and paying out your debt, Option 2 is ignoring the repayments. Option 1 means you have acknowledged that you did your best and once you were free of constraints, you implemented it. Option 2 is simply avoiding your responsibilities to repay the debt and let interest accrue.
If you do not repay the tech debt, there will be these problems:
• Your SaaS product provides theming to one client of yours
• Another client may demand this theme for their product
• You cannot refuse them, nor you can fulfill their demand
• You add in another theme, thereby adding to your present debt
• And along with you have additional interest to pay off
The important point to note down here is that you didn’t write bad code necessarily. You knew you had two ways- the faster way and the right way. The choice of quick route was your choice, but you definitely had the option of a better way. Visit here to know the tips to go the right way to avoid tech debt from accumulating.