Software companies are eager to jump on the AI bandwagon, but navigating the maze of options is complex. An immediate opportunity lies in deploying AI-based tools to improve internal processes. Focusing on AI-driven productivity advancements helps companies to boost the efficiency and effectiveness of their teams while narrowing the scope of AI use cases. Such an approach might be especially helpful in reducing technical debt.
R&D teams create tech debt when they make coding or design decisions to expedite product delivery, knowing the code will later need to be updated. On average, engineers spend one-third of their time addressing technical debt, a figure which rises based on the age and quality of the code. Tech debt is similar to financial debt in this manner—it accrues interest the longer developers wait to fix it. And doing so isn't cheap.
Recent research suggests that the cost of technical debt goes beyond maintaining legacy code. U.S. companies pay as much as $1 trillion per year to resolve loss of service and data breaches, along with indirect impacts such as reputational damage and regulatory scrutiny. A significant service or security issue also temporarily redirects all development resources to mitigate the issue, at a time when large-scale layoffs in the tech industry are leading to a shrinking workforce.
Technical debt needs to be addressed both for cloud-based applications (for reliability) and for on-premises technology (for speed), not just to prevent scenarios like data breaches and ransomware but also to stay competitive as companies launch faster and more efficient software products. Its reach can be both internal (i.e. when your own code base is outdated) or external (i.e. third-party applications and integrations that need updates).
Given these challenges—can AI's recent advances play a leading role in keeping code up to date?
Size of the prize
Beyond what-can-go wrong concerns, how big is the problem of legacy code really? R&D teams spend at least 30-50% of their time on maintaining legacy code, even higher for larger organizations. As such, it's no surprise that 27% of tech executives surveyed for AlixPartners' second annual Tech Sector Growth and Performance Report said modernizing applications is a key strategic focus, even amid the latest wave of AI excitement.
According to research, code maintenance
is the largest budget item for most software organizations—by 2025, CISQ estimates nearly 40% of
IT budgets will be spent on maintaining tech debt. On average, it costs around $3.60 to fix each line
of line of old code—and not only is the amount of legacy code
growing, but the U.S. Department of Labor reports that median
hourly wages of computer programmers have also grown more than 15%
over the last five years, despite the large number of layoffs in
the sector.
For some sub-sectors, like business-critical financial services products, application or service failures due to technical debt can cost upwards of $5 million an hour. This makes legacy code an exceedingly expensive asset to both maintain and refactor. Enter AI.
How artificial intelligence can reduce tech debt
As the cost of attracting top tech talent rises, the cost of technical debt is expected to rise further as well. Choosing between higher labor costs or technical debt may seem like a lose-lose situation, but AI offers a solution to these challenges.
AI-based refactoring automates many of the processes involved in manual code refactoring by leveraging machine learning (ML) and natural language processing (NLP) functionalities. AI can analyze large applications to identify code trends and inefficiencies, resulting in faster and more consistent code generation. It can help streamline code by improving readability, making code modular (and therefore reusable), and optimizing program performance alongside databases. This refactoring can even outperform "born-in-the-cloud" code written by humans.
AI can also act as a developer assistant by flagging outdated code and deprecated libraries, generating test cases, running visual and performance testing, and conducting security vulnerability assessments. An increasing number of vendors can now help companies simplify the refactoring process, but very few in the tech space have fully incorporated AI into their software development processes.
65% of tech leaders, according to our industry survey, say developing AI capabilities is a key R&D priority. Investing in AI comes with a hefty price tag—but when we analyzed the benefits and ROI driven from implementing AI-based code refactoring, we found companies may reap the following benefits:
- Time dedicated to code refactoring: 1-3x reduction when using AI
- Labor costs dedicated to code refactoring: 15-20% reduction when using AI
On top of the above, AI allows companies to free up engineering capacity that can then focus on new products, reducing the time needed for future refactoring. Therefore, we believe that initial investments in AI and the time required to learn and deploy AI coding tools are well-balanced by long-term gains in improved code quality that can run natively on the cloud.
When to utilize AI-based code factoring
To make this decision, companies should answer the following questions:
- Does certain software need the additional scale and flexibility that updated code provides? Or would it be better to sunset the offering and transition customers to new products?
- Does the ROI driven from refactoring product code for a given initiative justify the impact on free cash flow? Not all legacy products pose a revenue risk or require high support costs.
- What is the right balance of refactoring speed (AI) vs. customization (human)?
Selecting the right refactoring solution significantly increases execution speed, improves code quality, and helps rebalance the R&D employee allocation to new product development as well as ML operations—which will become increasingly critical in the coming years.
However, this is more than merely an exercise in selecting the right refactoring approach. Organizations must enact a robust code refactoring strategy that maximizes their ROI on AI investments. AI-led transformations must start internally with transformed operating models. By embedding AI in your software development strategy and rigorously managing the change that comes with it, companies can significantly accelerate the software development process, re-engineer existing code, and improve UX—while controlling investment flows into tools with definitive and measurable results.
The content of this article is intended to provide a general guide to the subject matter. Specialist advice should be sought about your specific circumstances.