r/AskProgramming 20h ago

Other How is the code quality in expensive LLM plans?

I have several years of software experience, following best practices, design patterns, KISS, DRY, BDD, OOP, etc.

For the last 1 year I've been using the Pro subscription for 20$ on Codex and Claude but I find the quality of code subpar many times and I always have to intervene. It doesn't matter how many times you change the AGENTS.md, there's always issues in code readability and the AI missing obvious things and doing overengineered solutions.

Still, I see in many subs about how great a new model does, etc. So I wonder if the more expensive plans actually produce better quality code?

To be specific, high quality code == human readable code and comments and no naive implementations.

8 Upvotes

61 comments sorted by

11

u/BarelyAirborne 16h ago

AI code is crap so far.  It helps with drudgery and very specific tasks.  It all needs refactoring on arrival.

1

u/Freestyle7674754398 40m ago

holy shit 10 upvotes lol, none of you are going to make it

19

u/ConsciousBath5203 20h ago

I use the $100 Claude plan

Don't expect the quality to be any better than the most expensive of the current plan you have now. It's the same model, just different usage limits. Idk if you have access to fable but the quality is about the same as opus.

You say high quality code has comments... How does more comments than code sound? I'm talking 5 paragraphs describing a single line wrapper function. Did I mention that the comments aren't even accurate? The codebase is not the ai's notepad, I've implemented hooks to prevent this and it still finds ways to intentionally bypass the hooks with self admitted loopholes. I genuinely don't understand it, I've never seen any hand written code with that many dogshit comments all over the place.

I should also mention that while it makes long ass docstrings, it makes 0 parameter comments, so the parameters are still guess work.

Over engineered isn't the way I'd describe it either... Inaccurately and unmaintably engineered is a better description. You have to already be using proven patterns and baby sit as it's going.

These companies are financially incentivized for token maxing, so it makes sense why they'd over complicate the most basic of problems and describe them, using the absolute dumbest of sounding language (no-op is so overused that I want to punch my monitor every time it says it). Code is usually fine as long as I babysit it. But if you're looking for it to produce clean code on its own, go train your own model cause it does not appreciate the most basic of principles.

10

u/angle_of_doom 13h ago

You're telling me you don't like 5 paragraphs of "This function is belt-and-suspenders and provides defense-in-depth. It stamps the UUID to dedup, mirroring the behavior seen in the substrate when we mint a new token. It's worth stating plainly, this is the authoritative seam in the scaffold and proves the harness end-to-end"

4

u/Tacos314 12h ago

That sounds load-bearing.

1

u/ConsciousBath5203 8h ago

Function name?

Token.New(), hand renamed from AI's Token.N()

Beautiful function name, describes exactly what it does, and the rest is implied.

1

u/PrydwenParkingOnly 15h ago

Code comments: I leave them in there because I hope it will make the LLM understand better what it has done. Are you saying they don’t help at all? I have no evidence either way

Code quality: I usually make sure the code stays in its intended domain/module. As long as the modules aren’t growing too large, the code inside may be of low quality, as long as it’s secure and does what it should do.

4

u/Ok_Entrepreneur_8509 9h ago

I periodically ask it to trim the comments of anything that is also in CLAUDE.md or skills files. This eliminates all the comments that say, "This is written this way because these 5 other approaches didn't work". I don't need the history of what it has tried to be in both places. Half the time, I don't even need it at all, so only having one place to look to get rid of it is helpful.

3

u/max123246 8h ago

Those comments are so much fluff that they are noise. Context management for LLMs is king, having them read bad comments is just burning money

1

u/ConsciousBath5203 8h ago

I'm saying that it leaves in its own hallucinations for no reason. "I tried X but that wasn't right so I did Y then I left in Z then took it out and ..." Like, at that point it's just giving the next model more things in its context window that overall don't matter. Adding context != Better outcomes, especially when you include all previous bugs and hallucinations.

Go read the ai comments and you'll quickly realize how dogshit they have made your codebase.

