Re:Elon: Code is brittle. Need a complete rewrite
by bmitc on Monday March 06, 2023 @08:22PM
(#35050270)
It can be a legitimate strategy. Hard rules in software rarely work.
[ Parent
| on HN ]
Re:Elon: Code is brittle. Need a complete rewrite
by drks91 on Monday March 06, 2023 @08:27PM
(#35050308)
Any successful example?
Re:Elon: Code is brittle. Need a complete rewrite
by twelve40 on Monday March 06, 2023 @08:41PM
(#35050419)
many years ago I worked on the windows firewall team at microsoft. it was common practice to get to a certain milestone of a project, then purposely ditch the code and start from scratch. I haven't seen this practice since then, but that part of windows was one of the least hated-on at the time.
Re:Elon: Code is brittle. Need a complete rewrite
by bmitc on Monday March 06, 2023 @08:33PM
(#35050357)
I've done it myself several times, but of course on projects small enough for a single developer. I also think the approach of rewriting bits and pieces over time works. You can identify pieces of the old code base that has well-defined behavior and can be split off with a well-defined interface between the new and old code. This has the added benefit of both needing to understand the old codebase and what you'd ideally want from a new codebase.
Re:Elon: Code is brittle. Need a complete rewrite
by ojkelly on Monday March 06, 2023 @09:08PM
(#35050623)
This is one of the foundational concepts behind microservices.
A service small enough that a team or engineer can rewrite it in a cycle/sprint.
When it’s bigger than that, you have the compounding effects of other systems that interact with each other.
Re:Elon: Code is brittle. Need a complete rewrite
by object-a on Monday March 06, 2023 @09:57PM
(#35050994)
For microservices, the "rewrite" fallacy usually takes the form of:
"Why are there so many small services running? Surely we can shut down / delete/ merge together a bunch of them to clean things up"
I'm pretty sure Elon has also hit this fallacy during his tenure at Twitter.
Re:Elon: Code is brittle. Need a complete rewrite
by Jcowell on Tuesday March 07, 2023 @09:20AM
(#35055611)
> "Why are there so many small services running? Surely we can shut down / delete/ merge together a bunch of them to clean things up"
It’s such a Weird fallacy since I feel like the entire point of Microservces is that there’s an inherit reason they’re microservices in the first place.
If you don’t know why, you investigate why. It feels far easier to make a monolith than a microservice.
Re:Elon: Code is brittle. Need a complete rewrite
by bmitc on Tuesday March 07, 2023 @12:41AM
(#35051991)
As a second thought, I think the move from .NET Framework to .NET 5+ could be considered a rewrite, and that has been rather successful on many fronts.
Re:Elon: Code is brittle. Need a complete rewrite
by rogue7 on Tuesday March 07, 2023 @07:29AM
(#35054574)
Facebook has done it with their iOS Messenger app
https://engineering.fb.com/2020/03/02/data-infrastructure/me...