Fight massive technical debt on all fronts
Once I took over a project that was in a really bad shape. And it was not a joke - starting from useless tests that tested implementation itself, ridiculously complex codebase (everything interconnected with everything), and finishing with fragmented infrastructure (outdated Linode servers + stuff randomly deployed to Heroku).
Who would even pick up a project like this you ask? Probably not somebody sane. I realized it’s often a matter of mindset. I treated that bulk of legacy code as a challenge and it was a very interesting learning experience. It’s exciting to see how a living codebase can transform into something more manageable.
Sure, sometimes it was tidious and boring, but I was aware that it will take a while. I wrote while back about delaying gratification and I think the same rule applies when pickup up project in such state - you have to accept that it will take time and you might see actual results awfully late. So moving that code around, adding tests will seems futile - but it will add up eventually. If I recall correctly power of small changes was also mentioned in Atomic habits book (recommended btw!) - there will be a breaking point when those tiny improvements will be eventually noticable.
It took me a year to get it into a shape where we could bring another person on board. And from there on the work was much pleasant - having code in better shape with a safety net (test suite), up-to-date dependencies, clear CI & CD pipelines is without a doubt more pleasant. I learned that with persistance and consistency you can change anything really.