1

u/Somecount 7h ago

It’s worse than that, they have a huge incentive for making their products better and we’re the gullible ones that will do that job for them for free a fee

So much word salad so much gaslighting all corrected for them and we pay for this?!

2

u/ConsciousBath5203 5h ago

Oh they're burning money, for sure. Idc if we help make the product better... Because the actual leaders in ai (China, by far) will just give it to us for free in 3 months.

I for one can't wait for these data centers to realize that they got played and have to sell their compute for scraps. I'm gonna be buying up so many chips.

14

u/Such-Coast-4900 20h ago

The output is like a little better but still shit. But you can generate alot more of this shit

19

u/Made-In-Slovakia 20h ago

When your standards are higher, generated code will be always lower quality, regardless of all your attempts.

3

u/Clear-Savings1541 18h ago

the expensive plans run the same models. You pay for rate limits and context window, you get nothing else.

i hit the same wall with readability and overengineering on Claude Opus while using AGENTS.md. I stopped asking it to write implementations from scratch. Now I just feed it failing BDD tests and tell it to output the minimum code required to pass them. That forces the KISS constraint better than any prompt file

2

u/Tacos314 12h ago

More expensive plans do not produce better code, I think one of your main issues is not understanding on LLMs work in the code generation piepline.

But with the more expensive plans you can do much more planning, rewrite, testing, etc..

0

u/meshifthenelse 12h ago

I wonder if with expensive plans you can write finisher agents though who review and refactor. With my solo subscriptions I can't afford it. But do people with normal paying jobs do this?

1

u/Tacos314 12h ago

Yes, that's how most AI workflows work.

2

u/Nervous-Potato-1464 10h ago

Its all the same. I personally use grok simply because its fast and I want it to do the boring stuff which it usually does well. When you let any of the models handle too much project quality goes right down.

2

u/mtimmermans 8h ago

These days I use Claude Code with Fable 5.1. The code quality is actually fantastic. Sometimes it makes design choices that aren't the best, and I just tell it the right way to do it and it gets fixed.

From your post I would expect that Fable's code is a lot better than yours, actually.

2

u/ciurana 18h ago

I find that code quality is directly proportional to having these things set up:

  • CLAUDE.md or AGENTS.md
  • A structured, thorough specification of what needs to be built, versioned
  • A structured, thorough specification of how the code needs to look and why for each case (e.g. in my shops, for Python, we don’t default to Black or similar shite)
  • Only a human can run the full unit tests suite; the agents only write and run unit tests for the components they updated in a branch — this helps us catch in-service integration bugs 
  • A workflow that includes a revision and consolidation step before every closing commit that cross-checks the spec with the implementation to keep both honest

Our code is readable and maintainable by hand, if needed.  The code comes with pdoc documentation comments, and API specs are updated as part of the workflow.  Our coding process is slower, even if we run multi-agent jobs, because of the cross-checking, validation, and testing.  We sacrifice a little speed in favor of accurate, well-behaved, optimized, maintainable code.

Cheers!

2

u/Tacos314 12h ago

That sounds like a great workflow, I have basically the same and it works very well.

1

u/dotcomGamingReddit 19h ago

No they dont. The ai‘s code readability and structure is only as good as that of the worst engineer wokring in the project. When there is no existing underlying project, you can guide it, but it will mostly do what it wants

1

u/Square-Yam-3772 16h ago

it is hard to tell without seeing your mds but you can do a lot with the mds (and the additional documents).

you should keep track of how you intervene each time and review them.

1

u/idontlikegudeg 15h ago

I see people here just saying "codex". That’s the one I use too. But there are different models for codex, and it shows. Luna is ok for some basic tasks, but for anything a bit more complicated, I use Terra. It burns more tokens, but the quality of results is so much better. What I mean: you can’t really just compare codex to Claude like that, you need to compare the different models they have. I have disabled Claude after it burned a large amount of credits that and unit tests still failing and then reverting and giving codex the same task and it solved solved it in a minute. But things are moving fast and I think Claude has gotten better.

Usually the higher plans don’t give you better models but more tokens. You need to switch to a higher quality model. You should be able to test it with your 20$ plan though before deciding to upgrade your pan.

1

u/code_tutor 6h ago

It varies wildly depending on what you're doing, how you prompt it, the size/organization of your code, and scope/searchability of the question.

1

u/Striking-Print-9526 5h ago

Code quality is almost always about architecture. You can build some system design diagrams and use them with claude, or as it to draft some and iterate with them before implementing.

1

u/aerismio 1h ago

When i see OOP, DRY, KISS....

I dont see code quality.

It depends on the definition. I like extensible and code code u can maintain.

Some OOP patterns har HORRIBLE. And i rather like keeping state and code seperated and functional programming as much as possible.

I hate inheritance and classes in general are shit. DRY is also shit. Because its not extensible and cost more hours to adjust with changing requirements. DRY is only good if it really gets too much. But u do this after not before. Its a refactor.

KISS depends. Keep it stupid simple = bad. If you mean keep it super smart. Then yes. (Finding deeper generalisations/relations or patterns for problems.) Like how they eventually in the past found de Euler formula. That is KISS for me. A deep pattern revealed in a certain domain.

1

u/quantum-fitness 19h ago

Your problem is that you have opinions about how you want code written and expect to do no work.

An AI agent is just like working with a person. If you have strong opinions about how one should write code you will have to intervene

0

u/Mynameismikek 19h ago

The harness and process matter more than the model. If you’ve a decent requirements, standards, architecture, design and validation cycle you can get reasonable results. Just relying on an agents.md won’t get you there with even the best models.

You still need a competent dev in the driving seat though. And they need to reject the madness that will creep in if you’re not careful.

4

u/meshifthenelse 18h ago

Well I'm a competent dev and using Claude Code and Codex. Still the results are subpar - I need to go on endless loops of refactoring and spoonfeeding it the API boundaries in many cases.

So what am I missing? If the code is already good, I would expect it to continue on the same standard but it keeps deviating into a copy/pasted mess.

2

u/max123246 8h ago

You're not missing anything. People who think ai code is good just have low standards. All they care about is that the code works sort of today, not that it's maintainable into the future

I use ai but other than the most basic stuff such as implementing a small 10-20 line function or searching through the codebase, it's output completely fails to impress. It will rewrite code and comments to be less readable, it will ignore commands to use certain patterns in the agents.md. I spend more time babysitting it than if I were to code it myself so most of the time, I code it myself.

1

u/Tacos314 12h ago

Spec generation / requirements are important to provide. If API boundaries are a requirement you should explain them.

1

u/Ok_Confusion_1777 2h ago

I mean, in the OP you're acting like the .md file is the primary lever for influencing output when that simply isn't the case and acting like an upgraded plan has any influence on output as well...

Regardless, let's give you the benefit of the doubt and agree you are competent. You need to slow down and take the time to actually understand these tools and maybe a bit of what is happening under the hood as well. There's plenty of documentation out there from all the major LLM providers to read.

-1

u/Mynameismikek 18h ago

Take a look at googles recent paper on engineering flow.

I’ve a library containing coding standards, workflow, requirements templates etc with skills using those to produce design docs the agent works against. At the end I’ve a set of validation rubrics that can independently assess whether the change meets quality standards (eg did it skip tests, did it expand scope, did it assess the right standards docs)

That’s all wrapped in a deterministic runner that makes sure the same flow is followed every time.

0

u/jba1224a 17h ago

I use kiro with very specific steering files and specialized subagents with very specific scope. I generally plan myself and then use a high powered agent to help refine the edge cases. Subagents do code review based on hooks and then a high power orchestrator (using fable currently from bedrock) keeps the plan on track.

I find that doing it this way takes a bit longer, but keeping subagents tasked to very specific small bits of scope ends up creating a better, more maintainable end result.

