Comment by theshrike79

2 days ago

Truly spoken as someone who has never worked with legacy code. You know, the kind that's still running Java 1.something when Java was already doing full numbered releases.

The kind that works, but everyone who knows why has left the company. The whole codebase is written in a way that makes automated testing either impossible or so time-consuming that the client will never pay for the required refactoring.

There is way too much code in the world we never were able to rewrite due to real-world concerns. There were people who had the skill, but a part of that skill came with knowing the risks of doing major refactoring to a money-generating system that is ancient, but still works.

Anecdote: I had to work with a system where the original coder (long gone) had rewritten Linked Lists with their custom solution that worked normally except the first X items were the sum, average and mean of the data. Fun times.

We can fully solve 'code' in the sense we can model every single interaction and then use that specification to produce another program that does the exact same thing, and then based on inputs, it should be possible to cull that tree of possibilities even more.

That is my hope anyway, apart from that, I do think there is an inherent laziness in business to not mess with the machine that makes money.

  • If you don't do the work to separate the actual specifications from what the legacy app happens to do then why are you even rewriting it?

Maybe, but I think one of the points is that the marginal cost of both understanding that legacy code base and safely refactoring it are increasingly trending down thanks to agentic coding tools. It changed the value and risk tradeoff for legacy apps, if deployed properly. There's still a lot of work (too much) to get the harness in place to make high confidence changes to legacy, critical apps. If someone makes that more automated, we'll be in a very different place for legacy refactoring and it will look a lot more like the clay molding the article discusses.

  • As with anything LLM-related, I feel compelled to ask, is that actually what's happening, or are they just successfully convincing their users that's what's happening? I truly cannot tell.

    I'm not using any LLMs directly (my workplace still bans them in-house) and my experience on the receiving end of contractors using them is quite poor. That includes one major, "we'll replace your ancient software with shiny new stuff"... with significantly reduced capability that in turn makes everything far more difficult than it was or ought to be. The UI appears much more user friendly, but really is just broken in multiple ways where the much-patched 1980s software it replaced was user-unfriendly but largely worked.

    This all could be the result of poor coding, regardless of LLM use, of course.

    • With this new-found capability, you can use an LLM to plan and execute some long-needed refactors, or use it to pile on new features even faster with no regard for tech debt management.

      As others have said... it's a tool. A powerful tool in the hands of a wise and skilled wielder who makes planned, focused changes, or a slop-cannon in the hands of someone who is happy to churn out features with minimal understanding of context or system design.

    • I've been able to do relatively big refactors with great success, like porting thousands of lines of data transforms to drastically different data stores practically in one fell swoop. In the background. As I worked on other stuff.

      The cost of experimenting is just mind mindbogglingly cheap now, it's really insane. Don't like the abstractions it comes up with, or think it generated a bunch of slop? Go again, who cares? With a little more steering, they'll often produce exactly what you want.

      As for contracting firms, many of them were slop shops before AI, I imagine those kinds of firms are even worse slop shops now.