Hacker News new | ask | show | jobs
by bagacrap 55 days ago
Is there something about an LLM that makes it incapable of simplifying a codebase? I have only seen that the slop jockeys who wield LLMs most ardently don't seem to care about that, and that older models were worse at everything, including that.
2 comments

I try this really hard but it seems that getting an LLM to simplify a code base meaningfully is a much harder problem than getting it to output mostly functioning features very quickly.

They are great at adding but reducing takes much more hand-holding in my experience. Maybe this will improve, maybe it does not matter, maybe I am holding it wrong, I don't know.

I tend to think this is mostly because the training set has generally been "low quality code cranked out as fast as possible" and the goal has been "do more of that". After all, most code in general is mostly throwaway. And most frontier model labs are startups where code is short lived.

Different goals/context/training is all I think it takes to change this. Though yes, for now, I revel in my role as the one who can contribute a touch of elegance to the stupid robot's solution.

Edit: and yes, better models, but I think the Sol-generation are already good enough.

What models are you using?
Mostly Claude code so Opus and Fable in recent versions.

It is not that they cannot simplify or refactor, but understanding how a codebase can reasonably be tidied up seems hard for them.

Weird, does not seem my experience. Then again we have loads of code where claude can look up our best practices and just copy it for another module, and we try to do everything as idiomatic as possible. Especially Opus 5.5 seems to be very good at this. It really is a step up even from Fable 5.1.

Also when doing a cleanup session we do give pointers where we see friction. That seems to help point it in the right direction.

No. Coding agents are great at simplifying, they just need to be told to do it.

I often see agents skip opportunities for simplification when not explicitly prompted. I have mixed feeling about this, but for now I think it's probably for the best that they stick to the script versus take initiative for things they haven't been told to do.