Readit News logoReadit News
Posted by u/throwaway-ai-qs 3 months ago
Ask HN: Is anyone else sick of AI splattered code
Between code reviews, and AI generated rubbish, I've had it. Whether it's people relying on AI to write pull request descriptions (that are crap by the way), or using it to generate tests.. I'm sick of it.

Over the year, I've been doing a tonne of consulting. The last three months I've watched at least 8 companies embrace AI generated pip for coding, testing, and code reviews. Honestly, the best suggestions I've seen are found by linters in CI, and spell checkers. Is this what we've come to?

My question for my fellow HNers.. is this what the future holds? Is this everywhere? I think I'm finally ready to get off the ride.

barrell · 3 months ago
I'm not convinced it's what the future holds for three main reasons:

1. I was a pretty early adopter of LLMs for coding. It got to the point where most of my code was written by an LLM. Eventually this tapered off week by week to the level it is now... which is literally 0. It's more effort to explain a problem to an LLM than it is to just think it through. I can't imagine I'm that special, just a year ahead of the curve.

2. The maintenance burden of code that has no real author is felt months/years after the code in written. Organizations then react a few months/years after that.

3. The quality is not getting better (see gpt 5) and the cost is not going down (see Claude Code, cursor, etc). Eventually the bills will come due and at the very least that will reduce the amount of code generated by an LLM.

I very easily could be wrong, but I think there is hope and if anyone tells me "it's the future" I just hear "it's the present". No one knows what the future holds.

I'm looking for another technical co-founder (in addition to me) to come work on fun hard problems in a hand written Elixir codebase (frontend is clojurescript because <3 functional programming), if anyone is looking for a non-LLM-coded product! https://phrasing.app

james2doyle · 3 months ago
Totally agree. I use for chores (generate an initial README, document the changes from this diff, summarize this release, scaffold out a new $LANG/$FRAMEWORK project) that are well understood. I have also been using it to work in languages that I can/have written in the past but are out of practice with (python) but I’m still babysitting it.

I recently used it to write a Sublime Text plugin for me and forked a Chrome extension and added a bunch of features to. Both open source and pretty trivial projects.

However, I rarely use it to write code for me in client projects. I need to know and understand everything going out that we are getting paid for.

bdangubic · 3 months ago
> I need to know and understand everything going out that we are getting paid for.

what is preventing you from this even if you are not the one typing it up? you can actually understand more when you remove the burden of typing, keep asking questions, iterate on the code, do code review, security review, performance review… if done “right” you can end up not only understanding better but learning a bunch of stuff you didn’t know aling the way

risyachka · 3 months ago
This.

If someone says "Most of my code is AI" there are only 3 reasons for this 1. They do something very trivial on daily basis (and its not a bad thing, you just need to be clear about this). 2. The skill is not there so they have to use AI, otherwise it would be faster to DIY it than to explain the complex case and how to solve it to AI. 3. They prefer to explain to llm rather than write code themselves. Again, no issue with this. But we must be clear here - its not faster. Its just someone else is writing the code for you while you explain it in details what to do.

barrell · 3 months ago
To be honest, I’m more inclined to attribute the rampant use of LLMs just to the dopaminergic effect of using them. It feels productive. It feels futuristic. It feels like an unlock. Quite viscerally. It doesn’t really matter your seniority or skill level, you feel can do whatever is within your wheelhouse, and more, faster.

Like most dopaminergic activities though you end up chasing that original rush, and eventually quit when you can’t replicate it and/or realize it is a poor substitute for the real thing, and likely stunting your growth

JustExAWS · 3 months ago
I have been coding professionally for 30 years and 10 years as a hobbyist before then writing assembly on four different architectures. The first 12 years professionally bit twiddling in C across multiple architectures.

I doubt very seriously you could tell my code was LLM generated.

I very much rather explain to an LLM than write the code myself. Explaining it to an LLM is like pre rubber ducking.

bdangubic · 3 months ago
there is a 4 and 5 and 6… :)

here’s 4 - there are senior-level SWEs who spent their entire career automating every thing they had to do more than once. it is one of core traits that differentiates “10x” SWE from “others”

LLMs have taken the automation part to another level and best SWEs I know use them every hour of every day to automate shit that we never had tools to automate before

koakuma-chan · 3 months ago
I agree on all, but I also have a PTSD of the pre-LLM era where people kept telling me that my code is garbage, because it wasn't SOLID or whatever. I prefer the way it is now.
skydhash · 3 months ago
SOLID is a nice sets of principles. And like principles, there are valid reasons to break them. To use or not to use is a decision best taken after you’ve become a master, when you know the tradeoffs and costs.

Learn the rules first, then learn when to break them.

