But AI doesn't care. It can, and it will, happily churn through a messy codebase.
But AI doesn't care. It can, and it will, happily churn through a messy codebase.
Do you have examples of where this actually worked for you? How large was the codebase, how long did you have agents generate the mess in it?
I ask because my experience is pretty different, even with Opus 5.5 and Astra - unleashing agents on a messy, vibe coded repo only seems to increase the mess. The agents just slow down more and more as they keep generating further mess, they make more and more incorrect assumptions based on bad code previous agents left behind, and I grow more disappointed in their capabilities every day.
Actually reviewing all agent output thoroughly is the only effective way I've personally found of working with agents. In order to ensure that every line of code they add is actually there for a good reason, and not organized in a way that future agents will miss it, or misinterpret it. It's the only way I can prevent them from producing worse results as the repo grows.
Messy, fragile codebases have a greater cost of change and a greater likelihood of errors with every change. AI tokens might be cheaper than developer hours but you'll still burn more of them working on a messy code base, and still have the reputational impacts of a high error rate.
If "fast" and "cheap" are the main drivers, you'll get "bad". And I think it's a great deal easier for developers to follow the path of least resistance and allow "bad" to deliver faster and cheaper when it's AI that's reading the code.
The industrial revolution may have changed the bounds, but it didn't change the relationship.
Your one-off Python scripts are a bit like handkerchiefs. You can make a one-off hanky by cutting a square off an old sheet, fast and cheap, but it's clearly not as good as a re-usable one and you'll throw it out after using it once or twice. That sort of idea simply doesn't scale with complexity. A "good enough" pair of pants needs a lot more than just snipping out a shape. Even a one-off pair of pants, like for a costume, requires time and effort. So too with larger programs. They require more time and effort.
AI changes the bounds: it's cheaper and faster to produce software than it was, but it's not cheaper or faster to make something good than it was, not by an appreciable amount. It remains to be seen if software turns into cheap clothing advertised on buses that is barely fit for purpose... but the industry's track record isn't anything to praise, so probably, it will.
Then, too, hand-crafted assembly still beats compiled output, if you consider the only upper limit on quality. The gap in quality is much, much smaller, and the gap in time and cost is much, much bigger, though, so it's almost never worth the trade-off.
Let's say that AI-generated software eventually (or already, if you like) produces better quality software than people can produce, given the same time and cost restrictions. You can still spend more time and cost to get a better result, or accept a worse result to save time and cost. Or take more time to get a good result but more cheaply using off-peak pricing (tokens or power, take your pick). Or throw more parallel agents at the problem to get a good result faster, but at higher cost.
Pick two. Always.
I hit a corner case yesterday in which assembly would give me a better result than compiled code. Emulating an eZ80 ALU on an x86_64 platform means doing a simple operation like add then taking something like 26 more instructions to sort out the flags. Or you can just use ‘mahf’ to load the x86 processor’s own flag results into a register and use them almost verbatim.
It’s still not worth doing, though, since I can easily reach performance targets without.
And beyond this you're also speaking of something different. You're talking about taking some output assembly and then modifying it in 'negligible' (as a percent of the whole) ways, as opposed to writing assembly oneself. For a program of minimal complexity, not only would it would require an unreasonable amount of effort, but you'd also invariably write inefficient assembly relative to a compiler. Compilers produce code that is better, faster, and cheaper.
---
Shifting outside the abstract, let's just do an example. Imagine you have a processor running at 3 billion cycles/s and you have a program that takes up to 1 million single cycle ops/s. And then some ultra clever human tunes a bit of the assembly and we get it down to 0.95m cycles per second. In reality you're probably not going to be able to tune your way to a generalizable 5% boost, but even if you do in this scenario - what have you achieved? Literally nothing. Of course this argument, taken to extremes, is why it now takes more processing power to run a text editor than it did to put a man on the Moon, but we're not talking about extremes.
Managed to get it in time to have an accurate claim that "stdlib has no total functions" prior to presenting it to someone semifamous, who doesn't like that lean has total functions
Even if that will be true (currently it's not in the long run), messy codebase will make you spend much more on tokens. So unless agents become so cheap that it won't matter, having a mess will be bad for the business in the long run.
LLMs are the next logical progression of this trend.
Also what does quality mean really? Because recent AI audits show that we humans have been generating low-quality software in terms of security.
Readability and maintainability is less of a problem for AI. One can argue that they’re potentially better for writing and running tests. Same for writing performant code.
Additionally, all those arguments about tabs vs spaces, position of the curly brace or different naming conventions have zero meaning now.
I find myself desiring simplifying a codebase just because I still need to make so many decisions and the cognitive load of that has gone up with how much I can do in parallel and still keep track of.