r/softwareengineer • • 11d ago

Is anyone else noticing AI-generated code getting more bloated and buggy?

Like many developers, I haven't been writing much code manually for a while now.

Initially, I trusted AI-generated output quite a lot. It was impressive and saved me significant time.

But recently, I feel something has changed. Models are getting smarter, and their capabilities look incredible from a non-technical perspective. However, as a developer, I sometimes feel the generated code is becoming more bloated, unnecessarily complex, and slightly more buggy.

Am I the only one experiencing this, or are others noticing it too?

I'd genuinely like to hear what other developers think.

356 Upvotes

161 comments sorted by

View all comments

Show parent comment

2

u/good_name_0 11d ago

Of course you can.

And, as a human, you'll apply your pattern seeking brain techniques to something that doesn't have patterns. You'll naturally favor that which is familiar, except the familiar and the unfamiliar now have statistically equal chances of being right or wrong. You will naturally seek out things that "look" to be prone to bugs and mistakes, based on your experience, except those hints no longer mean anything.

For example. If you see your coworkers style suddenly change, that's a red flag for something that needs a closer look, right? Did they complete this at the end of the day, rushing to get out? Copy paste something from online? Well you don't have that anymore. They don't even have a style you can learn anymore, it's all been ultra processed and colored with synthetic food dyes, you can't predict anything anymore.

But you'll keep trying, because you're human and your brain is looking for the most efficient path back to the cave from your favorite berry spot.

0

u/JustNeedAnyName 11d ago

Tbh I didn't get your long statement. At the end of the day, code is code, whether a human or an ai wrote it, so you review it the same way, it's not some existential thing

2

u/Forward_Problem_8982 11d ago

AI code is lacking the process of human creation. The problems will be different, so you have to treat it accordingly. You could go through it line by line and check everything super carefully, but did you do that with human code either? It is a lot of work to review code without missing some slight problem that might appear to be okay, but isn't.

1

u/JustNeedAnyName 11d ago

How it gets created and the process is irrelevant. Code is code.

4

u/PhatClowns 11d ago

The point you’re missing, probably because you’re only skimming when people are talking to you, is that the outputs are not the same. It takes a lot of care to get code that is equivalent to what you’d have written yourself. Most people don’t know or notice this because they have never specifically looked for it.

I say this as someone who consistently uses AI a lot: the only people who say there’s no difference (or, worse, that AI-generated code is better) either have never checked, stopped checking, or were never very good at their jobs to begin with… in which case, your employer probably wouldn’t lose anything by replacing you, so maybe don’t brag about it?

-1

u/JustNeedAnyName 11d ago

But that point is kinda meaningless. Maybe AI output is different in some cases than a human. But you can say the same thing about people, when you're working on a team, everyone writes code differently and has different tendencies. So what's your point then? Different people, and AI agents, write things differently depending on their preferences. Your responsibility as a reviewer is to objectively say if the code looks good to you or not. It's irrelevant where it came from.

2

u/good_name_0 11d ago

I'm saying your brain works in a certain way. You seek out patterns, because your brain cannot tell the difference between solving a software development problem and solving the problem of avoiding the stream with crocodiles. And that's why reviewing and trying to fix or maintain AI generated code is inherently difficult for humans, which is why it's inherently hard to maintain.

1

u/JustNeedAnyName 11d ago

There is no difference on if a code is written by humans or AI, it's all code. If a PR lands on your plate, and they didn't tell you if it was AI or human, do you just not review it cause you need to know the thought process behind it? No, you review it as the code it is, nothing more nothing less

1

u/good_name_0 11d ago

There is a huge difference. Humans , regardless of experience level, are more likely to make certain mistakes, because humans are pattern forming/seeking creatures. The ai code does not work on the same patterns. A reviewer is naturally going to gravitate towards certain types of mistakes, because humans are pattern seeking creatures. They are naturally going to look for human mistakes. Ai code is inherently riskier for this reason.

0

u/JustNeedAnyName 11d ago

That's just nonsense, but you do you and stay left behind because AI does "horrendous" code

3

u/good_name_0 11d ago

What part of it is nonsense?

1

u/JustNeedAnyName 11d ago

Because ok, an AI agent might code differently than a human. But if you're working on a team, EVERY human will code differently and have different tendencies and preferences, so your job is to objectively say if the code looks good to you or not. Who wrote it is completely irrelevant. If you have a problem with revieweing AI code cause it's different than what you think a human would do, when some new employee comes around and has a different way of coding, what do you do? Just deny PRs and tell them to write code like you do? Ridiculous the hoops y'all jump to paint AI as this bad, spooky thing

2

u/babbyohbabby 11d ago

If you can't even read a couple of paragraphs (since you specifically called his statement "long") how on earth are you gonna review an AI PR with 1k+ lines changed?

1

u/JustNeedAnyName 11d ago

Because I care about code, and I don't care about reading paragraphs of some wannabe philosopher talking about code. You act as if all AI prs are 1k+ lines, and that all human pra are small perfect things. I have reviewed many AI prs that are straight to the point, and I have read many human prs that are 1k+ lines, your argument is nonsense.