Live data from Hacker News

Show HN: Why write code if the LLM can just do the thing? (web app experiment)

github.com

171–180 of 332 posts

Re: Show HN: Why write code if the LLM can just do the thing? (web app experiment)

#171
Wow, thanks everyone. First HN post ever and it’s this intentionally terrible experiment that I thought was the dumbest weekend project I ever did, and it hit the front page. Perfect.

I’ve been reading through all the comments and the range of responses is really great and I'm so thankful for everyone to take the time to comment... from from “this is completely impractical” to “but what if we cached the generated code?” to “why would anyone want non-deterministic behavior?” All valid! Though I think some folks are critiquing this as if I was trying to build something production-ready, when really I was trying to build something that would break in instructive ways.

Like, the whole point was to eliminate ALL the normal architectural layers... routes, controllers, business logic, everything, and see what happens. What happens is: it’s slow, expensive, and inconsistent. But it also works, which is the weird part. The LLM designed reasonable database schemas on first request, generated working forms from nothing but URL paths, returned proper JSON from API endpoints. It just took forever to do it. I kept the implementation pure on purpose because I wanted to see the raw capabilities and limitations without any optimizations hiding the problems.

And honestly? I came away thinking this is closer to viable than it should be. Not viable TODAY. Today it’s ridiculous. But the trajectory is interesting. I think we’re going to look back at this moment and realize we were closer to a real shift than we thought. Or maybe not! Maybe code wins forever. Either way, it was a fun weekend. If anyone wants to discuss this or work on projects that respond faster than 30 seconds per request, I’m available for full stack staff engineer or tech co-founder work: sam@samrolken.org or x.com/samrolken

Re: Show HN: Why write code if the LLM can just do the thing? (web app experiment)

#172
I’ve been doing this for more than a year now, including APIs.

Where it breaks down is in the repeatability of experience from user user. It needs to have instructions that define the expectations of user experience across many people. Which ends up being a spec in code or code as spec.

Imagine if your door were to be generated every time you used it. The doorknob, key, even hinges would be different each time.

Ultimately, it is a new way to provide functionality but doesn’t quite remove all the code.

Re: Show HN: Why write code if the LLM can just do the thing? (web app experiment)

#173

Earlier quoted context omitted.

Because nobody actually wants a "web app". People want food, love, sex or: solutions. You or your coworker are not a web app. You can do some of the things that web apps can, and many things that a web app can't, but neither is because of the modality. Coded determinism is hard for many problems and I find it entirely plausible that it could turn out to be the wrong approach in software, that is designed to solve som…

Companies want determinism. And for most things, people want predictability. We've spent a century turning people into robots for customer support, assembly lines, etc. Very few parts of everyday life that still boil down to "make a deal with the person you're talking to." So even if it would be better to have more flexibility, most business won't want it.

Why sell to a company when you can replace it?

I can speculate about what LLM-first software and businesses might look like and I find some of those speculations more attractive than what's currently on offer from existing companies.

The first one, which is already happening to some degree on large platforms like X, is LLM powered social media. Instead of having a human designed algorithm handle suggestions you hand it over to an LLM to decide but it could go further. It could handle customizing the look of the client app for each user, it could provide goal based suggestions or search so you could tell it what type of posts or accounts you're looking for or a reason you're looking for them e.g. "I want to learn ML and find a job in that field" and it gives you a list of users that are in that field, post frequent and high quality educational material, have demonstrated willingness to mentor and are currently not too busy to do so as well as a list of posts that serve as a good starting point, etc.

The difference in functionality would be similar to the change from static websites to dynamic web apps. It adds even more interactivity to the page and broadens the scope of uses you can find for it.

Re: Show HN: Why write code if the LLM can just do the thing? (web app experiment)

#174
post #57

Earlier quoted context omitted.

> Because nobody actually wants a "web app". People want food, love, sex or: solutions. Okay but when I start my car I want to drive it, not fuck it.

Most of us actually drive a car to get somewhere. The car, and the driving, are just a modality. Which is the point.

Yeah but in this case your car is non-deterministic so

Re: Show HN: Why write code if the LLM can just do the thing? (web app experiment)

#175

If you added a few more tools that let the LLM modify code files that would directly serve requests, that would significantly speed up future responses and also ensure consistency. Code would act like memory. A direct HTTP request to the LLM is like a cache miss. You could still have the feedback mechanism allowing a bypass that causes an update to the code. Perhaps code just becomes a store of consistency for LLMs o…

Creating instructions and adding boundaries on how to grow, and you end up with a seed.

Re: Show HN: Why write code if the LLM can just do the thing? (web app experiment)

#176

