Everything everywhere, all at once

Share this post

The one about legacy code

twokul.substack.com

The one about legacy code

All code is legacy code

Alex Navasardyan
Mar 15
Share this post

The one about legacy code

twokul.substack.com
text
Photo by Trevor Vannoy on Unsplash

"Oh, this is legacy code!" I hear software engineers say this often about a part of the codebase. Sometimes it is relatively new (1+ years.) Sometimes, it is an older codebase (4+ years.) In both cases, it implies something "mysteriously bad."

I find the phrase "legacy code" a bit unhelpful: you only know what to do with it if someone with some context (historical knowledge) can unpack it for you.

A more helpful way to phrase this would be to replace "legacy" with an adjective or phrase that annoys you about the code. If unsure, you can start with words (similarly to the "Writing warmup".) So then the "slow", "hard to work with", "code duplication", and "confusing" can become:

  • The performance of this module/API is subpar and can be improved by 40% by using X.

  • This module/API needs the documentation as it slows down the development by 20% (made up number)

  • We can remove 4K LOC, reduce risk and maintenance burden, and free software engineers to work on X.

It is both hard and gratifying to write the list like this. There is a bit of a self-discovery here (since you write down things that annoy you.) It can be a good "relationship building" exercise: once you start socialising your annoyances, you will understand if people are upset about the same things. Also, it removes ambiguity!

Rinse & repeat.

Thanks for reading Everything everywhere, all at once! Subscribe for free to receive new posts and support my work.

Share this post

The one about legacy code

twokul.substack.com
Comments
TopNew

No posts

Ready for more?

© 2023 Alex Navasardyan
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing