Hacker News new | ask | show | jobs
by dang 403 days ago
My favorite definition of "legacy code" is "code that works".

Anybody know where that quip originated? (ChatGPT tells me Brian Kernighan - I doubt it. That seems like LLM-enabled quote hopping - https://news.ycombinator.com/item?id=9690517)

2 comments

After hearing legacy code defined as "code that runs in production," it reset my perception around value and thoughtful maintenance. Cannot find the reference, though.
"Legacy code" is such a loaded term. There is definitely large intersection between people's working definition of "legacy code" and "code that works". At the same time this is usually NOT what people intend to include. But it fits their definition nonetheless.

Take the author's definition:

>When something is older, and someone else built it

That usually describes the most important, core part of any system that has existed for any significant amount of time. It may even be well understood by most people.