📑 Table of Contents

Critical Systems Still Running Decades-Old Legacy Code

📅 · 📁 Opinion · 👁 14 views · ⏱️ 10 min read
💡 Core systems in critical industries such as banking and aerospace still rely on ancient code written decades ago. When this 'legacy code' fails, the consequences can affect millions of people. Can the arrival of the AI era solve this technical debt dilemma?

Introduction: The Code That Never Retires

In an era where AI large language models evolve daily and software iterates on a weekly basis, an unsettling fact is being revealed by an increasing number of technical investigations — the world's most critical computer systems, including core banking transaction platforms, aerospace flight control systems, and government tax and social security systems, still run on ancient code written decades ago. These programs, written in COBOL, Fortran, and even assembly language, some having been in service for over half a century, continue to power trillions of dollars in daily financial transactions and life-critical aerospace missions.

While the entire tech industry debates when GPT-5 will launch and how AI Agents will transform workflows, a more fundamental and urgent question receives far less attention: what happens if this ancient code fails?

Current State: The Staggering Scale of Legacy Code

Banking: The Immortal Legend of COBOL

COBOL (Common Business-Oriented Language) was born in 1959, making it 66 years old. Yet according to industry statistics, approximately 240 billion lines of COBOL code are still running in production environments worldwide, processing a staggering $3 trillion in daily financial transactions. Behind 95% of ATM transactions and 80% of in-person payment transactions in the United States, COBOL code is quietly doing the heavy lifting.

These systems have not been without incidents. During the COVID-19 pandemic in 2020, unemployment benefit application systems in multiple U.S. states crashed due to surging traffic, precisely because the underlying COBOL systems could not handle the sudden load. Then-New Jersey Governor Phil Murphy publicly called for "volunteers who know how to write COBOL" to help fix the systems — a moment that sparked widespread discussion across the tech community.

Aerospace: Fortran Travels Alongside Space Exploration

Fortran was born in 1957, four years before humans first entered space. To this day, many critical computational modules at NASA and the European Space Agency still use programs written in Fortran. In fields such as weather forecasting models, spacecraft orbit calculations, and fluid dynamics simulations, Fortran code is ubiquitous.

Aerospace systems demand extremely rigorous code reliability — a tiny bug could cause a spacecraft worth hundreds of millions of dollars to go out of control. In 1999, NASA's Mars Climate Orbiter crashed due to a metric-to-imperial unit conversion error, resulting in a $327 million loss. While this case was not entirely a "legacy code" problem, it profoundly illustrated the catastrophic consequences of code errors in critical systems.

Government and Infrastructure: Patching Things Together Year After Year

The U.S. Government Accountability Office (GAO) has noted in reports that multiple core federal government systems run code over 50 years old, including the IRS's individual tax processing system and the Department of Defense's Strategic Automated Command and Control System. Maintenance costs for these systems climb year after year, but the risks of replacement are equally enormous — any failed migration could trigger nationwide service outages.

Deep Analysis: Why "Just Replace It" Is Not That Simple

The First Dilemma: The Black Box No One Dares Touch

Many legacy systems, after decades of modifications and layering, have become "black boxes" that no one can fully understand. Original developers have long since retired or passed away, documentation is incomplete, and the code logic is riddled with patches targeting specific historical scenarios. A senior banking technology consultant once described it: "It's like an old house — you don't know which wall you can tear down without the whole building collapsing."

The Second Dilemma: A Worsening Talent Gap

Programmers who know ancient languages like COBOL are rapidly dwindling. By some estimates, the average age of active COBOL programmers worldwide has exceeded 55, and virtually no young developers are willing to learn this "obsolete" language. This means that once current maintenance personnel retire, these critical systems will face a predicament where there is simply no one left to fix them.

Some universities have already stopped offering COBOL courses, and even high-salary job postings from enterprises — with annual compensation reaching hundreds of thousands of dollars — struggle to attract enough fresh talent. This severe imbalance in talent supply and demand is pushing the legacy code crisis toward a tipping point.

The Third Dilemma: The Double Pressure of Replacement Costs and Risks

The failure rate of large-scale system migration projects is alarmingly high. The Commonwealth Bank of Australia spent five years and over $750 million to complete its core system modernization — and that is considered a relatively successful case. Several UK banks experienced severe failures during system migrations, leaving millions of customers unable to use banking services normally, ultimately facing massive fines and reputational damage.

For corporate leadership, "if it works, don't touch it" is often the lowest-risk choice. However, this strategy merely postpones the problem rather than solving it.

Can AI Be the Game-Changer?

With the rapid development of large language models and AI coding tools, the industry has begun exploring the possibility of using AI to solve the legacy code crisis.

Code Comprehension and Documentation Generation

AI coding assistants like GitHub Copilot and Amazon CodeWhisperer have already demonstrated the ability to understand and generate code in multiple programming languages. In 2023, IBM launched an AI tool specifically targeting COBOL code modernization called "watsonx Code Assistant for Z," capable of automatically converting COBOL code to Java and generating detailed code documentation and explanations.

The emergence of such tools opens new possibilities for understanding and migrating legacy code. AI can rapidly "read" millions of lines of ancient code, identify the business logic within, and generate equivalent implementations in modern languages. Work that previously required extensive manual reverse engineering can now be dramatically accelerated.

Automated Testing and Risk Assessment

AI can also play a critical role during system migration — by automatically generating test cases, performing regression testing, and detecting anomalies, significantly reducing the risk of introducing new bugs during the migration process. Google has already been using AI to assist with large-scale codebase refactoring and migration internally, achieving notable results.

Real-World Challenges Remain

However, AI is no silver bullet. Current large language models still suffer from "hallucination" issues when processing highly specialized domain code — generating code that appears correct but is actually flawed. For "zero-tolerance" scenarios such as banking transaction systems or aerospace control systems, verifying the reliability of AI-generated code is itself a massive challenge.

Moreover, many legacy systems run on specific hardware platforms, with deep coupling between code and hardware. Simple language translation cannot solve fundamental architectural issues.

Global Action: From Passive Maintenance to Proactive Response

Notably, some countries and institutions have begun taking action. The U.S. federal government allocated billions of dollars in fiscal year 2024 for IT system modernization. The EU's "Digital Europe Programme" has also listed software modernization of critical infrastructure as a priority.

In the private sector, major financial institutions such as JPMorgan Chase and Citigroup have continuously increased technology investment in recent years, gradually migrating core systems to cloud-native architectures. JPMorgan Chase's annual technology budget now exceeds $15 billion, with a significant portion dedicated to legacy system transformation.

Outlook: A Race Against Time

The legacy code problem is essentially a race against time. On one hand, talent proficient in ancient programming languages is irreversibly diminishing.