What is legacy code?

How do you define legacy code?

Is it code written by previous Developers who worked on the codebase?

Is it code you wrote last week or last month?

Is it code for features everyone no longer uses?

Is it the "old" part of the application that no one wants to work on?

It is any code that's not nice to work on or difficult to change?

Is it code written with different conventions to your current ones or in a different style?

Is it any code that doesn't have automated tests or wasn't written with test-driven development?

Is it code built with outdated tooling or frameworks (like CSS libraries) that were popular then but have since been replaced by something newer?

Here's the thing

These are just some of the potential definitions I can think of.

The term "legacy code" and others, such as "technical debt", often mean different things.

What's your definition? Reply and let me know.

- Oliver

Was this interesting?

Sign up here and get more like this delivered straight to your inbox every day.

About me

Picture of Oliver

I'm an Acquia-certified Drupal Triple Expert with 17 years of experience, an open-source software maintainer and Drupal core contributor, public speaker, live streamer, and host of the Beyond Blocks podcast.