DEV Community

Discussion on: 8 Things I've Learned Working in a Legacy Codebase

Collapse
 
z2lai profile image
z2lai • Edited

But when you have to just do a single task, with no time to think things through and refactor, there's no other way.

True, especially when the old solution/function is not entirely correct or doesn't fit your situation exactly, fixing or refactoring it is so risky as you don't know what else is dependent on it and how much additional things you have to test outside of your task. Being able to talk to the developer that developed it is better than not having anyone to ask, but either way still takes a lot of time! And that's ultimately why duplication of code happens unfortunately :/.