The Hidden Cost of Shortcuts
In the wide worlds of software and application development, technical debt occurs often. Under tight constraints, developers must take calculated shortcuts to complete projects quickly.
However, over time, these shortcuts will accumulate into “debt”, at least some of which you’ll need to “pay back”. The debt itself isn’t inherently terrible — it’s what that debt can become that is troublesome: Serious issues can accumulate from this debt, and that’s work you must address.
So, in this comprehensive article, let’s take a look at technical debt and see how it works.
What is technical debt?
Software developers and engineers are routinely forced to compromise best practices and perfect code with the real world of tight deadlines, immediate business needs and changing requirements.
Technical debt is the response to this problem: developers make trade-offs and take shortcuts in order to meet the project's deadline. This is sometimes known as the "build now, fix later" mentality.
But, you may be asking yourself, why build something knowing it will break down later? Isn't it better to build it right in the beginning?
Technical debt is the concept that a simplistic, poorly understood, or “quick and dirty” solution to a software development problem, instead of a more thorough, robust solution, comes with substantial, hidden costs that organizations must pay later. These shortcuts come in many forms:
- Using outdated libraries and frameworks.
- Writing poor quality code.
- Ignoring proper testing and documentation practices.
While they may seem like a quick fix in the short term, they can have severe consequences in the long run.
(Learn about developer productivity engineering or explore common DevOps metrics.)
(Programmer Ward Cunningham originated the definition of technical debt in 1992, comparing the development work engineers handle to the financial system: “interest” that you accrue from tech debt, as with monetary debt, will accumulate, making the initial problem increasingly costly to fix as time goes on.)
Technical debt should be used for good
Tech debt may sound like a bad thing, and in many cases it is. Yet, when managed properly, technical debt can actually be a useful tool to push development forward.
Minimum Viable Products (MVPs) are often developed with a significant tech debt load attached — and with the expectation that they will need to be completely refactored or reworked if the MVP proves to have ongoing value.
Tech debt is in part a recognition that doing something fast and doing something right are rarely in alignment.
The impact of tech debt on your business
- Dissatisfied users -> loss of revenue. Tech debt can appear as bugs, which in turn lowers the user experience. This ultimately translates to increased expenses (due to an increased need for customer service) and lower revenues (due to customer defections).
- Longer development cycles & more developers needed. As tech debt worsens, it becomes harder for developers to work within the existing code base, splitting time between developing new features and correcting old ones, which slows the software development lifecycle and delays time to market.
- Lower productivity, limited innovation: When tech debt is severe, developers need to continue servicing the issues instead of devoting time to building innovative new features.
- Potential security problems. Tech debt can leave you open to more vulnerabilities. These, in turn, can be exploited by threat actors or insider threats. The worst thing, a security breach, is laden with financial risk, including direct loss of assets, loss of business, and the risk of regulatory fines and penalties.
Technical debt examples: The consequences of our decisions
Let's play out these concepts in a parallel example: housebuilding. Similar to software developers building out an app, imagine you have to build a house from scratch. You have a tight deadline to meet and, of course, limited budget and resources. You decide to make a few calculated shortcuts and compromises during the construction process. These shortcuts — similar to technical debt — may involve:
- Opting for lower-quality materials.
- Streamlining certain construction methods.
- Prioritizing speed over certain design elements.
While these decisions you've made can help meet the deadline, it is important to be aware of the potential long-term consequences and the need for future renovations or improvements to address any shortcomings resulting from these choices.
Comprehensive testing & code reviews
Instead of investing the extra time and money in a solid foundation, you need to save some cash. You decide to use lower-quality concrete when pouring the foundation — even though you know it can weaken the structural integrity.
So, now, the foundation is adequate to support the house, it's just not as strong and durable as it could be. By cutting corners on your foundation, you may have structural issues, cracks causing water damage, and other costly repairs in the future.
In software development, rushing to meet a release deadline without conducting comprehensive testing or code reviews is comparable to taking shortcuts when laying your foundation. While the code may appear to work initially, it runs the risk of harboring hidden bugs and inefficiencies that could potentially cause problems down the line.
Optimizing & streamlining code
As you build the walls, you opt against energy-efficient insulation and windows, choosing instead cheaper alternatives that may not provide the same level of energy savings. Yes, this choice might reduce your initial costs in the short term—but it may have long-term implications.
Over time, the higher energy costs associated with less efficient options could end up outweighing the initial savings, leading to increased expenses and a less sustainable approach.
In software development, neglecting to invest in optimizing and streamlining your code can have similar effects. Over time, it can result in increased resource consumption, leading to slower performance and higher operational costs. This can impact not only the efficiency of your application but also the overall user experience.
(Learn about sustainability in technology: reduce, reuse, recycle applies here, too.)
On-going maintenance
By neglecting routine maintenance tasks — addressing small leaks or cracks — you unintentionally spped up your home’s natural deterioration. Over time, these seemingly insignificant issues can worsen and lead to more extensive damage, eventually requiring major repairs that could have been avoided.
Taking proactive measures to promptly address these maintenance needs can help preserve the integrity and longevity of your home.
The same can be true when you ignore regular maintenance and updates in your software, like security patches or feature improvements. This can lead to increased vulnerability and the need for extensive, time-consuming updates in the future. By staying on top of routine maintenance, you can prevent issues from snowballing and keep your software running efficiently.
Types of technical debt
The parallels between constructing a house and developing software hopefully gave you some clear and valuable insights into why a software developer might take on technical debt during development.
You might have also noticed that the reasons for taking on the debt can vary. As such, we can categorize tech debt into three general categories.
Intentional tech debt
Created deliberately, intentional debt help you get a project to the finish line. Here, your team is saying that it will accept some level of instability, insecurity, poor performance, user dissatisfaction or some other type of problem in exchange for launching the product sooner.
This form of tech debt is risky, but it is known risk that all stakeholders can document, track and remedy at the appropriate time.
Unintentional tech debt
This form of tech debt arises from sloppiness, unexpected complexity, or a lack of technical expertise in software engineering. When management unexpectedly moves a shipping deadline up a week, causing engineering teams to cut corners, incompletely test their products or introduce inadvertent bugs into the product, unintentional tech debt is often the result. This type of tech debt may be documented, but usually it is not because it often remains unknown for a while.
Unintentional tech debt can still be remediated, but the development process will need to be adjusted accordingly, building time into the sprint system to revisit code that has already shipped.
Environmental tech debt
This last category of tech debt is one that has accrued over time and without active effort. A program may be developed perfectly and launched to great acclaim, but if it is not actively managed, environmental tech debt is likely to occur because the environment will be in flux. For example:
- An operating system will be patched, introducing inconsistencies and incompatibilities.
- A redesign or reengineering of a less supported part of your website can mean there are a lot more things to fix than if the website had been properly maintained throughout its lifecycle.
- Upgrades to a vendor’s API or a required software library may introduce compatibility issues.
Failure to keep up with these changes will inevitably result in an application that no longer functions properly, and like any other form of tech debt, it is a problem that gets worse over time.
Paying off technical debt: Best practices for a necessary investment
While technical debt can be an acceptable quick fix to meet tight deadlines or reduce costs in the short term, it ultimately leads to hidden costs and long-term consequences for organizations: that means it’s something you need to plan for, and not forget about — these things can go on to become vulnerabilities, threats or other risky areas ripe for threat actors to take advantage of.
Here are some of the best practices for addressing tech debt in the organization:
- Track tech debt meticulously. You can’t fix what you can’t see. Be sure to monitor, track and prioritize tech debt, just as you would with any other development challenge.
- Separate good and bad tech debts. Categorize tech debt based on whether it was intentional (good) or otherwise (bad. This will likely help you prioritize the biggest problems.
- Prioritize the biggest problems: If tech debt is causing an application to fail or is exposing a security flaw, you need to address these issues first. Questionable code that has less of an impact on performance, for example, may not need immediate attention.
- Explicitly include tech debt in your agile or Scrum process. The goal is to ensure that paying off tech debt is part of the daily development process and isn’t indefinitely relegated to the backlog.
- Set quality standards and adhere to them. If coders are deterred from shipping sloppy code, accidental tech debt becomes easier to avoid and easier to manage.
- Reward maintenance work, too. It’s common for organizations to call out software developers who release a flashy new product to the market. Don’t ignore the people working hard to remediate and maintain functionality of existing software projects and products.
- Avoid sudden schedule changes. Tech debt is often unavoidable if management continuously changes the rules on developers or moves deadlines. Provide realistic schedules, methodologies and realistic workloads to keep tech debt manageable.
Just like how a homeowner would eventually need to spend money on renovations and repairs due to rushed decisions during construction, software development teams must allocate resources toward addressing technical debt.
Cutting corners, skipping best practices, and not addressing technical challenges as they arise can lead to a growing technical debt that hinders your project's long-term success and increases the overall cost of ownership.
What is Splunk?
This posting does not necessarily represent Splunk's position, strategies or opinion.