Remix.run Logo
matsemann 7 hours ago

What's the point of the rewrite if it doesn't fix the underlying issues, though?

A rewrite being a good idea often hinges on the ability to simplify. After a decade or more, it's now apparent what the application should and shouldn't do, so one can build it with those learnings and shed all tech debt from how it grew organically.

Aka preserving all behavior is not what I would want from a rewrite. The point would be to make decisions on what behavior should be kept and what complexity can be removed. An AI can't do that. It can help with execution if the decisions are made, but they're made by being very intimate with the codebase and floating all cases and then talking with stakeholders.

Semaphor 7 hours ago | parent | next [-]

I work on a codebase from the early 2000s, a lot of it using webforms, a long abandoned .NET technology. A rewrite preserving all behavior and making no observable changes whatsoever would be amazing. But it’s also tested exactly as well as you’d expect from something like that so I’d rather not let AI go wild.

fhd2 6 hours ago | parent | next [-]

Good example. Transitioning from an outdated framework to a modern (or sometimes "slightly less outdated") one is probably one of the few situations where you do not want to change semantics at all.

And in my experience, these are _dangerous_. People go into "while we're at it..." mode, and it quickly turns into a big 2.0 kind of thing that takes forever.

I would argue that LLMs can speed this kind of thing up, but not by an order of magnitude or anything, just a bit. Unless there's high risk appetite.

trollbridge 6 hours ago | parent | prev [-]

LLMs/agents are a great way to create a test harness for something like that.

Semaphor 5 hours ago | parent [-]

I plan to eventually get there, just need to find the time. It’s a lot of code, and a lot of it is not set up for testability.

a96 7 hours ago | parent | prev | next [-]

One obvious target might be rewriting from an unsupported, broken, and/or obsolete target to something that still works. Or moving a project from a platform that no other system in the company uses to the same setup that all the others use.

Of course it won't quite work, but I can definitely see why some people would want that.

nomel 7 hours ago | parent | prev [-]

Say I rewrite a large codebase from python to C++, preserving all behavior. That's up to a 50x speed up.

CraigJPerry 6 hours ago | parent [-]

Not a good example i'd say given Python's position as pretty much the ultimate glue language :) You'd more likely keep the python shell (and faster developer iteration speed) and push measured hotspots down into c++/rust/c/whatever.

Incidentally, Whenever i've done this in the past it's had a pleasant side effect of improving architecture. You end up forcing something akin to "push for's down and pull if's up" because crossing the ffi boundary is not free. It can be quite magical, as in leading to comically unbelievably speed ups when you also take advantage of vector intrinsics.