Am I the only who feels this way abou AI generated code?
Posted by Trick_Boat7361@reddit | ExperiencedDevs | View on Reddit | 58 comments
I see everybody talking about how AI writes 90% of their code, but in my experience, AI-generated code is still quite bad.
It feels like I'm detached from what everyone else is experiencing š
I really struggle with AI-generated code. One day I reviewed an AI-generated PR, and it was complete trash. It was so messy that I had a really hard time understanding it, and I never fully grasped how it actually worked š
I know there is significant improvement in the newer models, but theyāre still far from perfect. Some might argue that human-written code isnāt perfect either, but itās at least more predictable imo š
symbiatch@reddit
AI is not AI is not AI
Your use case is not their use case is not my use case.
People treat AI as a singular thing instead of actually going into details. What code? How? Which tools? And so on. Thereās so many different variables.
Most people who have AI do 90+% of their code couldāve copy pasted most of their work anyway, or spend lots of time explaining it to the tool, or this or that. Not everyone works in such things.
In real world tasks sometimes you get good code, sometimes not. YMMV and āit dependsā like everything.
d0rkprincess@reddit
You must be new on this sub.
Zulban@reddit
Or a bot.
Trick_Boat7361@reddit (OP)
I'm not a bot š
Murderous_monk@reddit
Youāre definitely not alone. I think a lot of the āAI writes 90% of my codeā posts quietly leave out the part where the remaining 10% is the hard thinking holding the entire system together š
AI-generated code often looks productive because it outputs a huge amount quickly, but readability, consistency, architecture decisions, edge cases, and long-term maintainability can get weird fast. Especially once multiple generations/refactors pile on top of each other.
Iāve noticed the experience varies massively depending on project type too. AI feels great for scaffolding, boilerplate, prototyping, repetitive transformations, small utilities, etc. But once systems become large, stateful, performance-sensitive, security-sensitive, or deeply domain-specific, the āconfident chaosā starts appearing.
Also I think experienced devs notice the problems more because theyāve spent years developing intuition around code quality and system behavior. Beginners sometimes see āit compilesā and assume success, while seniors immediately sense when a codebase feels spiritually cursed.
Tools like Cursor/Claude/Runable are genuinely useful imo, but mostly as acceleration tools. The people claiming fully autonomous coding workflows are either working on simpler apps than they imply⦠or inheriting future psychological damage in their codebase.
uniquesnowflake8@reddit
Itās like a forklift you have to know how to drive the thing
Beautiful-Dot2454@reddit
Im a data engineer and stuff gets repetitive quite a lot especially when weāre developing tables using dbt.
I first generate the initial code, logic and architecture and I have claude code generate the rest based on my initial code.
So far so good. Iām getting more done and the productivity gains are real.
Does the AI hallucinate? Yes, thatās why Iām not one shotting PRs. I build things incrementally
Dirt-Merchant-1452@reddit
Yaml is not programming
entimaniac91@reddit
Same. We setup a whole project around ai. It's now the best documented, best organized project. Trivial to paste a query and have it made into a dbt model that meets all our standards, tested, documented, incremental, all the same patterns used. We have skill files for making sure new models are built correctly when a dev prompts for a chamge. Auto deployment into a test schema runs on pull requests and another skill file knows how to check the generated resources, run basic QA based on the changes, and post links to results for manual review.
rakan_builds@reddit
Vibe code is only as good as the platform, model used, and prompt written. "Build me an app that does X" always results in some degree of garbage. But, with the right architecture and technical plan, building incrementally and collaboratively with the developer, I would argue the code is substantially better.
Jiuholar@reddit
if you approach it with an engineering mindset it is extremely, extremely good.
i dont know what it is about ai that is making highly intelligent people seemingly completely abandon engineering rigor and intellectual curiosity. at the end of the day, LLMs are just code running on a computer somewhere, just like 99% of everything else we use day to day.
apply all of the same concepts you do to literally every other thing you do in your role - observability, modularity, traceability, define and measure success criteria, DRY, single responsibility, separation of concerns etc. etc.
my workplace is having huge success with AI and are transforming the way that we build software - in a repeatable, measurable and predictable way.
Gold_Emotion_5064@reddit
Deterministic and ai do not belong in the same sentence
Jiuholar@reddit
is the sentence in the room with us right now
MI-ght@reddit
AI code is trash. And only trash-eaters could be satisfied with it.
floexodus@reddit
Laughable false dichotomy.
Gold_Emotion_5064@reddit
I donāt think you know what that means
Dear_Philosopher_@reddit
You're stuck in 2022. No one writes code manually anymore.
Trick_Boat7361@reddit (OP)
I think it's just a ragebait š¶
notmsndotcom@reddit
In the codebases I work on (elixir, ruby, and a few nextjs clusterfucks) AI is pretty damn good. 80-90% of the code it writes is identical to how I or someone on my team would have done it. You def get some weird code that is not idiomatic in the remaining 10-20% but thatās a quick fix.
The_Other_David@reddit
You are not the only person who feels this way. This is the only thing being written about in every single thread on every single programming or CS subreddit right now.
Many humans have low standards for their own code. The AI code they submit under their own name will similarly have low standards.
Developers with high standards will often give the AI more precise instructions, and the code they submit will similarly be higher-quality.
Regardless of how the code was written, the commit messages have our names.
EliSka93@reddit
Well, it's either this or "AI is great at programming actually and if you don't believe that you're just prompting wrong, it's the future, bow down to the AI god".
Empanatacion@reddit
Unless you tell the AI to do the commit, in which case it likes to add its name to the commit message, even sometimes forgetting that you told it not to.
x-jhp-x@reddit
I wonder if anyone has changed their name to "Claude" to mitigate this risk?
razveck@reddit
In my experience there's really only a few reasons for people to praise AI code:
1) They're bad at coding and anything remotely decent impresses them
2) They hate coding and the less they have to do it the better
3) They don't care about how the sausage is made as long as they can sell it
Quiet-Topic44@reddit
nah i get exactly what u mean honestly. AI code usually looks āfinishedā way before its actually good. thats the dangerous part imo. i noticed the same thing w generated review/deployment setups too. everything looks super clean until somebody experienced points out 15 weird decisions underneath. part of why ive gotten pickier about workflow tooling lately instead of blindly trusting whatever copilot/claude spits out. tenki was actually one of the few things that felt less chaotic there for me
Feroc@reddit
AI agents are like very clever interns. If you give them a task but don't specify any details, they will just give you something they think will work, but they won't consider anything that lies outside their task.
You will get much better results when they have more information. Give them your coding guidelines, testing guidelines, and ADRs, and the results will be closer to what you actually want.
Cal_3@reddit
I've realised the past couple of weeks that if AI doesn't output quality code, it's either a process problem or a skill problem.
AI can output perfectly acceptable, normal code. But it requires stringent oversight and knowledge for it to do so
big-papito@reddit
AI will autocomplete your style. If I lay a solid foundation for a project, I actually end up learning from LLMs because they generate prodigy-level code.
On the other hand, give it slop, you are going to get 10x of that slop.
On a legacy project, I can see how you can have an awful experience. The trick is to ruthlessly refactor the codebase to remove the smell.
You code is your context.
Aggressive-Fix241@reddit
You're not detached, you're just being honest. The "AI writes 90% of my code" crowd is either working on trivial stuff or not reviewing what it outputs.
I've seen the same trash PRs. AI loves adding unnecessary abstraction layers, inconsistent error handling, and variable names that sound right but mean nothing. Cleaning that up often takes longer than writing it yourself.
The gap between demo-quality code and production-quality code is still huge. AI is great for scaffolding and boilerplate. Anything involving business logic, edge cases, or fitting into an existing architecture? You're usually better off doing it yourself.
Don't feel pressured to adopt something that slows you down.
valkon_gr@reddit
Some of you are stuck in 2022.
Trick_Boat7361@reddit (OP)
Is it this bad to not liking AI generated code š
Electronic_Funny5917@reddit
We are well beyond that point, whether we like it or not AI generated code is a vast majority of new code and itās only going to increase.
DesperateMove5881@reddit
I too was initially a non-believer. But a really strong harness + skills + a robust plan + test coverage etc gets it most of the way. If it generates incorrectly write a skill to patch and repeat.
Also adversarial reviews from the agents on the code were really solid.
I doubt itll be touching low level / mission-critical code at the current level but for the majority of apps / tooling I'd say its good enough.
Trick_Boat7361@reddit (OP)
On code review, one time one of my team mate reviewed my code using AI. It was quite impressive š
What I don't like, when it writes code. I think we should get more tools focusing on inspecting the code and find bugs via AI. Not for writing code
disorder75@reddit
Posta i tuoi repo gitlab, vediamo quanto sei migliore degli llm e vediamo se hai usato gli llm per i tuoi progetti.
Trick_Boat7361@reddit (OP)
Dude my company will kill me, if I did that š§
soundman32@reddit
1) are you using the correct AI tools? ChatGPT is rubbish compared to Claude Codex/Kiro.
2) Are you directing the AI via instructions/agent files, so you at least get new code that matches your existing codebase?
3) Are you using an agentic agent? Letting AI make a plan, and then churn away to solve a that plan (even a small one) generates far better results than just asking it to fix a bug.
3) There are significant improvments each month. The difference between code generated at the end of last year, compared to now is huge.
I've been a dev for 40+ years, and use AI every day.
Trick_Boat7361@reddit (OP)
I might try it one day, but honestly I think it's quite boring to do it this way. I really hope that we don't end up on this direction š
Jiuholar@reddit
dunno why you're getting downvoted, this is spot on.
Trick_Boat7361@reddit (OP)
Because people hate AI code so much apparently š„ø
jhartikainen@reddit
If you want an opposing perspective on this from someone who's been programming 27 years, with actual scientific evidence supporting it, I wrote about it recently here https://codeutopia.net/blog/2026/05/16/why-i-dont-use-ai-tools-and-why-science-agrees/
Fwiw, I don't think AI code is necessarily "complete trash"- it just isn't suited for what I do or want to do.
Striking-Pirate9686@reddit
You're obviously just significantly better at writing code than these models which have had billions of dollars spent on them. You should continue to look down on everyone that uses LLMs to write code and see where you end up in 3 years.
Trick_Boat7361@reddit (OP)
There are good engineers believe on AI generated code too
And the issue is not me writing better code than AI š¤
Human are objectively better at writing code most of the time. The issue is that AI is faster, this is the point
BorderKeeper@reddit
Think of a very talented junior dev locked in a black box with your source code, access to google, and given a note to develop a feature. Now imagine how many questions and context the junior would IRL need to know and how many questions it would ask during implementation for it to not be complete rubbish and how many unique quirks your codebase has that need knowledge for it to work correctly.
Some codebases are unique mess, or use obscure undocumented OS APIs, or are in fields only rare specialists know about like drivers, or let's say WiX installer XMLs. If you don't provide good context in the prompt, do not have context in files, do not have the ability for AI to verify what is's doing in tests, and not spending time to vet what the AI is doing and stopping it from going on a dumb tangent and running out of tokens you will not see good results.
When I have a feature to develop and am pondering on how much AI should be involved I use a rough mental calculation of: [Feature Complexity] * [Codebase complexity] and if the resulting number is above some imaginary threshold I know AI will struggle no matter what. But if it's for example a feature I know roughly how to do in my head and it's let's say couple classes with couple integrations I can rely AI will do it well. I would say try it and find where the limits of your models are and try using the better ones w/ context and skills written ahead of time.
Electronic_Funny5917@reddit
At this point, if you are unable to generate good code using AI, itās an issue on the user side rather than the AI lacking the ability!
freshcap0ne@reddit
If you give it a vague prompt and let it freestyle, yeah, maybe you will get some random garbage. It will optimize for "looks like it works" and not for your architecture, constraint, edge cases, styles, maintainability, scalability - UNLESS you know what you are doing and you are prompting it to do that exactly. You need to fill it in as much as possible, often you have to use plan for bigger tasks.
Learn how to prompt it and learn the different frontier models and frameworks. Stack, file structure, patterns, constraints, expected behavior, writing tests w/e you do anyways and you believe is good code, you can get it to follow along 99%...
seinfeld4eva@reddit
What are you using, and how are you using it?
titpetric@reddit
Am I the only one who feels this way about human generated code?
https://github.com/twitchtv/twirp/issues/256
6 years ago 𤣠man, rereading the responses in LLM context these days, LOL
muntaxitome@reddit
About the same as AI generated texts, if there was a good prompt with clear understanding of what should be generated and how and what information is needed it can be good enough. If you just did a garbage prompt you get garbage output.
Altruistic-Bat-9070@reddit
It depends entirely on the language you are writing in. If you are writing python it is really good as long as you follow standard practices like splitting up your implementation into manageable chunks to check the approach and ensure small and manageable commits. Generally though I don't need to make code changes when Claude codes, I just need to tell it to follow a different approach.
When tuned correctly it also seems to be getting very good at react. That said, react is where I see it going a bit crazy and just making infinite numbers of weirdly named components that it has best guessed the names of. This is where I think it still needs more handholding.
I imagine when it comes to C etc it still needs some work. I don't code in rust but I have heard it's pretty darn good at rust.
ElasticFluffyMagnet@reddit
It also depends on the rules you setup and the prompts. Not saying that makes it perfect, but it does help making AI code less convoluted and messy/complex.
CalmLake999@reddit
Writing in Rust and Svelte by default it's amazing.
Idea-Aggressive@reddit
Every day weāre getting these threads, whatās the point?
LLM can greatly improve your speed, but it doesnāt mean itās a slot machine.
Regardless of what you feeling is, you have no chance against somebody with same skill level with LLM, stirring things up.
Stop posting these things, itās silly
dbxp@reddit
What tech stack are you using?
The effectiveness drops off sharply with older or more niche tech
Trick_Boat7361@reddit (OP)
Next.js most of the time
Elect_SaturnMutex@reddit
Depends on the codebase, if the requirement is something very trivial then AI is ok, imo. But as soon as things get complex and there are dependencies between different software modules, generative AI tends to hallucinate.
I also work on an open-source project and one of the maintainer assigns github co-pilot to review my change sets. Sometimes it comments on code that was not part of the actual change, sometimes, it does make valid points. Also not all at once, for every iteration I get new comments from co-pilot even though the change was done in one of the previous iterations. In this case, i would say AI and a human reviewer would be useful, but multiple iterations don't seem make the process more efficient.
scandii@reddit
there's currently a big skill issue and product issue regarding this topic.
Claude + a whole batch of md files detailing strategies, coding guidelines and templates = very good result. the LLM will almost always try to stay within the boundaries detailed and it is borderline trivial to get code that conforms to any standard you already have.
Claude + just prompting = sometimes good, sometimes bad, depends mainly on how many times the user wants to iterate and when they approach the idea that maybe, just maybe, you should contextually help the LLM to generate what you want, e.g. point 1.
Cheaper models + just prompting = not even on the level of solving the task every time.
and from here on out, we just get worse results.
and let's not forget we're still talking about human-in-the-loop development, people getting a working solution, giving zero fucks about the output and hitting push is the issue here, not really what the LLM produced.
CanIhazCooKIenOw@reddit
You need to improve your prompting. And use the newer models.
Everyone writes trash code, yourself included. AI just makes you write it faster.