I've seen projects that have been successful because they had talented people and good processes from the start, however I was just curious on how one could recover from a situation in which people did not have the foresight to establish good practices early on.
Any suggestions?
Top comments (3)
That's a really complex question. Why is the code base bad? Was it because of the programmers, or management? Is the person responsible still around deciding things, or are they gone (possibly replaced by someone more competent)? Why is the client unhappy? Is support slow because of the bad codebase? Or is it because of who they are in contact with?
There's a lot of questions, and I'd say the first step is to answer all of them. Get a clear grasp of the problem, then decide where to start fixing it.
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.
Been there twice, burnt to crisp once. Here is a practical take: