Hacker News new | ask | show | jobs
by codebje 20 days ago
"Good, fast, cheap" never changes.

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.

2 comments

Of course it changes. Compare clothing before and after the industrial revolution. We definitely have good, fast, cheap clothes now, to the point where the second hand market for clothes is pretty much dead and clothes are seen as disposable objects. The same can happen to software. There is nothing preventing disposable software, indeed the number of one-of Python scripts that I use and discard has exploded. With further cost reductions I can totally see the disposability barrier to climb to larger software systems.
Tailored suits vs. off the shelf ones? Cheap imports that fall apart after a few dozen wash cycles? You absolutely still pick two (at most) for clothing.

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.

For an hour at minimum wage I can buy a t shirt that lasts a year or two before it needs mending. That’s ridiculously cheap compared to pre industrial garments, which is why mending rarely happens. Even tailored clothes are extremely cheap because machines weave the cloth and machines do the sewing. Imagine you had to pay minimum wage to cotton pickers, people operating a manual loom and people sewing by hand.
But I think it does. For instance your comment is not all that different than ones I read, what feels like not 'that' long ago, back when hand-crafted assembly was often still significantly better than compiler produced code in many cases. I'd point there not only to the eventual outcome, but also the fact that we're having this debate when there's every reason to expect LLMs to continue significantly improving, much in the same way that these debates of the past were also being held at a time when compilers were still rapidly improving.
Better tools doesn't change the relationship between time, quality and cost. It just changes the bounds on those values. You can use a compiler to compile shoddily written high-level code just as easily as you can use it to compile well-written high-level code. The cost of writing the high-level code is cheaper than the cost of writing equivalent assembly, but the time and cost of writing good code remains higher than the time and cost of writing bad code.

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.

Upper limits don't matter when humans can't realistically achieve them. There are exactly 0 humans alive today who can write better assembly for any complete program, of a minimum complexity, than a compiler.
That’s shifting the goal posts.

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.

It's not shifting the goal posts, because when the cost you pay has zero measurable effect, there is literally no difference. It's like if you shaved a milligram of material from a basketball player's shoes, they'd probably be able to run and jump slightly faster, but immeasurably so to the point that people would be much more inclined to look at you like an idiot rather than go grab a razor, if you ever suggested such.

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.

Yeah, code humans can read is quickly just becoming another intermediate language for the AI to work on. We are quickly moving up another abstraction layer. I think part of the challenge for ICs is now we’re all becoming managers, which isn’t something everyone wanted.