DEV Community

Discussion on: If you were added to a team with a horrible code base and an unhappy client, what steps would you take to fix everything?

jenbutondevto profile image

Nowadays tech leads are aware of tech debt. A lot of the time is a 'ship now, worry later'. SometImes there is no foresight, and devs just need to hack something together. It's not a case of the devs being unskilled but if time and cash is an issue, sometimes implementing good process is difficult.

Getting dropped into a project, I would first analyse what is actually making the code base 'horrible', identifying code smells, figuring out how to make it less horrible. is it just buggy? or is it a whole heap of spaghetti? Usually fixing it is a case of modularising, which can be taken in steps. And of course, steps can be prioritised.

and to see if I'm actually making the code any better, time to write some automated tests.

Recently Monzo (a new challenger bank in the UK who grew extremely quickly) did a refactathon. A good read! tldr, they deleted 100,000+ lines of code.