Live data from Hacker News

Measuring the sloppiness of code

earendil.com

131–140 of 247 posts

Re: Measuring the sloppiness of code

#131

Earlier quoted context omitted.

You come across as someone who has never worked on a real software project. Humans create tons of bugs on a regular basis. AI is already better than most programmers.

Better at writing one piece of code, maybe. Better at writing code within a huge system, definitely not. Maybe in the future, but as of Astra, Fable 5.1, the answer is still no.

Disagree. I have 200k LOC now plus 100k in tests, and it is still performing like it was four months ago when I started to seriously use AI.

If anything, it works more reliably today with the smarter models.

Re: Measuring the sloppiness of code

#132

Coding might be "solved" but coding still is the best way to build your own mental model of the solution space. Which is more important to you: Velocity to a solution? Or velocity to understanding?

Interesting way to lay it out. For us understanding is obviously crucial for prod and repeatable business functions. Velocity to solution is default for almost everyone else, especially one-off or low impact / low consequence of failure projects.

Velocity to solution is default for senior management, that's for sure ;)

Re: Measuring the sloppiness of code

#133
Coding is solved, perhaps, with unlimited token spend on a frontier model. It remains to be seen if it that is prohibitively expensive forever. At my company, we token maxed while the getting was good. But when we had to switch to Anthropic's enterprise plan, and start paying per token, the shit really hit the fan. Now we're retreating back to sane cost levels and finding that - guess what? - people power might just be more cost effective. AI of course is an immense tool to leverage, but still too expensive to create loops and let it run. This will change over time of course, but assuming it is a solved problem is nonsense. Maybe if we solve cold fusion, yes. Until then, evolution is winning the war on entropy.

Re: Measuring the sloppiness of code

#134

Earlier quoted context omitted.

Right. It feels like we're living in a parallel world or something. Can agents code? Sure. Can you let them code on their own for a serious production project? Not a chance.

Plenty of serious production projects are doing exactly that. Are you using GPT-6 Astra, or something older?

Which serious production projects have AI agents coding on their own? And I’m assuming that means they are routinely taking tasks and deploying them to production autonomously

Re: Measuring the sloppiness of code

#135
post #104

Earlier quoted context omitted.

> Efficiency, security, maintainability, reliability, readability, understandability, extensibility, maintainability, observability, portability My experience is a little different. For higher abstraction languages the output is largely acceptable in my work. I always consider that LLMs don't know what I don't tell them and they have limited context to work from. Coding issues I often identify: * Efficiency. Marginal…

This sounds roughly right to me, except for "maintainability". In my experience, agents really don't like deleting code unless you explicitly ask for it. If you're not careful, you end up with new better implementations of things but with the old implementation still around in perpetuity. Humans do this too of course.

The shadow of Chesterton's Fence is relevant. The LLM doesn't know why code exists, if it doesnt start traversing up the scope of a project. Even then, it can't be sure that the code isn't a dependency of something else outside the project (especially if there's a side effect). I'm not sure it's ever going to be easy to address this concern in a straightforward and portable way.

I do sometimes see duplicate functions, which is troubling.

Re: Measuring the sloppiness of code

#136

I love this train of thought. Code quality is critical, but I don’t think we’re correctly evaling it at the moment. If we could get solid benchmarks measuring the quality of generated code, we might see the models climb those benches fast. I believe that the era of “ai writes tons of slop code” will be a stepping stone in the longer story, and is simply a current gap in the reward functions. Per the author - if we ca…

If you could easily benchmark the quality of code then models would be trained on these benchmarks/metrics.

Code quality is probably isomorphic to the halting problem, or can be reduced to the halting problem in the simplest case. I.e. it’s intractable.

Re: Measuring the sloppiness of code

#137

There is some sense of rose-tinted glasses of pre-LLM coding. A lot of human written code, particularly at the enterprise level, was of low quality well before AI automated it.

Are you saying that pure vibe coding by a non-technical person produces better code than pre-LLM developers, or that experienced dev + AI produces better code?

Both of those things are very different, and AI shouldn't be the one taking the credit if it's the second case.

Re: Measuring the sloppiness of code

#138
Recent PR I had to review...

PR content:

``` Lots of AI slop.... .... .... Note: this will not build due to XYZ .... .... More AI slop .... .... End of PR ```

So the dev hadn't even read the PR comment himself and had blindly posted it!

Re: Measuring the sloppiness of code

#139
I have no idea where most people writing code have worked at but in all product and platform teams I worked at the code quality has been much higher than the latest slop SOTA llms can output.

TLDR: coding is not solved.

I have 2 projects, one it's a distributed platform, the other one is a general processing engine with an inner workflow engine; Since gpt 5.2 I've tried new models to work in these codebases where the code is of good quality and every time I gave the model a slice of work instead of a single step from that slice the code, the tests, the comments, the docs and everything else has been suboptimal, unmaintainable, complex, bloated and just slop, unless I micro-manage and do many passes.

As a dev when you make a change you consider the broad picture, you consider the user, the codebase, future requirements, maintainability, performance, your team's understanding and some of these you do unconsciously. We are slow but that's for multiple good reasons, you push the organization/understanding forward not just loc of that specific project. I can't count how many PR notes or comments I've added considering teammates or just for a specific team member.

I don't see any way forward for an LLM to reach that unless it reaches general problem solving, my definition of GAI that could tackle software development or "coding" would be a model that doesn't require additional pretraining to solve new tasks or improve how it solves tasks in the future, it would just learn as it's going.

Can everything I mentioned be solved with current generation of LLMs and lot's of markdown and gates? Maybe... but the amount of effort required would be similar to the effort an expert system (pre-llm AI) would require to embed the rules, evolve them, check them everytime... which would require billions or trillions of tokens.

---

off: I really like the discussions around how to prevent slop and bloated code as it's something it would benefit coding even without LLMs and can fit as another piece of automated infra for checking and ensuring code quality, I hope something materializes.

Post reply on HN