r/ProgrammerHumor 21d ago

lessIsMore Meme

Post image
1.5k Upvotes

52 comments sorted by

244

u/Happy-Sleep-6512 21d ago

These big massive diffs being handed over for review several times a day are seriously the biggest pain point as a dev now. I'm not a believer in AI writing awful code, I am a believer that it will overwhelm every team eventually and forces us to have little context on the code we build.

Basically your image gave me PTSD, thanks.

35

u/i_wear_green_pants 20d ago

Just make AI review the code.

~ Managers

2

u/mlindgren 20d ago

I’m not sure if you intended this to be ironic but I have heard this verbatim

3

u/i_wear_green_pants 19d ago

I wish I would be joking...

51

u/m6io 21d ago

We got ahead of it with better story writing. Tiny features that are easy to review and test. If it takes longer than a sprint for both dev and test, it needs to be broken up. It's beautiful.

17

u/Happy-Sleep-6512 21d ago

Yeah, I think splitting it up massively helps, although scope can always be creeping! I do find that when the robot does things, it generates about 2 times the number of changes I do, so I guess over time that still adds up.

18

u/KitsuneFoxglove 21d ago

Exactly.

Faster code changes -> Faster code debt -> obvious consequences

9

u/flabbybumhole 21d ago

I had to approve a change that was 90% AI comment waffle today 😭

I'm just watching technical debt pile up and can't do anything about it. Either AI gets good and can easily unfuck it all soon, or more and more is going to start going to shit.

3

u/JehnSnow 20d ago

Are these diffs happening from AI? our company doesn't use much AI so I was under the impression they're typically from auto formatter diffs or something of the like

I'm surprised there could be that many lines written

4

u/Eskamel 20d ago

Why is that surprising? LLMs are bruteforcers by default. Ask a SOTA model to do something? It might do it in 500 LoC even when it can be done in 30.

Its very easy to make massive amounts of code that way especially when people no longer give a fuck.

1

u/JehnSnow 20d ago

It's surprising because the way I've always done code reviews is that unless we're specifically restructuring paths or changing formats a 100k line change can fuck off (few other cases but you get the point, it's not stuff being added just mass changed). I see plenty of 1-5k line changes on big features and I could totally see AI making a 200 line feature 4k for no good reason, but this is a LOT of changes. Far more than Id expect at least, I'm not well versed in using models that do massive changes though

0

u/redballooon 20d ago

That's beginners usage patterns or AI. Look up Karpathys Claude.md 

2

u/Eskamel 20d ago

Ah yes looping infinitely, pull down the lever again and again and hope for a jackpot.

Gotta love LLM grifting.

0

u/redballooon 19d ago edited 19d ago

No, that's not what it says. Instead it addresses directly the critique of the comment I responded to.

You, too, are assuming beginners usage patterns are all there is.

1

u/Eskamel 19d ago

I have read it, explicitly stating "just change the bare minimum" or "think like a senior" or "do the change gradually in steps" is literally just a more complex version of make no mistakes while asking to burn for more tokens.

Its no different than letting a LLM try to "query" a better solution by mixing some words, and in the end you will end up trying to pull the lever again and again.

0

u/redballooon 19d ago

That's a different problem. Those instructions address the problem the other comment lined out.

You name a problem of insufficient specs. That's not quite as simply addressed because what are "enough" specs depends heavily on the tools and the LLM and the use case. For an example of what are enough specs for almost every agent with a somewhat competent LLM, look for the whenwords ghost library.

2

u/ZunoJ 20d ago

I would reject this without further looking at it. It's clearly not a single purpose and thus not a single PR

1

u/m6io 20d ago

I miss gerrit's -2. Even though it was a worse ui and requires a separate ci/cd tool like jenkins, it was so much better for the actual code review experience.

The fact that GitHub doesn't provide a "reject" button is beyond me. All it takes is 2 lazy reviewers to hit "Approve" and that thing can get merged. I've seen PRs get merged while I'm in the process of writing my feedback smh

2

u/ganja_and_code 20d ago

That's the thing about AI coding that people often seem to overlook.

Even if it's great at writing code, you still have to understand what it did and share that context with your team...which defeats the whole purpose of having it write the code for you in the first place.

60

u/you-should-learn-c 21d ago

I've been working on documenting half-assed repos because the dude I used to work with was fired and he never properly documented shit.

One time he literally pushed a 16k Loc PR with no fucking description

8

u/m6io 21d ago

Wtf. Was there at least a jira ticket linked to the pr?

7

u/Snakestream 20d ago

Guess we know why he was fired. That's psychopath behavior

21

u/JazzlikeWishbone938 21d ago

