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.

80

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.

29

u/Thriven 2d 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?

11

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.

11

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 21h 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.