News for hackers. Stuff that matters.
Re:AI can code, but it can't build software by CjHuber on Monday October 27, 2025 @08:36PM (#45728065)
Can you maybe give an example you’ve encountered of an algorithm or a data structure that LLMs cannot handle well?

In my experience implementing algorithms from a good comprehensive description and keeping track of data models is where they shine the most.

Re:AI can code, but it can't build software by prmph on Monday October 27, 2025 @09:11PM (#45728270)
Example (expanding on [1]): I want to design a strongly typed fluent API interface to some role/permissions based authorization engine functionality. Even knowing how to shape the fluent interface so that is powerful but intuitive, as strongly typed as possible but also and maintainable, is a deep art.

One reason I know LLM can't come close to my design is this: I've written something that works (that a typical senior engineer might write), but this not enough. I have evaluated it critically (drawing on my experience with long lived software), rewritten it again to better meet the targets above, and repeated this process several times. I don't know what would make an LLM go: now that kind of works, but is this the most intuitive, well typed, and maintainable design that there could be?

1. https://news.ycombinator.com/item?id=45728183

Re:AI can code, but it can't build software by simonw on Monday October 27, 2025 @09:47PM (#45728443)
Funny you should use role/permissions as an example here, I spent the weekend using Claude Code to rewrite my own permissions engine to a new design that uses SQL queries to solve the problem "list all of the resources that this actor can perform this action on".

My previous design required looping through all known resources asking "can actor X action Y on this?". The new design gets to generate a very complex by thoroughly tested SQL query instead.

Applying that new design and updating the hundred of related tests would have taken me weeks. I got it done in two days.

Here's a diff that captures most of the work: https://github.com/simonw/datasette/compare/e951f7e81f038e43...

Re:AI can code, but it can't build software by YZF on Monday October 27, 2025 @09:48PM (#45728452)
What % of the total amount of software (lessay lines of code or time invested) in the world is like that?
Re:AI can code, but it can't build software by realusername on Tuesday October 28, 2025 @02:55AM (#45729848)
Working on permissions for a large saas app, I can also confirm that the best LLM of the market have maybe a 10% success rate writing code in this area.
Re:AI can code, but it can't build software by manwe150 on Monday October 27, 2025 @08:59PM (#45728208)
Converting an algorithm implementation from recursive to iterative: it got the concept broadly right, but was quite bad at making the logic actually match up, often refusing to fix mistakes or reverting fixes two edits later. Still a positive experience though, since it was fixable issues and reduced the amount of tedious copies I had to type
Re:AI can code, but it can't build software by cadamsdotcom on Monday October 27, 2025 @09:06PM (#45728239)
Did you have it write tests and give it the ability to iterate & validate its implementation without you in the loop?

Anything less is setting it up for failure...

Re:AI can code, but it can't build software by manwe150 on Monday October 27, 2025 @09:14PM (#45728286)
Yes, but it got 99% of those then got stuck on why the others made no sense to it
Re:AI can code, but it can't build software by cadamsdotcom on Tuesday October 28, 2025 @05:01AM (#45730595)
It’s important to understand the tests it’s written yourself.

If you’d like some help I’d be glad to, just drop me an email.

My email’s in my profile.

Re:AI can code, but it can't build software by NicoJuicy on Monday October 27, 2025 @10:10PM (#45728577)
There are severe edge cases. Here are some of the last days.

Eg. Just updating bootstrap to angular bootstrap. It didn't transfer how I placed the dropdowns ( basically using dropdown-end). So everything was out of view in desktop and mobile.

It forgot the transloco I used everywhere and just used default English ( happens a lot).

Suggested code that fixed 1 bug ( expression property recursion), but now linq to SQL was broken.

Upgrade to angular 17 in a asp.net core app. I knew it used vite now. But it also required a browser folder to deploy. 20 changes down the road, I noticed something on my ui wasn't updated in dev ( fast commits for my side project, I don't build locally), it didn't deploy anything related to angular no more...

I had 2 files named ApplicationDbContext and it took the one from wrong monolith module.

It adds files in the wrong directory sometimes. Eg. Some modules were made with feature folders.

It sometimes forgets to update my ocelot gateway or updates the compressed version. ...

Note: I documented my architecture in eg. cline. But I use multiple agents to experiment with.

Tldr: it's an expert beginner programmer.

Re:AI can code, but it can't build software by simonw on Monday October 27, 2025 @10:41PM (#45728737)
Do you have any automated tests for that project?

I'm bringing to suspect a lot of my great experiences with coding agents come from the fact that they can run tests to confirm they haven't broken anything.

Re:AI can code, but it can't build software by NicoJuicy on Tuesday October 28, 2025 @03:30AM (#45730034)
Too little.

Things moved as fast as possible to migrate from .net framework to .net core 8, angular 8 to 18 and bootstrap 4.5 to 5.x

Re:AI can code, but it can't build software by solumunus on Tuesday October 28, 2025 @03:53AM (#45730154)
The test loop is integral.

It’s kind of annoying hearing all this skepticism from people putting in the least effort into optimally using the tool. There is a learning curve. Every month I’ve gotten better results than the last because I’m constantly context building and refining, understanding how, what and when to prompt.

It’s like hearing someone say database suck but they haven’t bothered to learn about or use indexes or foreign keys.

Re:AI can code, but it can't build software by NicoJuicy on Tuesday October 28, 2025 @07:10AM (#45731350)
Most of the mentioned issues wouldn't be catched by a test loop unless you have 100% automated tests (unit tests, ...)

Which isn't always plausible ( time ). The AI makes makes different mistakes than humans that are sometimes harder to catch.

Re:AI can code, but it can't build software by simonw on Tuesday October 28, 2025 @11:04AM (#45733787)
It's a lot more plausible now you can get LLMs to help write those tests in the first place.
Re:AI can code, but it can't build software by NicoJuicy on Tuesday October 28, 2025 @09:23PM (#45741507)
Most of these examples build ( shallow test in my LLM on the end of the task ) and produced new edge cases
Re:AI can code, but it can't build software by herbst on Tuesday October 28, 2025 @04:34AM (#45730403)
Claude added a self re-calling timeout to my Typescript game loop to track time. Manually by adding 1000ms every time it's called.

I removed it and it later just added it again.

It's this small weird things where it can mess up a lot of code.