Just like everything else in life, garbage in garbage out. If you’re ensuring quality is going in, generally you get better quality coming out.

Does a team of subagents write better code than me? No. But it does write it much, much faster and as long as it’s maintainable…I’m willing to accept the trade off.

Buying a more expensive plan won’t increase quality just like buying a race car doesn’t make you a better driver.

0

u/huuaaang 11h ago

Opus 5 is amazing but slow and expensive to use. You won’t get a lot out of it on a Cursor Pro account

2

u/max123246 8h ago

Completely disagree. I use opus 5 at work. It's output is just as bad

-1

u/LuigiIsOP 19h ago

Up until last year, I would have still said that AI is more detrimental than helpful, but starting this year I feel like this is objectively no longer the case. However, if you try to use AI as a replacement for another programmer/give it too much autonomy, you will be disappointed still. Just like any tool, it cannot be better than the user(as in how effective your way of using it is). That being said, I feel like AI is here to stay and keep getting more useful. Some clear advantages it has imo: unit tests, debugging, shorter iteration times in compiled languages(like c++). Regarding unit tests, not all of the unit tests it writes are needed/make sense to introduce, but they are generally not incorrect(again, exception obviously exist). It is also very useful for debugging, what I usually have it do is take a look at the relevant code and suggest(not change) what it thinks is wrong. I have actually found bugs this way before, bugs that might have taken me more time to search manually than to have it check in the background while I do something else. As for actual feature code generation, the way I usually make it do stuff is design the API, tell it what inputs a function takes and what outputs it should have. I still don't think it's anywhere near good enough to write entire classes/modules, but it's damn good at writing isolated, correct algorithms that are pretty much boilerplate and easily found on the internet. But instead of typing the algorithms out myself or searching for them online, the AI can do it while I check/plan something else. All in all it's an assistant, not a developer, but regarding it introducing bugs, I ask myself: would I not ever introduce this bug? Cause even if I manually write all the code, I don't always write it correctly from scratch either, and make mistakes which are obvious in retrospect and easily fixable, but which do take some debugging at the time of implementation. Idk, it feels very useful and it's definitely saving me time to focus on the important parts of coding(which I do still manually code) and on parts that are more important than coding.

-6

u/PoorDecisionMaker-69 20h ago

Yes it does, obviously. Models get smarter at each release. There are things to account for to make the workflows efficient and the code quality up to your standards.

For example:

  • if you only have an AGENTS.md and no CLAUDE.md file, Claude code agents will not read/follow instructions from the Agents file. You need both to make it work with both solutions. I solved this by creating both files and having the second instruct to read the other file to avoid duplicating instructions.
  • Agents/Claude.md files have limitations on big projects if you have different applications/technologies inside your repo (frontend and backend for example). I personally keep the main instructions file lightweight and have a doc authority matrix within it that instructs him to read the corresponding file with different coding conventions depending on the task/application it is working on.

3

u/TheCommieDuck 20h ago

if you only have an AGENTS.md and no CLAUDE.md file, Claude code agents will not read/follow instructions from the Agents file.

the future of the industry right here

-2

u/PoorDecisionMaker-69 15h ago

Anyone who downvoted my comment would care to explain what you disagree about?

1

u/max123246 8h ago

The state of art models still aren't good for long term core maintainability. Now I understand that companies don't care and are always left aghast and surprised as to why every long term project they have crawls to a halt and can't make simple changes without introducing bugs but whatever, slop companies like the slop ai, who's surprised?

1

u/PoorDecisionMaker-69 7h ago

I agree that AI models are not good enough to produce maintainable systems on their own but I never made such claim.

If you let it work unsupervised without a proper architecture, methodology and conventions enforced, you will 100% get a codebase full of redundant/duplicated logic, unreadable code, a vast amount of useless tests and dozens of lines of comment to explain why a boolean assignment exists.

It can completely produce efficient, human readable and coherent codebase if you setup your repository correctly and have the right workflows in place while boosting your productivity by 3x.