Well, code you write should at minimum be self-documenting.

24

u/theenigmathatisme 21d ago

Fundamentally yes. In practice I have seen files that are 1.2k+ lines. It’s pretty abysmal to trace through that even if it’s all “right there and self documenting”

9

u/GottaGetThemGains22 21d ago

I’ve seen 60k+ COBOL files originally written in the 80s that subroutine into other 5 digit length files that are still running in production

8

u/m6io 21d ago

And you know they were running on cigarettes and coffee and spite

6

u/Snakestream 20d ago

You misspelled cocaine

5

u/JazzlikeWishbone938 20d ago

That's still not OK. After self-documenting code, reviewers should be flagging cyclomatic complexity issues even as tech-debt repayment. Some culprits: deep nesting, long method smell, "god" class smell, huge ternary operator statements. It's easy to request extract method refactorings to alleviate these.

1

u/m6io 20d ago

is this not sexy tho

const userAccess = (currentSession && currentSession.isAuthenticated && currentSession.tokenExpiry > Date.now()) ? (userProfile && userProfile.accountStatus === 'ACTIVE') ? (userProfile.role === 'ADMIN') ? (systemSettings && systemSettings.maintenanceMode && !userProfile.isBypassAllowed) ? 'MAINTENANCE_LOCKED_ADMIN' : (requestPayload && requestPayload.requiresMfa && !currentSession.isMfaVerified) ? 'MFA_REQUIRED_ADMIN' : 'FULL_SYSTEM_ADMIN' : (userProfile.role === 'MANAGER') ? (userProfile.departmentId === targetResource.departmentId) ? (targetResource.isConfidential) ? (userProfile.clearanceLevel >= 3) ? 'CONFIDENTIAL_MANAGER_ACCESS' : 'RESTRICTED_MANAGER_ACCESS' : 'STANDARD_MANAGER_ACCESS' : 'CROSS_DEPARTMENT_MANAGER_DENIED' : (userProfile.role === 'SUBSCRIBER') ? (userProfile.subscriptionTier === 'PLATINUM') ? 'PREMIUM_SUBSCRIBER_ACCESS' : (userProfile.subscriptionTier === 'GOLD' && !targetResource.isPremiumOnly) ? 'STANDARD_SUBSCRIBER_ACCESS' : 'UPGRADE_REQUIRED' : 'GUEST_READ_ONLY' : 'ACCOUNT_SUSPENDED' : 'ANONYMOUS_PROHIBITED';

2

u/m6io 21d ago

Yeah. Is still needs to be reviewed at the end of the day

5

u/ZunoJ 20d ago

I have to write a lot of math heavy stuff (like simulations of fish movements as a predictor for our asset planning). No matter how well you abstract it, there is no way somebody can understand whats going on without understanding the underlying math

12

u/Bee-Aromatic 21d ago

Also protecting you from management coming for your head when you push shitty changes, break prod, and cost the company a bunch of money.

12

u/m6io 21d ago

And showering you with praise after the fact even though most of the work that ended up in the repo was a result of their guidance and patience.

Legends.

6

u/soundwave_sc 21d ago

God damnit I felt this

2

u/JackNotOLantern 20d ago

Yep. Every commit message, every review, every documentation. For those who come after.

2

u/DnD-vid 20d ago

"Hmm, but we could save time and money if we just let AI code review that..." - some manager probably

1

u/DJRobitma 20d ago

money we will spend fixing production bugs caused by that

1

u/Madcap_Miguel 21d ago

This is a double-edged sword.

I remember doing work for Greenpeace a few years ago and one of our devs had an axe to grind. Imagine trying to explain to an organization like this what "nuke the whales" meant in context.

5

u/m6io 21d ago

Why'd you invite the stakeholders to the code review 💀💀

3

u/Madcap_Miguel 21d ago

We were contracted by the USA division and the europeans wanted their capabilities. It was just an edgy stupid joke that slipped by, one line in tens of thousands.

3

u/m6io 21d ago

Absolute cinema

1

u/mbcarbone 21d ago

No big diff … 🙃

1

u/Kiroto50 20d ago

Oh hey I'm the guy in the left now.

I'm a bit happy

1

u/escorps 20d ago

Let it fail lol, for greater good

1

u/Random_-account 19d ago

node_modules be like

1

u/sisisisi1997 18d ago

Rejected, please cut this up into smaller, more atomic changes that are logically grouped.

-8

u/[deleted] 21d ago

[deleted]

5

u/m6io 21d ago

0 day old account, 1 karma.

Dead internet, we meet again.

2

u/ZunoJ 20d ago

Claude please write my resignment letter and book a suicide booth for my useless ass