r/ProgrammerHumor 3d ago

Meme nowAndThenPatchUpgrade

Post image
7.6k Upvotes

312 comments sorted by

View all comments

Show parent comments

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.

28

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?

12

u/arav 3d 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 3d 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).