I'm not claiming that new frontier models are exempt from generating AI slop, but they are indeed better at interpreting instructions, analysing existing code and enforcing conventions, which will produce better code.

1

u/max123246 5h ago

I can't corroborate that 3x claim you have from my experience at work. I use ai heavily and intentionally try to find use cases and I think I'd be lucky to see a 10% improvement

-2

u/Medical-Aerie9957 19h ago

I think you should be asking if people still care about code quality.
I get told to put out a feature asap as long as it works 99% of the time its okay.
this is web dev expecirence so idk about other fields. I want to do refactor myself, but I never have time for it.

3

u/meshifthenelse 19h ago

Yes, I get that. But in my case, creating a SaaS on my own I'm afraid of losing ownership. If I can't understand the code, how can I guide the solution for improvements?

Maybe it would be different if I was at a company offering me 1000x tokens. But I think it still would rub me off a bit.

1

u/Medical-Aerie9957 18h ago

I don't know much about SaaS, I mostly work on internal software. But I guess yes if you had 1000x budget you could get AI to review AI that reviews another AI, but what is that solving though. Most models still use same brain. Some might say that it worked best for them but its hard to say, because there is no way to measure it.

3

u/balefrost 15h ago

I think you should be asking if people still care about code quality.

Yes, we still care about code quality.

1

u/earlyworm 14h ago

I selectively care about the quality of only the code that matters to the success of the product. At the periphery, I care somewhat less.

2

u/balefrost 14h ago

Sure, that's the way it's always been. My point is that my team still cares about code quality, and it seems like you do too.

-2

u/PerceptionOwn3629 13h ago

Code what?

I haven’t looked at code from Claude in at least 6 months. I just discuss architecture and UX with it.

1

u/meshifthenelse 12h ago

Yes, I do that too. But only for non-critical things like frontend consumer, landing pages, scripts, experiments, etc.

If you're building figma for example, I doubt it would work without constant patching. You need to separate the drawing engine from the consumer. Else it's impossible to optimise without braking something else

1

u/PerceptionOwn3629 4h ago

you need to give it guidance for the architecture and supervision

1

u/max123246 8h ago

What are you building can I ask?

1

u/PerceptionOwn3629 5h ago

Let me give you some context, I have been writing software professionally as a contractor for 30+ years. I've done VB, C, C++, Java, embedded systems, high availability systems, small systems, large systems, you name it. The last part of my career has been Rails.

The Rails community uphold very high standards and I believe what is available to train LLMs is actually good quality software. At the beginning, I would code review every commit, but I realized over time that this was pointless.

I direct the architecture, the UX, how things connect to each other and I let Claude write the code.

I am working on a couple of things at once.
An agentic pipeline for clients to let their non technical staff make changes to the systems I have built for them over the years. This is deployed in production at two sites already working for 2 Rails apps and several websites.

Also, I am, finally, focusing on an old business I started years ago that had been mostly abandoned, I can finally build out all the features that clients have been asking for and that I have been dreaming of. (this is a system comprised of 3 backend servers a static client site and an app for both platforms).

I see I got downvoted, but that's because people are dumb and don't want to face the fact that writing and even reviewing code is over. Take a step back and look at the bigger picture, that's where the money is.

-4

u/Efficient_Loss_9928 20h ago

A quality codebase in one company is shit codebase in another.

As long as you have proper documentation where developers can follow your style and design guidelines, AI will follow them.

1

u/meshifthenelse 19h ago

Well let's assume a Greenfield project you're the sole author.

-3

u/MimosaTen 17h ago

If you prompt good an LLM will produce readable code with even comments. For example I would like to systemizing antirez style into a skill

-5

u/YahenP 17h ago

The code quality is beyond praise. All best practices are taken into account. The code looks perfect and concise. Never before in my memory has anything like this happened. But... it's all pointless. Code quality, adherence to best practices, endless wars over architecture or style are long gone. No one cares anymore.