How I Failed to Deal With Legacy Code

And what I learned in the process

Photo by beasty . on Unsplash

I remember my first experience maintaining legacy code quite well. I was a junior developer with absolutely no idea what I was doing.

The app itself was something like Slack, where colleagues could create workspaces to automatically share every exchange they had with their clients.

The founders had no technical background. They had an idea of how to improve team collaboration, and they hired an agency to implement the first version. The following features were each implemented by a different freelancer.

Some parts were in AngularJS, while others used Django and Tornado. It didn’t make any sense.

To me, the code looked like that rusty steam machine from Howl’s Moving Castle: barely holding together, slowly moving forward.

I was terrified to add anything to that codebase. Every time I fixed a bug, another would pop up.

I should have known then that the lack of structure, the code duplication, the tight coupling, and the difficulty to add new features were warning signs that the code was awful and fragile.