majorbugger · 3 months ago
and what LLM has to do with your PTSD?
muzani · 3 months ago
Ah, so it's like remote work. Boom of the buzzword, actually being forced to live the buzzword, then whiplash back into the dark ages.
pllbnk · 3 months ago
That was a weird comparison and I didn't understand what was meant exactly. Are you trying to say that remote work is somehow putting a burden on organizations? If so, probably wrong organizations have been in your radar.
nharada · 3 months ago
My biggest annoyance is that people aren't transparent about when they use AI, and thus you are forced to review everything through the lens that it may be human created and thus deserving of your attention and benefit of the doubt.

When an AI generates some nonsense I have zero problem changing or deleting it, but if it's human-written I have to be aware that I may be missing context/understanding and also cognizant of the author's feelings if I just re-write the entire thing without their input.

It's a huge amount of work offloaded on me, the reviewer.

kstrauser · 3 months ago
I disagree. Code is code: it speaks for itself. If it's high quality, I don't care whether it came from a human or an AI trained on good code examples. If it sucks, it's not somehow less awful just because someone worked really hard on it. What would change for me is how tactful I am in wording my response to it, in which case it's a little nicer replying to AIs because I don't care about being mean to them. The summary of my review would be the same either way: here are the bad parts I want you to re-work before I consider this.
alansammarone · 3 months ago
I've had a similar discussion with a coworker which I respect and know to be very experienced, and interestingly we disagreed on this very point. I'm with you - I think AI is just tool, and people shouldn't be off the hook because they used AI code. If they consistently deliver bad code, bad PR descriptions, or fail to explain/articulate their reasoning, I don't see any particular reason we should treat it any differently now that AI exists. It goes both ways, of course - reviewer also shouldn't pay less attention when the code is did not involve AI help in any form. I think these are completely orthogonal and I honestly don't see why people have this view.

The person who created the PR is responsible for it. Period. Nothing changes.

skydhash · 3 months ago
Adding to the sibling comment by @jacknews. Code is much more than an algorithm, it’s the description of the algorithm that is non ambiguous and human readable. Code review is a communication tool. The basic expectation is that you’re a professional and I’m just adding another set of eyes, or you’re a junior and I’m reviewing for the sake of training.

So when there’s some confusion, I’m going back to the author. Because you should know why each line was written and how it contributes to the solution.

But a complete review takes time. So in a lot of places, we only do a quick scan checking for unusual stuff instead of truly reviewing the algorithms. That’s because we trust our colleagues to test and verify their own work. Which AI users usually skip.

jcranmer · 3 months ago
The problem with reviewing AI-written code is that AI makes mistakes in very different ways from the way humans make mistakes, so you essentially have to retrain yourself to watch for the kinds of mistakes that AI makes.
bluGill · 3 months ago
Code doesn't always speak for itself. I've had to do some weird things that make no sense on its own. I leave comments but they are not always easy to understand. Most of this is when I'm sharing data across threads - there is good reason for each lock/atomic and each missing lock. (I avoid writing such code, but sometimes there is no choice). If AI is writing such code I don't trust them to figure out those details, while I have some (only a minority but some) coworkers I trust to figure this out.
chomp · 3 months ago
> What would change for me is how tactful I am in wording my response to it

So code is not code? You’re admitting that provenance matters in how you handle it.

elviejo · 3 months ago
Code is not only code.

It's like saying physics it's just math. If we read:

F = m*a

There is ton of knowledge encoded in that formula.

We cannot evaluate the formula alone. We need the knowledge behind it to see if it matches reality.

With llms we know for a fact that if the code matches reality, or expectations, it's a happy accident.

jacknews · 3 months ago
Half of the point of code review is to provide expert or alternative feedback to junior and other developers, to share solutions and create a consistent style, standard and approach.

So no, code is not just code.

risyachka · 3 months ago
This is all great except it doesn't give any reason not to label AI code.
roughly · 3 months ago
The problem with AI generated code is there’s no unifying theory behind the change. When a human writes code and one part of the system looks weird or different, there’s usually a reason - by digging in on the underlying system, I can usually figure out what they were going for or why they did something in a particular way. I can only provide useful feedback or alternatives if I can figure out why something was done, though.

LLM-generating code has no unifying theory behind it - every line may as well have been written by a different person, so you get an utterly insane looking codebase with no constant thread tying it together and no reason why. It’s like trying to figure out what the fuck is happening in a legacy codebase, except it’s brand new. I’ve wasted hours trying to understand someone’s MR, only to realize it’s vibe code and there’s no reason for any of it.

m463 · 3 months ago
> Code is code

oh come on.

That's like saying "food is food" or "an AI howto is the same as a human-written howto".

The problem is that code that looks good is not the same as code that is good, but they are superficially similar to a reviewer.

and... you can absolutely bury reviewers in it.

Workaccount2 · 3 months ago
>My biggest annoyance is that people aren't transparent about when they use AI

