6 ms·
Huh. You are literally saying do a full rewrite. But it's also the worst idea? Edit: A full rewrite always meant replacing every part of a system. Whether you
by rowanG077 4y ago
Huh. You are literally saying do a full rewrite. But it's also the worst idea?
Edit: A full rewrite always meant replacing every part of a system. Whether you do it gradually doesn't really matter.
- peteradio 4y agoFull rewrite generally means stop the presses we are gonna migrate this whole thing from here to there and no new features until it's done (hint it never gets done).
- hamandcheese 4y agoI’ve only ever witnessed ship-of-Theseus style migrations and those also never get done.
- peteradio 4y agoDoes not compute... Ship of Theseus is just regular old development of course it never gets done but new features aren't put on hold.
- hamandcheese 4y agoI mean like “we want to replace X with Y”. Y incrementally starts replacing X, but 100% migration is never achieved, meaning double the API surface area exists indefinitely. Because the migration doesn’t block new features, that means the org gets tired and reallocates the effort elsewhere before it’s ever done, with no immediate consequences. Rinse and repeat.
- bckr 4y agoI think you've not witnessed Ship of Theseus, but "build Ship2 next to Ship1 and start using Ship2 while Ship1 is still being used and keep saying you're going to migrate to Ship2 eventually but meanwhile Ship1 and Ship2 diverge and now you have 2 ships". I recently witnessed this mess and it is an enormous mess. Don't build Ship2 in the first place. Instead, replace Ship1's mast and sails, and rudder etc until you've replaced all the parts in Ship1. That's the SoT approach.
- hamandcheese 4y agoRight but how do you replace the masts? Don’t you have to build mast2 and then tear down mast1 if you want to have continuous propulsion?
- bckr 4y agoYes, can you see how that's quite different from building a second ship?
- hamandcheese 4y agoIn my comment, X and Y are different masts, not different ships.
- bckr 4y agoI understand now.
- jmillikin 4y agoA "full rewrite" means that after the completion of the rewrite, the old code has been fully replaced by new code. What you're describing is a "stop-the-world" rewrite.
- gamegoblin 4y agoHe’s saying to Ship of Theseus the codebase. Don’t build a new ship and then burn down the old ship. Replace the old ship piece by piece in place.
- lordnacho 4y agoThat only works if the new pieces correspond to old pieces. If there's no good structure to build on, the units to be replaced will constrain the architecture of the new ship. At some point you end up trying to change a pumpkin boat into an aircraft carrier, and there's no obvious way you can do that one piece at a time.
- 41b696ef1113 4y agoMaybe there are some underlying architectural problems that need to be addressed, but it would be impossible make those changes from the current situation. It sounds like it is impossible to even know what code is live vs sitting on the server. How do you even know you have a firm grasp on the current architecture when it is unclear what code is even running the product? A lot of low hanging fruit to be addressed that will likely lead to meaningful improvements. Once the code is in better shape and some unfortunate legacy pattern is identified, than it can be considered time to re-tool the architecture.
- lordnacho 4y agoAgreed. The first thing to do is figure out WTF is going on. This is perhaps the hardest kind of thing to do as a developer.
- hither_shores 4y ago> If there's no good structure to build on, the units to be replaced will constrain the architecture of the new ship. Which is why you do it in stages: add scaffolding until local rewrites are possible, then rewrite the business logic, then tear the scaffolding down.
- 4y ago
- Operyl 4y agoThey’re saying to do it, eventually, incrementally and not all at once.
- majikandy 4y agoAnd critically… never completing an incremental rewrite doesn’t matter. Everything remained working the whole time and continues to make the company money. And as a bonus, you were also able to make feature changes that the business wanted at the same time. It’s classic XP, when the money runs out, the system still works!
- simonw 4y ago"Whether you do it gradually doesn't really matter." It absolutely DOES matter. A gradual rewrite is much more likely to work than a stop-the-press rewrite.
- rowanG077 4y agoIt's still a rewrite. The crux of the statement I made.
- samus 4y agoThere problem with a classic full rewrite is that the existing system is thrown away immediately. All the existing features are not available in production until the rewrite adds them back in. Often incomplete, buggy, changed beyond all recognition, or a combination of all of these. That obviously sucks and is the reason the classic rewrite is rarely done. However, it is clear that something must happen.
- jmillikin 4y ago"Full rewrite" is a description of the end state, not the process. The best way to do a full rewrite is incrementally, with test support and consideration for natural separation of internal subsystems.
- baobabKoodaa 4y agoThe best way to do a rewrite may be incremental, but the terminology of "full rewrite" doesn't usually refer to an incremental rewrite, it refers to starting from scratch.
- jmillikin 4y agoI don't think that's true -- a "full" rewrite is used in contrast to a "partial" rewrite, where only part of the system is replaced. It's called a "full" rewrite because the goal from the start is to fully replace the system with new code. Consider that if this were not true, then there would be no way to describe an incremental full rewrite, nor any way to describe a from-scratch replacement of a subsystem. I've written on this topic before, for example https://increment.com/software-architecture/exit-the-haunted-forest/ https://increment.com/software-architecture/exit-the-haunted...
- deleted 4y ago[deleted]
- kingofpandora 4y agoI think you are being needlessly pedantic. Everyone understands that "full rewrite" means "restarting from scratch" in this context, especially since the poster was very clear that eventually everything will be touched.