People keep assuring me that LLMs writing code is a revolution, that as long as we maintain sound engineering practices and tight code review they're actually extruding code fit for purpose in a fraction of the time it would take a human.

And every damned time, every damned time any of that code surfaces, like Anthropic's flagship offering just did, somehow it's exactly the pile of steaming technical debt and fifteen year old Stack Overflow snippets we were assured your careful oversight made sure it isn't.

Can someone please explain this to me? Is everyone but you simply prompting it wrong?

It's a good thing programmers aren't susceptible to hubris in any way, or this would have been so much worse.

You know, it isn't even that tools like this are useless. There are absolutely things they could be good at. I've personally seen Claude find stupid little bugs you'd spend an hour figuring out and hating yourself for afterwards with great efficiency. I tried the first iteration of Copilot, back when it was just an aggressive autocomplete, and while I had to stop using it because it was overconfidently trying to finish my programs for me without being asked, it was great for filling in boilerplate and maybe even a couple lines of real code for the basic stuff. We have models nowadays that are actually trained to find bugs and security issues in code rather than having the entire internets thrown at them to produce something Altman & Amodei can sell to the gullible as AGI.

But there's the problem. The technology has been around for a while, we have a good idea of what it's good for and, more importantly, what it's not. "Our revolutionary expert system for finding bugs in your code" isn't nearly as marketable to the general public, and the CEO class especially, as "our revolutionary PhD level sentient AI that will solve all the world's problems if you only give us another couple trillion dollars, and also wants to be your girlfriend." And so we get Claude and ChatGPT and RAM shortages and AI psychosis and accelerated climate change instead of smaller, focused models that are actually good at their specialist subjects. Because those don't produce as much shareholder value.

@bodil ”it was great for filling in boilerplate”

There’s your problem right there. Computer science should work towards getting rid of the need for boilerplate, not invent ways to write more of it.

Every piece of boilerplate is a failing of the language or library that you’re using, and is technical debt. Editing generated code doubly so.

@ahltorp @bodil Or just have a template source code file that you copy as needed.

@drwho @bodil Yes, if it’s really necessary, and that has been the traditional solution pre-LLM. But I would still call that editing generated code, even though the generation is static.

It’s much better to have language and/or library support that makes the boilerplate go away. We don’t make our IDE generate an assembly subroutine call template and edit that when we want a function call, we just write the function name and parameters with parentheses or whatever the syntax is in our language.

@drwho @bodil When I wrote a 4x4 matrix multiplier in assembly in the beginning of the ’90s, I needed a lot of repetitive code. Did I generate that? No, I wrote a macro.

I did generate some other code, but then that generation became part of the build chain, I didn’t copy-paste the result into a source file.

I don’t expect most people to write advanced macros, compilers or other code generators, but I expect language and advanced library designers to.

@ahltorp @drwho @bodil just wanted to say i think you're 100% right about this. and it would be interesting to see more highly abstract and ergonomic languages that not-super-technical people could use.