The question posed sounds like "why should we have deterministic behavior if we can have non-deterministic behavior instead?" Am I wrong to think that the answer is obvious? I mean, who wants web apps to behave differently every time you interact with them?

Because nobody actually wants a "web app". People want food, love, sex or: solutions. You or your coworker are not a web app. You can do some of the things that web apps can, and many things that a web app can't, but neither is because of the modality. Coded determinism is hard for many problems and I find it entirely plausible that it could turn out to be the wrong approach in software, that is designed to solve som…

When I reach for a hammer I want it to behave like a hammer every time. I don't ever want the head to fly off the handle or for it to do other things. Sometimes I might wish the hammer were slightly different, but most of the time I would want it to be exactly like the hammer I have.

Websites are tools. Tools being non-deterministic can be a really big problem.

Re: Show HN: Why write code if the LLM can just do the thing? (web app experiment)

#177

Earlier quoted context omitted.

No, but the average user is capable of describing what they want to something trained in interpreting what users want. The average person is incapable of articulating the exact steps necessary to change a car's oil, but they have no issue with saying "change my car's oil" to a mechanic. The implicit assumption with LLM-based backends is that the LLM would be capable of correctly interpreting vague user requests. Othe…

The average mechanic won’t do something completely different to your car because you added some extra filler words to your request though. The average user may not care exactly what the mechanic does to fix your car, but they do expect things to be repeatable. If car repair LLMs function anything like coding LLMs, one request could result in an oil change, while a similar request could end up with an engine replaceme…

I think we're making similar points, but I kind of phrased it weirdly. I agree that current LLMs are sensitive to phrasing and are highly unpredictable and therefore aren't useful in AI-based backends. The point I'm making is that these issues are potentially solvable with better AI and don't philosophically invalidate the idea of a non-programmatic backend.

One could imagine a hypothetical AI model that can do a pretty good job of understanding vague requests, properly refusing irrelevant requests (if you ask a mechanic to bake you a cake he'll likely tell you to go away), and behaving more or less consistently. It is acceptable for an AI-based backend to have a non-zero failure rate. If a mechanic was distracted or misheard you or was just feeling really spiteful, it's not inconceivable that he would replace your engine instead of changing your oil. The critical point is that this happens very, very rarely and 99.99% of the time he will change your oil correctly. Current LLMs have far too high of a failure rate to be useful, but having a failure rate at all is not a non-starter for being useful.

Re: Show HN: Why write code if the LLM can just do the thing? (web app experiment)

#178
post #173

Earlier quoted context omitted.

Companies want determinism. And for most things, people want predictability. We've spent a century turning people into robots for customer support, assembly lines, etc. Very few parts of everyday life that still boil down to "make a deal with the person you're talking to." So even if it would be better to have more flexibility, most business won't want it.

Why sell to a company when you can replace it? I can speculate about what LLM-first software and businesses might look like and I find some of those speculations more attractive than what's currently on offer from existing companies. The first one, which is already happening to some degree on large platforms like X, is LLM powered social media. Instead of having a human designed algorithm handle suggestions you hand…

Sell to? I'm talking about buying from. How are you replacing your grocery store, power company, favorite restaurants, etc, with an LLM? Things like vertical integration and economies of scale are not going anywhere.

Re: Show HN: Why write code if the LLM can just do the thing? (web app experiment)

#179
post #54

Why would you need webapps when you could just talk out loud to your computer ? Why would I need programs with colors, buttons, actual UI ? I am trying to imagine a future where file navigators don't even exist : "I want to see the photos I took while I was in vacations last year. Yes, can you remove that cloud ? Perfect, now send it to XXXX's computer and say something nice." "Can you set some timers for my sport se…

Voice interfaces are not the be all and end all of communication. Even between humans we prefer text a lot of the time.

Plus there are many contexts where you don't want to use your voice (public transport, night time with other people sleeping, noisy areas where a mic won't pick up your voice...).

And there are people that unfortunately cannot speak.

Re: Show HN: Why write code if the LLM can just do the thing? (web app experiment)

#180
post #174

Earlier quoted context omitted.

Most of us actually drive a car to get somewhere. The car, and the driving, are just a modality. Which is the point.

Yeah but in this case your car is non-deterministic so

Well the need is to arrive where you are going.

If we were in an imagined world and you are headed to work

You either walk out your door and there is a self driving car, or you walk out of your door and there is a train waiting for you or you walk out of your door and there is a helicopter or you walk out of your door and there is a literal worm hole.

Let's say all take the same amount of time, are equally safe, same cost, have the same amenities inside, and "feel the same" - would you care if it were different every day?

I don't think I would.

Maybe the wormhole causes slight nausea ;)

Post reply on HN