Live data from Hacker News

Write-only code

heavybit.com

51–59 of 59 posts

Re: Write-only code

#51
post #50

Earlier quoted context omitted.

Is that really true though? Are people really not saving design documentation to the code repository along with the code? And is it really too much to ask in a prompt to make the LLM document aggressively? Do the LLMs you use complain about being asked to write lots of comments in their code? Is it a token cost thing? It seems ridiculous not to just start with #2 but I might be spoiled by not knowing how much my toke…

It requires real work to create good documentation and review it. I've never worked in a place that requires that every commit update some documentation, but if you want to rebuild software based on the documentation, that's what it would take. The best you could say is that the typical development process today tends to scatter documentation across commit descriptions, feature docs, design reviews, meeting notes, tr…

It doesn’t though. You tell the LLM what to document up front, it can be some domain specific detail or whatever. You don’t need to carefully review it unless things go wrong. You do change propagation and change everything (tears, docs, code) in sync when some spec aspect changes, which involves a QA feedback loop, which judges the correctness of code and tests (because the LLM wrote the tests, they can be wrong). I guess you could add doc review steps as well if you knew what to look for generically, but I found it’s ok at writing docs that I haven’t needed to do this yet.

Re: Write-only code

#52
This future may come someday, but it's not here yet, not even with the post-late-'25 models. It assumes that agents can write reasonable code reliably, which they're currently far from doing (even 95% isn't enough, and I don't think we're at 95%).

Anthropic's C compiler experiment showed that even in a situation where people give the agent every imaginable advantage (above and beyond what they can reasonably do in most projects), i.e provide not only a very precise specificaton but also thousands of tests, a reference implementation to use as an oracle, and have the model trained on the reference implementaition - years of "preparation" effort - and all the agent has to do is just code, it still fails on a task that's certainly not trivial but also by no means monumental.

A lot of writing about agentic coding seems to assume that today's agent have coding down whereas the experience of anyone using them across different kinds of software work as well as tests by the labs themselves show that this is not yet true.

Re: Write-only code

#53
post #45

Earlier quoted context omitted.

But you can be a software dev even if you do not work in software dev. Plenty of those individuals in open source, for example.

writing software for a hobby is different from hundreds of thousand that do it 40+ hours per week, go into planning into retros into milestone review meetings etc. I am painting in my free time as a hobby. I do not think I am an authority or should be taken seriously when taking about impact of AI on artists.

Consider your biases about the word "hobby". It's easy to average way more than 40 hours per week on a hobby, and to spend those hours with as much deadly seriousness as the hours at work. Especially if you don't work full-time or don't work at all.

Re: Write-only code

#54
post #41
post #31

Earlier quoted context omitted.

Would I use a write-only HTML sanitizer for untrusted HTML: No! Would I care to review CSS, if my site "looks" good? No! The challenge becomes: how can we enforce invariants/abstractions etc without inspecting the code. Type systems, model checking, static analysis. Could become new power tools. But sound design probably still goes far.

> Could become new power tools. If this worked, it’d have worked on low cost devs already. We’ve had the ability to produce large amounts of cheap code (more than any dev can review) for a long time. The root issue is it’s much faster to do something yourself if you can’t trust the author to do it right. Especially since you can use an LLM to speed up your understanding.

True, but the cost of producing large amounts of cheap code just dropped by an order of magnitude (of maybe 3).

Re: Write-only code

#55
post #7

> LLMs are clearly a massive productivity boost for software developers, and the value of humans manually translating intent into lines of code is rapidly depreciating. This take is so divorced from reality it's hard to take any of this seriously. The evidence continues to show that LLMs for coding only make you feel more productive, while destroying productivity and eroding your ability to learn.

Re productivity: the METR study is seriously flawed overall, and: 1. if you disaggregate the highly aggregated data, it shows that the slowdown was highly dependent on task type, and tasks that required using documentation or novel tasks were possibly sped up, whereas ones the developers were very experienced with were slowed down, which actually matched the developers' own reports 2. developers were asked to estimat…

> We observed that participants who had access to the AI assistant were more likely to introduce security vulnerabilities for the majority of programming tasks, yet were also more likely to rate their insecure answers as secure compared to those in our control group.

https://arxiv.org/pdf/2211.03622

EOD

Re: Write-only code

#56
post #38

We already have effectively write-only code. It's all the assembly language and eventually machine code that we produce from other languages. The problem with "write-only code" as it relates to LLMs is that we don't have a formal definition of the input the the LLM, nor do people typically save the requirements, both implicit and explicit, that were given the LLM to generate the code. English language will never be a…

It will never work. Code is the documentation. The difference between Code -> IR -> binary is that the transition is deterministic. Doc -> Code is non-deterministic asf. And will never be. The only reason it works and we have senior, middle, junior engineers is the fact that assumptions on that path that senior engineers make are better than the ones junior engineers make. LLMs cannot make any assumptions though, as they have zero real world knowledge and thus zero common sense.

Re: Write-only code

#57
post #50

Earlier quoted context omitted.

It requires real work to create good documentation and review it. I've never worked in a place that requires that every commit update some documentation, but if you want to rebuild software based on the documentation, that's what it would take. The best you could say is that the typical development process today tends to scatter documentation across commit descriptions, feature docs, design reviews, meeting notes, tr…

It doesn’t though. You tell the LLM what to document up front, it can be some domain specific detail or whatever. You don’t need to carefully review it unless things go wrong. You do change propagation and change everything (tears, docs, code) in sync when some spec aspect changes, which involves a QA feedback loop, which judges the correctness of code and tests (because the LLM wrote the tests, they can be wrong). I…

The only docs that explain what code does are a carbon copy of the code. I've saw that "no-code, write docs, write spec" movie so many times, and it always ends as a flop in the box office.

Re: Write-only code

#58
post #39

I helped updating ancient fortran to slightly less ancient C once. The company that depended on the ancient fortran no longer had any fortran programmers. The resulting software upgrade was a nightmare that nearly killed that company. I shudder if someone needs to fix 20 year old AI write only code and I feel for the poor AI that has to do it. Because an AI 'intelligent' enough to do that deserves holidays and labor…

Do you mind sharing how exactly it turned out to be a disaster? What went wrong?

Nothing went 'wrong' per se. they just massively underestimated how much work it would be.

Stuff was badly documented. The documentation that existed was outdated compared to the existing code. Not all executable matched the source code they were supposedly built from. It was unclear if this was because of old compiler bugs, new compiler bugs or (probably) because the source code in the backups was not the actual source code used to compile the exes and that sourcecode was long since lost to time. etc etc

I can't remember the details, it's 20 years ago.

Re: Write-only code

#59
post #39

Earlier quoted context omitted.

Do you mind sharing how exactly it turned out to be a disaster? What went wrong?

Nothing went 'wrong' per se. they just massively underestimated how much work it would be. Stuff was badly documented. The documentation that existed was outdated compared to the existing code. Not all executable matched the source code they were supposedly built from. It was unclear if this was because of old compiler bugs, new compiler bugs or (probably) because the source code in the backups was not the actual sou…

Thanks for sharing. I wonder where AI-generated codebases land in terms of documentation. I bet it starts out okay or even great, but maybe degrades over time.
Post reply on HN