back

by uecker·1mo ago·view on hn ↗
I don't think this is what we want. We want people to maintain and incrementally improve existing software and tooling and not rewrite and change things all the time.
2 comments
Case study: Turso[1]

Rewrite the open source SQLite in Rust under an MIT license[2].

Of course, once you complete the core product, there is the extended ecosystem to consider.

[1] https://turso.tech/blog/introducing-limbo-a-complete-rewrite...

[2] https://github.com/tursodatabase/turso

Exactly. Nothing which should exist.
A rewrite doesn't need to actually change the public API or experience using the software.

But by rewriting software, even in the same language we can learn from past mistakes and experiences and create better and more maintainable software.

More often the past mistake is rewriting software in a newer language.

Like I've worked places where the business ran off a layer cake of '80s tech, '90s tech that partially replaced the '80s tech, and '00s tech that partially replaced the '90s tech, and were now on their way to launch a big project to replace all that with '10s tech, a project doomed to run out of steam half way through (because legacy code got hands), inevitably leading to a codebase that consists of three failed attempts to rewrite the '80s codebase, and the '80s codebase.

As the functionality of the code was business critical, and no shift in behavior could be tolerated, they're never getting out of this mess, and would have been better off staying on '80s tech.

It's good for job security that's for certain.

Sorry, I think the idea that rewrites are good way to achieve more maintenable software is basically always based on a delusion. It is a very common and well understood delusion for programmers who always see the existing code as crap and imagine a beautiful world when they could only rewrite it. A well understood mistake: https://www.joelonsoftware.com/2000/04/06/things-you-should-...

In the context of free software it is usually also a method to be able to sideline part of the existing user or developer community, which you can not easily justify when making changes the existing project but can be achieved with a rewrite. But the former leads to a honest view of the trade-offs and consequences where the rewrite is a toxic power move.

The issue with not rewriting or rebuilding things is that you miss out on the opportunity for conceptual changes and new approaches to solve problems in more robust and elegant ways. For example, Unreal Engine 6 will depreciate and eventually remove it's existing Actor based scenegraph with an entity component system. This is essentially a rewrite of the core of the engine, and it's a massive conceptual change away from the old style of inheritance-based OOP game programming to something which is much simpler to reason about and provides optimisations which are not possible with Actors. They aren't doing this out of delusion, it's that there are fundamental limitations to their current approach which are not solved by simply refactoring - it requires an entirely different conceptual approach which turns out to be simpler and better in pretty much every way.

The problem with never rewriting is that you miss the chance to discover better ways of doing things. No system is ever built perfectly, if all you ever do is iterate on a bad foundation you're limited by that. Approaching a problem in a different way is only possible when creating something new.

Of course you shouldn't rewrite something just to do it the same way, and you shouldn't rewrite something just because you don't understand it, but I also don't understand the perspective that you should never build something new when there is an existing solution, because it's often only through building out one or more bad solutions that you arrive at a good one. And if you follow such a strict rule, you never end up building anything good.

In Unreal's case, they built the Actor system and have used it for almost two decades. In that time we have discovered better ways of doing things, and it would be a shame to be stuck with an inferior design because Joel said to never rewrite things almost three decades ago...

Ok, you are right. There are situation where something should be re-designed from scratch. I am also not against building something new or better alternatives. But I would still argue that far more often than not rewrites are misguided.