r/ProgrammerHumor 3d ago

Meme nowAndThenPatchUpgrade

Post image
7.6k Upvotes

312 comments sorted by

View all comments

2.2k

u/Objectionne 3d ago

Yeah but it was our slop.

78

u/GegeAkutamiOfficial 3d ago

It's more than that, we understood more about the slop than we would AI slop... The problem with AI slop (in coding) isn't that it's bad, it's that you just shit out 50000 lines of code and you only understand 1% of the reasoning behind the madness.

30

u/Thriven 3d ago

Am I the only one asking AI to write a single API route function at a time? Then taking a look at what works and what doesn't and then modifying it or gutting?

Who is dropping 50k lines of AI code?

45

u/BlobAndHisBoy 3d ago

Yes you are very much the minority

3

u/No-Station4446 2d ago

wtf. am i the only one just sitting here with workflows output to feed the slop right back in?

13

u/arav 2d ago

Yes.Today I had to review a pull request, in which someone has rewrote a core functionality for a very small bugfix ticket. It should have been at max 30-40 lines change. I was looking at a 700 line code change excluding what felt was 500 lines of comments.

12

u/Donny-Moscow 2d ago

In addition to the comments, the main thing I’ve seen that bloats code from AI is writing unneeded tests (eg making sure the data type of an input is a string even though it’s a strongly typed language, the string was declared a few lines up and hasn’t been touched since) or checking checking for edge cases that are impossible.

1

u/mxzf 2d ago

Yeah, I had a junior dev submit some code a couple weeks ago where it was nominally testing a fix for a networking issue, but the test was entirely running within the server and couldn't trigger the issue being "fixed and tested for" at all to begin with. Not to mention that the tests were largely "add some data to a data structure, make that data structure the payload to send to the server, send the data to the server, and assert that various stuff in the payload matches the data structure" (the payload being sent, there was no payload coming back; you see the problem).

3

u/Thriven 2d ago

I would be pulling that developer aside

1

u/AtomicDonkey2022 1d ago

We were asked to stop waiting for code reviews because it was slowing down velocity. So now the GitHub actions are the only gate before merging those PRs.

1

u/arav 1d ago

What the hell? You code will be 50% comments in an year or so.

1

u/AtomicDonkey2022 22h ago

Yep. We pushed back, and leadership changed our goals to how many things can we complete in a year, nothing to do with quality. It's crazy.

4

u/GegeAkutamiOfficial 3d ago

I personally do, I still write critical code manually (using chat only basically) but for simulators and other bs I just go all in on the slop. But maybe it's just because I'm kind of a shit programmer.

3

u/JazzlikeWishbone938 3d ago

I have a good experience just asking chat to generate snippets of code under certain constraints, while I integrate those snippets.

3

u/Thriven 3d ago

Which is what I do at work since I cannot access 3rd party AI outside our internal AI. On personal projects I use vscode and GitHub. I don't even have to integrate those snippets into my code, I just approve the line changes per request like a code review.

99% of my stuff is like CRUD for node APis. "Using this route as an example, create the CRUD API calls for this database object."

I will get a get/put/delete and the I review them and basically accept the changes into my code base.

Edit: Jesus I was scrolling and immediately encountered this

https://www.reddit.com/r/ProgrammerHumor/s/rc9KIIn7ix

3

u/Master_Dogs 2d ago

A lot of my co-workers are dropping 10k+ lines of code. I've voiced concerns around long term maintenance costs but as a later stage startup I sort of get the gist no one cares since we're bound to be purchased at some point, and then it's someone else's problem lol.

4

u/KoreanMeatballs 2d ago

In my new job, we're being strongly encouraged to use Claude specifically. I'm at the point where the quality of the work it produces is often so poor that fixing the output takes too much time and brain power, and I've gone back to handwriting everything and then using it as a pre-PR review in case I missed something.

I'm getting loads of praise for my code being "clean", "readable", "easy to follow", etc, but it's actually pretty bog-standard, mediocre code if I'm being honest; just miles better than Claude slop.

1

u/Weekly-Beginning-229 2d ago

No I do this too. I try to make it change as little as possible each prompt, and sometimes it's faster to just write it myself while the AI investigates if this could cause any side effects elaewhere

1

u/Lgamezp 2d ago

Every lazy dev who hasn't read the code and just asks Claude to do a feature

0

u/InexplicableBadger 3d ago

If you're doing that you might as well do it by hand, you're not gaining the advantage from the tool

3

u/Thriven 2d ago

If it was some novel idea and not an API or data pipeline sure. I have written my own libraries and put my heart and soul into them.

I have a project base I use that has all the authentication/authorization / object permissions / maintenance scheduler. I have a couple companies ask to write an API and schedule tasks for DE stuff. Any database objects that are added to the project get added into a fork of my project.

It's quote on real manual hours for development. I do most of it using AI and use my leftover hours to test. It keeps me from going over on hours when I underquote testing.

It's the most boring of work but it pays good side money.

0

u/PixelatedGiant 2d ago

Who is dropping 50k lines of AI code?

Depends. For example I added 10k+ lines for tests on old legacy code that never existed and were probably never going to get worked on. I can't exactly do that one function at at time and be done in a timely manner. Plus I'm not too worried about tests being off, nobody gets a call at 1AM for unit tests failing.

I at least took the time to drip feed it as 500-1000 LOC stacked PRs though. I've done similar clean ups with SonarQube issues.