Legacy Code: Some Zombies should be kept alive

Marc Emmanuel
3 min readFeb 19, 2024

“This is legacy code, I need at least double the time to do changes there. We should rework it.”

Should we?

As a seasoned veteran in the software industry, I’ve navigated the treacherous waters of legacy code more times than I care to count. Reflecting on these experiences, I’ve come to see legacy code not just as a technical challenge but as a main element in the ongoing dialogue between past and future development practices. The term “legacy code” often conjures images of outdated, cumbersome software that’s more trouble than it’s worth. Yet, my journey has taught me that the story of legacy code is far richer and more nuanced than its reputation suggests.

Legacy Code: A Personal Reflection

In my early days as a developer, legacy code was something to be avoided at all costs — a relic of past efforts that seemed to hinder more than help. However, as I grew in my career, my understanding of legacy code evolved. I began to see it not just as code that had outlived its support cycle but as a testament to the evolution of our craft. To me, legacy code means “Code written before a major change in how we write code in a given context”, marking a fascinating shift from being product- and support cycle-centric to emphasizing coding styles and patterns.

It’s all about the money

One of the most poignant lessons I’ve learned is the business reality shadowing legacy code. From a stakeholder’s perspective, the crux of the matter boils down to cost — legacy changes often come with a hefty price tag, attributed to the complexities and technical debt accrued over time. This realization was a turning point, prompting me to look beyond the code itself and consider the broader economic implications.

The Rebuilding Dilemma: A Reflection on Costs and Continuity

The idea of rebuilding software from scratch is a tempting one, especially when faced with the daunting task of updating legacy systems. Sure, superfically it might seem like a goot option, especially for long running systems, where high costs will accumulate over time. However, experience has taught me that this approach is a double-edged sword. Rebuilding might offer a temporary reprieve, but it’s essentially a cycle, birthing new legacy code destined to become tomorrow’s challenge. So I learned to focus on strategic thinking in managing legacy systems.

A Personal Strategy for Legacy Code

My approach to dealing with legacy code has become more nuanced over the years. I’ve learned the importance of evaluating each situation through a multifaceted lens — considering not only the technical aspects but also the impact on business operations and future development. Here’s how I navigate these decisions:

  • Assessing Impact Over Technology: Understanding the business value of legacy code has become a cornerstone of my decision-making process. It’s about recognizing when to preserve and when to innovate.
  • Evaluate long term costs: Learn from past numbers and estimate long term costs for running and changing the legacy system in the future to being able to make proper decisions
  • Embracing Incremental Improvement: I’ve found that gradual, thoughtful modernization of legacy systems can be more effective and less disruptive than the “Big Bang” approach.
  • Hybrid Approaches: Adopting a blend of old and new, maintaining stable legacy components while integrating fresh technologies, has been key to balancing innovation with reliability. Some call it “Zombie”-Systems. Well sometimes it’s worth keeping things alive.

Legacy Code as a Companion in Growth

I’ve come to view legacy code not as a burden but as a companion in the continuous evolution of software development over time. It’s a reminder of where we’ve come from and a guidepost for where we’re going. By embracing the lessons legacy code offers, I can navigate the delicate balance between preserving valuable knowledge and effort while pushing forward into new technological frontiers.

My journey through the landscape of legacy code was one of discovery, challenge, and ultimately, personal and professional growth. What’s your opinion?

--

--

Marc Emmanuel

My thoughts and stories on the leadership world and how I experience them in my current leadership role @virtualidentityag (https://www.virtual-identity.com/)