Top
Best
New

Posted by samrolken 4 days ago

Show HN: Why write code if the LLM can just do the thing? (web app experiment)(github.com)
I spent a few hours last weekend testing whether AI can replace code by executing directly. Built a contact manager where every HTTP request goes to an LLM with three tools: database (SQLite), webResponse (HTML/JSON/JS), and updateMemory (feedback). No routes, no controllers, no business logic. The AI designs schemas on first request, generates UIs from paths alone, and evolves based on natural language feedback. It works—forms submit, data persists, APIs return JSON—but it's catastrophically slow (30-60s per request), absurdly expensive ($0.05/request), and has zero UI consistency between requests. The capability exists; performance is the problem. When inference gets 10x faster, maybe the question shifts from "how do we generate better code?" to "why generate code at all?"
434 points | 318 commentspage 10
julianlam 4 days ago|
I can't wait to build against an API whose outputs can radically change by the second!

Usually I have to wait for the company running the API to push breaking changes without warning.

finnborge 4 days ago||
In N years the idea of requiring a rigid API contract between systems may be as ridiculous as a Panda being unable to understand that Bamboo is food unless it is planted in the ground.

Abstractly, who cares what format the information is shared in? If it is complete, the rigidity of the schema *could* be irrelevant (in a future paradigm). Determinism is extremely helpful (and maybe vitally necessary) but, as I think this intends to demonstrate, *could* just be articulated as a form of optimization.

Fluid interpretation of API results would already be useful but is impossibly problematic. How many of us already spend meaningful amounts of time "cleaning" data?

samrolken 4 days ago||
As an unserious experiment, I deliberately left this undefined for max hallucinations chaos. But in practice you could easily add the schemata for stuff in the application-defining prompt. Not that I’m saying that makes this approach any more practical…
sonicvroooom 2 days ago||
bus factor.
dboreham 3 days ago|
Another version of this question: why have high level languages if AI writes the code abd tests it?
taotau 3 days ago||
Because high level languages are where the libraries that do all of the heavy lifting exist. Libraries provide a suite of tools for absstracting away all of the complexities of creating a 'simple' web app. I think a lot of newer devs dont realise how many shoulders of giants they are standing on, and all the complexities involved in performing a simpl fetch requeust.

Sure an LLM could write it's own libraries and abstractions in a low level language, and im sure there are some assembler or c level web api wrappers, but they would be nowhere near as comprehensive or battle tested as the ones available for high level languages.

This could definitely change in the future. I think we need a coding platform that is designed for optimised LLM use, but that still allows humans to understand and write it. Kind of a markdown for code. Sort of like what OP is trying to do, but with the built in benefit of having a common shared suite of tools for interoperability.

rererereferred 3 days ago||
Yes, height of the language aside, why add a dependency to leftpad when the LLM can build the code for you every time? Extrapolate this to ORMs, why use the ORM when the LLM can build a custom query and map it to objects? And this will probably be more performant. Then extrapolate to the whole web framework? Where should we draw the line?
samrolken 3 days ago||
Most of today’s top models do a decent job with assembly language!