You get shamed and dismissed for mentioning that you used AI, so naturally nobody mentions they used AI. They mention AI the first time, see the blow back, and never mention it again. It just shows how myopic group-think can be.

madamelic · 3 months ago
As others have said, LLM generation of code is no excuse for not self-reviewing, testing, and understanding their own code.

It's a tool. I still have the expectation of people being thoughtful and 'code craftspeople'.

The only caveat is verbosity of code. It drives me up the wall how these models try to one-shot production code and put a lot of cruft in. I am starting to have the expectation of having to go in and pare down overly ambitious code to reduce complexity.

I adopted LLM coding fairly early on (GPT3) and the difference between then and now is immense. It's a fast-moving technology still so I don't have the expectation that the model or tool I use today will be the one I use in 3 months.

I have switched modalities and models pretty regularly to try to keep cutting edge and getting the best results. I think people who refuse to leverage LLMs for code generation to some degree are going to be left behind. It's going to be the equivalent, in my opinion, of keeping hard cover reference manuals on your desk versus using a search engine.

duxup · 3 months ago
I'm really not seeing a lot of code that I can say is bad AI code.

I and my coworkers use AI, but the incoming code seems pretty ok. But my view is just my current small employer.

whycome · 3 months ago
The breadth of industry is so vast that people have wildly different takes on this. For a lot of simple coding tasks (eg custom plugins or apps) an LLM is not only efficient, but extremely competent. Some traditional coders are having a harder time working with them when a major challenge comes from defining the problem and constraints well. It’s usually something kept in head. So, new skill sets are emerging and being refined. The ones that thrive here will not be coders, but it will be generalists with excellent management and communication skills.
duxup · 3 months ago
Yeah most of my team is using an LLM for "make this function better", or learning, or just somewhat smaller bites or code that an LLM will work well with. So we don't see the "hey rewrite this whole 20 year old complicated application, omg it didn't work" kind of sitiatons.
dgunay · 3 months ago
Most of the AI generated code I review is pretty much okay. Usually does what it should and meets some standard of quality. But it usually looks and feels just slightly stylistically foreign compared to the code around it. I personally edit mine before code review so that it looks how I would have written it, but there are many chunks of code in our codebase now where the author and reviewer didn't do that.
vegancap · 3 months ago
Yeah, I get the feeling. I'm torn to be honest, because I quite enjoy using it, but then I sift through everything line by line, correct things, change the formatting. Alter parts it's gotten wrong. So for me, it's saving me a little bit of time manually writing it all out. My colleagues are either like me, or aren't sold on it. So I think there's a level of trust and recognition that even if we are using it, we're using it cautiously, and wouldn't just YOLO some AI generated code straight into main.

But we're a really small but mature engineering org, I can't imagine the bigger companies with hundreds of less experienced engineers, just using it without car and caution, it must just cause absolutely chaos (or will soon).

dgunay · 3 months ago
I use it as more of a focusing tool. Without it, I frequently get distracted by small rabbit holes (I should add more logging to this function, oh I should also add some doc comments, oh I should also refactor this, etc) or I don't have the energy to do small touch ups like that. Having a bunch of agents do tiny fixes in the background on separate branches keeps me on task, prevents me from bloating PRs, and makes it more likely that I choose to do these small QoL improvements _at all_.
vegancap · 3 months ago
It is fantastic for that, I find myself doing the same, as someone who also has a tendency towards rabbit holes
yomismoaqui · 3 months ago
AI coding should be better with a little profesionalism thrown in. I mean, if you have commit that code you are responsible for it. Period.

And I say this as a grumpy senior that has found a lot of value in tools like Copilot and specially Claude Code.

add-sub-mul-div · 3 months ago
I am so glad I spent 25 years in this field, made my bag, and got out right before it became the norm to stop doing the fun part of the job yourself.
cadamsdotcom · 3 months ago
Make your agent do TDD.

Claude struggles with writing a test that’s meant to fail but it can be coaxed into doing it on the second or third attempt. Luckily it does not struggle with me insisting the failure be for the right reason. (As opposed to failing because of a setup issue or a problem elsewhere in the code)

When doing TDD with Claude Code I lean heavily on asking the agent two things: “can we watch it fail” and “does it fail for the right reason”. These questions are generic enough to sleepwalk through building most features and fixing all bugs. Yes I said all bugs.

Reviewing the code is very pleasant because you get both the tests and production code and you can rely on the symmetry between them to understand the code’s intent and confirm that it does what it says.

In my experience over multiple months of greenfield and brownfield work, Claude doing TDD produces code that is 100% the quality and clarity I’d have achieved had I built the thing myself, and it does it 100% of the time. Big part of that is because TDD compartmentalizes each task making it easy to avoid a single task having too much complexity.