6 ms·
I've seen plenty of projects blown up with massive, fearless refactors to do thing "the right way". Careful with that axe, Eugene.
by vearwhershuh 7y ago
I've seen plenty of projects blown up with massive, fearless refactors to do thing "the right way".
Careful with that axe, Eugene.
- krnlpnc 7y agoFor real. Software development can be like building and maintaining a house. Except none of the contractors agree on what materials to use. So one section is steel, another is wood, and another yet is brick. Meanwhile there is a 3rd party outside attempting to load the whole place onto a truck and ship it somewhere else.
- tsimionescu 7y agoI think that the problem is most often something along the lines of: we have a house, it took 5 years to build and the family is very happy with it. But now, they also want a chip fab, and there are many common parts useful to both, so we don't think it's worth it to start from scratch - we need to modify the home to also house their chip fab, but make sure it's also still a good house to live in.
- arethuza 7y ago"home to also house their chip fab, but make sure it's also still a good house to live in." And then someone else comes along and asks "This does fly doesn't it?"
- tsimionescu 7y ago"No, but we could add flying behavior to it, and it would definitely be easier than throwing away the home and the chip fab that we spent so long on"
- arethuza 7y agoTravelling like a submarine underwater is the same as flying isn't it?
- hinkley 7y agoAnd if it’s a web app, they want the fab, a gym, and a jacuzzi, and oh can you do that without adding on any rooms? We have enough already and it is confusing people. Just put the chip fab in the living room.
- benjiweber 7y agoIs a massive refactoring an oxymoron? 'a series of small behavior-preserving transformations, each of which "too small to be worth doing"' https://martinfowler.com/books/refactoring.html https://martinfowler.com/books/refactoring.html
- arkh 7y agoThe solution from the book mentioned in the article (one of the must-read books for devs IMO) is to have tests for your functionalities. Those kind of tests will help a lot when refactoring.
- cjfd 7y agoOne thing to watch out for, I think, is people who want to do this massive refactor (an oxymoron as another comment notes) and also have a work history consisting entirely of short employments. These people never get to experience the actual result of their refactoring.
- hinkley 7y agoAnyone who tells you they’re doing a massive refactor is full of shit. The point at which you should stop trusting them is the moment that phrase escapes their lips or is used to describe them. And I say that as someone who has committed a few, in both senses of the word. The point is to be deterministic, and it can only be deterministic if it is small.
- seren 7y agoIn my open office next door, people have been refactoring a cpp98 monolith into more interdependent components to be able to have a better test suite, better CI integration, better deployment story. That sounds about right. Well, the issue is that they have done it a bit sneakily, they removed all the legacy code they haven't understood. So the code is much more elegant, it has been moved to cpp11 or 14, it ticks every good practice. There is only one slight issue : it does not work. It somewhat work, but is not reliable and fails regularly in unexpected ways. And they've started 5 years ago, and haven't been delivering any business value since then. At the beginning, it was okay because they had some leeway but now they are blocking the release of new products, and our market share is in free fall. Heads have started to roll. To be fair, a few years down the line, their team will likely be more productive and efficient, but I am still not sure that the cost of the rewrite was justified. Still the article is very on point on the risk of not paying your technical debt.
- rusticpenn 7y agoThe legacy code should have been running in parrallel with the new code , atleast until it reaches feature parity ( or reduced features - with other features removed as they have not been used)
- seren 7y agoDefinitely it is a text book example of things to not do, but what is painful is that they started with good intentions. (People with good intentions are the most dangerous one though)
- Bombthecat 7y agoI learned from Microsoft that rewrites are hard! (they tried it with word) and I think somewhere is the story how it went.. They rolled back later on and kept modernizing piece by piece now. That, I think is the right way.
- mcny 7y agoTo play the devil's advocate: it might not be a one size fits all solution. When you're at Microsoft and can just walk up to the bar researchers and programmers in the world, maybe. When you're at some corporation where you have to spend half a day on the phone to get your computer unlocked by the desktop support and request to change a config on a web server becomes a ten foot long email chain about whose fault it is that we need this change, I don't think people have any motivation to modernize piece by piece. Then there is the issue that you'll have to explain why part of the application is in .NET core and part is in dot net framework 3.5...
- pjmlp 7y agoSeveral years of wasted development effort have I seen.
- hinkley 7y agoIt doesn’t have to be that way. I’ve worked on plenty of code where the code at the end is barely the code we started with. Ship of Theseus style.