Hacker News new | ask | show | jobs
by Hypergraphe 1659 days ago
I've worked, and still work, on large legacy codebases on a daily basis and I couldn't agree more that total rewrite is not the solution in most cases and a waste of time and money.

But, I have also witnessed projets that were poorly engineered and should have been rewritten or refactored in time to permit better integration of junior devs, prevent the burnouts and the people quitting.

Sometimes, when you don't make the good refactoring on time, you end up with nobody to maintain your software and you have to rewrite it.

2 comments

This strikes me as one of the pivotal responsibilities of a lead developer. It isn't just about pushing new features as fast as possible, but about ensuring the entire development stack is (as much as one can be) a pleasure to work on and in.

Your point about finding the right time to refactor is spot on. The answer isn't always "NO", but rather, there's something of an art and intuition to understanding if a huge refactor is really a net positive.

Lead developers should understand that failure to do this puts the business at risk, since hiring and maintaining competent developers is critical, and nobody is going to want to stick around to work on an outdated, unnecessarily complex system.

Even considering the occasional refactor, it's still a lot less costly over time than this new throw-away microservices economy in many cases.

First and foremost, the problem should dictate the solution of course, but each cloud host service provider has their own unique brand of microservices that don't make a large distributed system easy/cost-effective to migrate after it's initial development as well. CSPs now do a lot to lock clients into their specific platform for life.

The monthly compute and storage bills alone are now converted to utility pricing also, so there are far too many ways in which those prices can rise and balloon unexpectedly over time that must also be considered also in all fairness.

The modern Internet is turning into a wasteland of scams, where only the rich make money after a huge buy-in, and it's sickening to see the scams and price gouging that occurs just to launch a simple web site, even with open source tools. Terms of service literally mean nothing, and they can't be enforced our upheld because of the massive financial wealth and lack of support monopolies grow into, and because regulators are also tech investors.

Major interests are working hard to raise the entry barrier and to shut out free and reasonably priced services that allow control. They are working hard to acquire highly useful tools as well so they can put a price tag on them. The more we give the wrong people vast sums of money the worse it will get, and the less options we'll have.