News for hackers. Stuff that matters.
Re:If you thought code writing speed was your problem you ha... by petcat on Tuesday March 17, 2026 @03:02PM (#47416768)
As human developers, I think we're struggling with "letting go" of the code. The code we write (or agents write) is really just an intermediate representation (IR) of the solution.

For instance, GCC will inline functions, unroll loops, and myriad other optimizations that we don't care about. But when we review the ASM that GCC generates (we don't) we are not concerned with the "spaghetti" and the "high coupling" and "low cohesion". We care that it works, and is correct for what it is supposed to do. And that it is a faithful representation of the solution that we are trying to achieve.

Source code in a higher-level language is not really different anymore. Agents write the code, maybe we guide them on patterns and correct them when they are obviously wrong, but the code is merely the work-item artifact that comes out of extensive specification, discussion, proposal review, and more review of the reviews.

A well-guided, iterative process and problem/solution description should be able to generate an equivalent implementation whether a human is writing the code or an agent.

Re:If you thought code writing speed was your problem you ha... by pbasista on Tuesday March 17, 2026 @03:42PM (#47417284)
> review the ASM that GCC generates (we don't)

Of course we do not. Because there is no need. The process of compiling higher order language to assembly is deterministic and well-tested. There is no need to continue reviewing something that always yields the same result.

> We care that it works, and is correct for what it is supposed to do.

Exactly. Which is something we do not have with an output of an LLM. Because it can misunderstand or hallucinate.

Therefore, we always have to review it.

That is the difference between the output of compilers and the output of LLMs.

Re:If you thought code writing speed was your problem you ha... by petcat on Tuesday March 17, 2026 @03:55PM (#47417459)
> The process of compiling higher order language to assembly is deterministic and well-tested.

Here are the reported miscompilation bugs in GCC so far in 2026. The ones labeled "wrong-code".

https://gcc.gnu.org/bugzilla/buglist.cgi?chfield=%5BBug%20cr...

I count 121 of them.

I've posted this 3 times now. Code-generation by compilers written by experts is not deterministic in the way that you think it is.

Re:If you thought code writing speed was your problem you ha... by leptons on Tuesday March 17, 2026 @04:14PM (#47417689)
If the "bug" shows up every time in the output given the same input, then it definitely is deterministic.

Just because there are bugs does not mean a compiler is non-deterministic. I looked through a bunch of the bug reports and there is nothing there that can't be fixed to make it deterministic.

You can't fix an LLM to be absolutely deterministic, but you can fix a compiler.

Re:If you thought code writing speed was your problem you ha... by perlgeek on Tuesday March 17, 2026 @04:21PM (#47417763)
In the 12+ years I've been a professional developer, I can only remember two bugs that were caused by the compiler / interpreter, everything else were logic bugs, oversights, 3rd-party libraries, misunderstanding of the requirements, internal contradictions in the requirements etc.

So that's maybe 0.1% of all the bugs I've touched.

In that sense, code generation isn't really an interesting source of bugs for the discussion at hand.

Re:If you thought code writing speed was your problem you ha... by bcrl on Tuesday March 17, 2026 @05:13PM (#47418410)
There were more ~26+ years ago. gcc and egcs had some subtle register allocator bugs that would get tripped up under heavy register pressure on i386 that were the bane of my existence as a kernel developer at the time.
Re:If you thought code writing speed was your problem you ha... by wat10000 on Tuesday March 17, 2026 @05:45PM (#47418766)
It's close enough. If we had a build pipeline that kept prompts in source control, and ran it through an LLM and then a compiler to produce the build output, this would fall over constantly. You'd get radically different results every time. Build pipelines that store actual source code in source control, then run them through a compiler to produce the build output, are used all over the place and they generally work great.
Re:If you thought code writing speed was your problem you ha... by qalmakka on Tuesday March 17, 2026 @03:52PM (#47417427)
This. The comparison between compilers and LLMs is so utterly incorrect, and yet I've heard it multiple times already in the span of a few weeks. The people suggesting this are probably unaware of the fact that Turing complete languages follow mathematical properties not just vibes. You can trust the output of your compiler because it was thoroughly tested to ensure it acts as a Turing machine that converts one Turing complete language (C, C++, whatever) into another Turing complete language (ASM) and there's a theorem that guarantees you that such a conversion is always possible. LLMs are probabilistic machines and it's grossly inappropriate to put them in the same category as compilers - it would be like saying that car tires and pizzas are similar because they're both round and have edges.
Re:If you thought code writing speed was your problem you ha... by krackers on Tuesday March 17, 2026 @03:07PM (#47416818)
>Source code in a higher-level language is not really different anymore

Source code is a formal language, in a way that natural language isn't.

Re:If you thought code writing speed was your problem you ha... by jrop on Tuesday March 17, 2026 @03:13PM (#47416896)
Right? That's the only reason that "coding with LLMs" works at all (believe me, all at the same time, I am wowed by LLMs, and carry a healthy level of skepticism with respect to their ability as well). You can prompt all you want, let an Agent spin in a Ralph loop, or whatever, but at the end of the day, what you're checking into Git is not the prompts, but the formalized, codified artifact that is the bi-product of all of that process.
Re:If you thought code writing speed was your problem you ha... by yason on Tuesday March 17, 2026 @03:45PM (#47417318)
Somewhat ironically, perhaps a formal, deterministic programming language (in its mathematical-kind of abstract beauty) is the outlier in the whole soup. The customers don't know what they need, we don't know what we ought to build, and whatever we build nobody knows how much of it is the right thing and what it actually does. If the only thing that causes people to sigh is the requirement to type all that into a deterministic language maybe at some point we can just replace that with a fuzzy, vague humanly description. If that somehow produces enough value to justify the process we still won't know what we need and what we're actually building but at least we can just be honestly vague about it all the way through.
Re:If you thought code writing speed was your problem you ha... by inamberclad on Tuesday March 17, 2026 @03:08PM (#47416837)
When you get to the really tightly controlled industries, your "formal" language becomes carefully structured English.
Re:If you thought code writing speed was your problem you ha... by petcat on Tuesday March 17, 2026 @03:11PM (#47416865)
Legalese exists precisely because it is an attempt to remove doubt when it comes to matters of law.

Maybe a dialect of legalese will emerge for software engineering?

Re:If you thought code writing speed was your problem you ha... by ruszki on Tuesday March 17, 2026 @03:20PM (#47416980)
Legalese is nowhere near precise, and we have a whole very expensive system because it’s not precise.
Re:If you thought code writing speed was your problem you ha... by petcat on Tuesday March 17, 2026 @03:29PM (#47417103)
It is an attempt the be precise, and to remove doubt. But you're right that doubt still creeps in.
Re:If you thought code writing speed was your problem you ha... by datsci_est_2015 on Tuesday March 17, 2026 @09:07PM (#47420476)
Doubt still creeps in? The entire purpose of the Judiciary branch across all governments that possess one is the interpretation of legal documents. It’s one of the greatest sources of uncertainty in human governance.
Re:If you thought code writing speed was your problem you ha... by batshit_beaver on Tuesday March 17, 2026 @03:28PM (#47417097)
Legalese already exists in software engineering. Several dialects of it, in fact. We call them programming languages.
Re:If you thought code writing speed was your problem you ha... by eecc on Tuesday March 17, 2026 @03:08PM (#47416836)
This is the answer
Re:If you thought code writing speed was your problem you ha... by felipellrocha on Tuesday March 17, 2026 @03:04PM (#47416786)
If you truly believe that, why don’t you just transform code directly to assembly? Skip the middleman, and get a ton of performance!
Re:If you thought code writing speed was your problem you ha... by bdcravens on Tuesday March 17, 2026 @03:12PM (#47416891)
I assume you're being cynical, but there's a lot of truth in what you say: LLMs allow me to build software to fit my architecture and business needs, even if it's not a language I'm familiar with.
Re:If you thought code writing speed was your problem you ha... by operatingthetan on Tuesday March 17, 2026 @03:10PM (#47416854)
I know you're being cheeky but we are definitely heading in that direction. We will see frameworks exclusively designed for LLM use get popular.
Re:If you thought code writing speed was your problem you ha... by nemo44x on Tuesday March 17, 2026 @03:25PM (#47417050)
I think that’s possible too but the trouble is training them. LLMs are built on decades of human input. A new framework, programming language, database, etc doesn’t have that.

We are in the low hanging fruit phase right now.

Re:If you thought code writing speed was your problem you ha... by operatingthetan on Tuesday March 17, 2026 @04:37PM (#47417957)
If it knows the language already a new framework is a piece of cake. A few MD files explaining it is enough for the pattern recognition to kick in. I've had one LLM create a novel framework and pass them to another and it's trivial for a fresh instance to pick it up.
Re:If you thought code writing speed was your problem you ha... by charcircuit on Tuesday March 17, 2026 @03:24PM (#47417046)
Assembly eats up context like crazy. I usually only have my LLM use assembly for debugging / performance / reversing work.
Re:If you thought code writing speed was your problem you ha... by n4r9 on Tuesday March 17, 2026 @03:07PM (#47416817)
Can agents write good assembly code?
Re:If you thought code writing speed was your problem you ha... by svachalek on Tuesday March 17, 2026 @03:11PM (#47416868)
With the complexity of modern pipelines, there are very few humans that can beat a good optimizing compiler. Considering that with an LLM you're also bloating limited context with unsemantic instructions I can't see how this is anything but an exercise in failure.
Re:If you thought code writing speed was your problem you ha... by mirsadm on Tuesday March 17, 2026 @04:10PM (#47417653)
I don't know if I agree with that. It's a struggle to get a modern compiler to vectorize a basic loop.
Re:If you thought code writing speed was your problem you ha... by ICantFeelMyToes on Tuesday March 17, 2026 @03:07PM (#47416820)
you know if I could I would (Android dev)
Re:If you thought code writing speed was your problem you ha... by zelphirkalt on Tuesday March 17, 2026 @03:55PM (#47417461)
I see it differently: The code is our medium of communicating a solution.

> "Programs must be written for people to read, and only incidentally for machines to execute." -- Hal Abelson

Without this, we quickly drift into treating computers and computer programs as even more magic, than we already do. When "agents" are mistaken about something, and put their "misunderstanding" into code that subsequently is incorrect, then we need to be able to go and look at it in detail, and not just bring sacrifices for the machine god.

Re:If you thought code writing speed was your problem you ha... by munchbunny on Tuesday March 17, 2026 @03:45PM (#47417328)
In my experience it doesn't really work that way. It's somewhat akin to a house that's undergone multiple remodels. You eventually run out of the house's structural capacity for more remodeling and you have to start gutting the interior, reframing, etc. to reset the clock.

At least today the coding agents will cheat, choose the wrong pattern, brute force a solution where an abstraction or extra system was needed, etc. A few PR's won't make this a problem, but after not very long at all in a repo that a dev team is constantly contributing to (via their herds of agents) it can get pretty gnarly, and suddenly it looks like the agents are struggling with tech debt.

Maybe one day we can stop writing programming languages. It's a thought-provoking idea, but in practice I don't think we're there yet.

Re:If you thought code writing speed was your problem you ha... by Rapzid on Tuesday March 17, 2026 @03:41PM (#47417266)
The semantics described in the high-level language are absolutely maintained deterministically.

With agentic coding the semantics are not deterministically maintained. They are expanded, compressed, changed, and even just lost; non-deterministically..

Re:If you thought code writing speed was your problem you ha... by yummypaint on Tuesday March 17, 2026 @03:18PM (#47416955)
Just because an LLM can turn high level instructions into low level instructions does not make it a compiler
Re:If you thought code writing speed was your problem you ha... by leptons on Tuesday March 17, 2026 @04:09PM (#47417637)
>For instance, GCC will inline functions, unroll loops, and myriad other optimizations that we don't care about. But when we review the ASM that GCC generates (we don't) we are not concerned with the "spaghetti" and the "high coupling" and "low cohesion". We care that it works, and is correct for what it is supposed to do. And that it is a faithful representation of the solution that we are trying to achieve.

The more complex the code becomes, iteration after iteration by the AI, it keeps adding more and more code to fix simple problems, way more than is reasonably necessary in many cases. The amount of entropy you end up with using AI is astonishing, and it can generate a lot of it quickly.

The AI is going to do whatever it needs to do to get the prompt to stop prompting. That's really its only motivation in its non-deterministic "life".

A compiler is going to translate the input code to a typically deterministic output, and that's all it really does. It is a lot more predictable than AI ever will be. I just need it to translate my explicit instructions into a deterministic output, and it satisfies that goal rather well.

I'll trust the compiler over the AI every single day.

Re:If you thought code writing speed was your problem you ha... by exceptione on Tuesday March 17, 2026 @03:11PM (#47416869)
None of the comparisons make any sense. In short, these concepts are essential to understand:

- determinism vs non-determinism

- conceptual integrity vs "it works somewhat, don't touch it"

Re:If you thought code writing speed was your problem you ha... by petcat on Tuesday March 17, 2026 @03:17PM (#47416946)
> determinism vs non-determinism

Here are the reported miscompilation bugs in GCC so far in 2026. The ones labeled "wrong-code".

https://gcc.gnu.org/bugzilla/buglist.cgi?chfield=%5BBug%20cr...

I count 121 of them. It appears that code-generation is not as deterministic as you seem to think it is.

Re:If you thought code writing speed was your problem you ha... by tcmart14 on Tuesday March 17, 2026 @03:24PM (#47417043)
Deterministic doesn't mean correct. Compilers can have bugs. What deterministic means, given the same input you get the same output every time. So long as given the same code it generates the same wrong thing every time, its still deterministic.
Re:If you thought code writing speed was your problem you ha... by yCombLinks on Tuesday March 17, 2026 @03:36PM (#47417193)
99.9% vs about 20%. Pretty weak argument.
Re:If you thought code writing speed was your problem you ha... by tcmart14 on Tuesday March 17, 2026 @03:22PM (#47417010)
I really hate the trying to make LLM coding sound like it's just moving up the stack and is no different from a compiler. A compiler is deterministic and has a set of rules that can be understood. I can look at the output and see patterns and know exactly what the compiler is doing and why it does and where it does it. And it will be deterministic in doing it.
Re:If you thought code writing speed was your problem you ha... by petcat on Tuesday March 17, 2026 @03:23PM (#47417030)
> compiler is deterministic and has a set of rules that can be understood.

Here are the reported miscompilation bugs in GCC so far in 2026. The ones labeled "wrong-code".

https://gcc.gnu.org/bugzilla/buglist.cgi?chfield=%5BBug%20cr...

I count 121 of them. It appears that code-generation is not as deterministic as you seem to think it is.

Re:If you thought code writing speed was your problem you ha... by tcmart14 on Tuesday March 17, 2026 @03:30PM (#47417116)
I commented elsewhere, but that doesn't mean it's not deterministic. Deterministic means given the same input it gives the same output. Compilers can still have bugs and generate the wrong code. But so long as given the same input it generates the same wrong output, it is still deterministic.
Re:If you thought code writing speed was your problem you ha... by petcat on Tuesday March 17, 2026 @03:37PM (#47417218)
Compilers can generate wrong output in many different ways. And they're all analogous to the same ways that a sophisticated LLM can generate wrong outputs.

The compiler relies on:

* Careful use of the ENV vars and CLI options

* The host system, or the compilation of the target executable (for cross-compiling)

* It relies on the source code specifically

How is this really different from careful prompt engineering, and an extensive proposal/review/refine process?

They are both narrowing the scopes and establishing the guardrails for what the solution and final artifact will be.

> proposal/review/refine process

This is essentially what a sophisticated compiler, or query optimizer (Postgres) does anyway. We're just doing it manually via prompts.

Re:If you thought code writing speed was your problem you ha... by discreteevent on Tuesday March 17, 2026 @04:14PM (#47417684)
> How is this really different from careful prompt engineering, and an extensive proposal/review/refine process?

So different that those concepts don't even exist.

I don't have to carefully prompt my compiler in case it might misinterpret what I'm saying. My compiler comes with a precisely specified language.

I never, ever, review the output of my compiler.

Re:If you thought code writing speed was your problem you ha... by petcat on Tuesday March 17, 2026 @06:15PM (#47419108)
> I don't have to carefully prompt my compiler in case it might misinterpret what I'm saying.

Yes you do. You give it flags, you give it ENV vars.

> My compiler comes with a precisely specified language.

No, it doesn't.

> I never, ever, review the output of my compiler.

Yes, that's the whole point of the exercise. Have you ever reviewed the -S output from GCC? No? So do you really know what your code is doing?

Re:If you thought code writing speed was your problem you ha... by xigoi on Thursday March 19, 2026 @05:30AM (#47436823)
> Yes, that's the whole point of the exercise. Have you ever reviewed the -S output from GCC? No? So do you really know what your code is doing?

Because I gave it some code in a different language and it mechanically translated it through a deterministic, clearly documented process.

Re:If you thought code writing speed was your problem you ha... by tcmart14 on Tuesday March 17, 2026 @03:55PM (#47417472)
And none of that means it isn't non-deterministic. Compilers still satisfy the, given the exact same environment and input, you get the same output. It doesn't matter the number of inputs. So long as f(3, 2) always gives 5, it's deterministic. Doesn't matter what f(x,y) does so long as it always gives the same output per input. LLM generation does not do this. If given f(3,2), sometimes it says 5, sometimes 6, sometimes 1001, sometimes 2.

And we are talking compilers, not query optimizers, so I don't really care what they do.

Re:If you thought code writing speed was your problem you ha... by xigoi on Thursday March 19, 2026 @05:28AM (#47436815)
It seems that the person you’re replying to is also deterministic. No matter how many times you explain what “deterministic” means, they fail to understand it.
Re:If you thought code writing speed was your problem you ha... by nunez on Tuesday March 17, 2026 @11:57PM (#47421458)
You can't guarantee that an LLM will yield the same answer twice, given the same input, by design. You can with compilers. That's the point being made here.
Re:If you thought code writing speed was your problem you ha... by Kilenaitor on Tuesday March 17, 2026 @03:41PM (#47417272)
Having bugs is not the same as being non-deterministic.

I get the point that the compiler is not some pure, perfect transformation of the high-level code to the low level code, but it is a deterministic one, no?

Re:If you thought code writing speed was your problem you ha... by slopinthebag on Tuesday March 17, 2026 @03:51PM (#47417397)
It is deterministic, unless GCC is now including a random statistical process inside its compiler to generate machine code. You've copied this same comment repeatedly, it doesn't become more correct the more you spam it.
Re:If you thought code writing speed was your problem you ha... by tovej on Tuesday March 17, 2026 @03:12PM (#47416883)
Is this a copypasted response? I've seen the exact same bs in other AI threads on this site.
Re:If you thought code writing speed was your problem you ha... by bcassedy on Tuesday March 17, 2026 @03:59PM (#47417512)
This user has posted the parent post nearly verbatim twice. And the exact same responses about determinism several times.