Post

The more I work with LLM code the clearer it is that it's terrible at it. The context window is never large enough, and RAG can fill some gaps in tightly written modular code, but LLMs specifically will not write code like that. They both can't handle bloat and write almost nothing else...

Keith Henry@k17.dev

I hate reviewing LLM PRs, just had one with similar user auth checks in middleware (with a 401), DI in the service (returning null), and as static calls in every action (throw new Exception). At least 3 checks of the user with every request. We already had user auth in a library.

It never extracts repeated code to a method, it never abstracts a re-used set of methods to a DI interface, it uses try-catch everywhere and re-implements from scratch every chance it gets. Now if, IF, it could keep all this together that might not matter - it works and you can just vibe code on...

But it doesn't. It rapidly fills a context window with crappy code, and (if you're lucky) finds that with RAG next time you ask it, but much more likely re-implements in a slightly different (but still crappy) way, and then repeats until you have 100x mode code than you need...

If you ask for something from scratch it's surface-level impressive but everything implemented 3 different ways and exponentially more code every time you try to iterate...

Give it a tight, modular, SOLID code-base - code it adds typically won't be, but it also only uses any of that modularity as long as the RAG can find it. Like it has 20 single-responsibility services, but can't find the one it should use and so either re-implements it or bolts that on to another...

Every app written this way basically takes the technical debt you usually build up over years with a large team, and compresses that into a few sprints. Instead of rework/refactor after a decade, you're doing it between prototype and production. LLMs are software progeria.

1 repost0 likes

I think there might be a hard mathematical limit here, something like: an LLM can maintain an app until the code + reflection/RAG reaches it's context window, then everything it adds past that gets exponentially worse in a vicious cycle of more crappy code making it harder to write less crappy code