loading...

How do you go back to legacy code?

idoshamun profile image Ido Shamun ・1 min read

It's so fun working on a greenfield project, you can choose whatever stack you desire, you always learn new things. But then comes a time when you have to go back to your legacy code and you just miss this new stack you used before. I always want to refactor everything 🤣 How do you overcome this feeling when going back to legacy project?

Discussion

markdown guide
 

I tend to approach it in segments, sneakily refactoring little pieces at a time until my frustrations disappear.

Alternatively, spend free time working on a better stack as an outlet will also help

 

I find this "segments" technique one of the most difficult things to do as a developer. Especially if it involves database or infrastructure but I love it as well :)

 

On of the best thing to do when it comes to refactoring a legacy product, is to add an abstraction layer in front of it and push the calls forwards (when it's an API).

If it's a full stack application it's much harder! It also depends on the language. A powerful IDE is your friend in most scenarios