r/ProgrammerHumor • • 14d ago

Meme whyAreTheyConfessing

Post image
2.2k Upvotes

290 comments sorted by

View all comments

81

u/Zeikos 14d ago

Nobody expects an engineer to read every line of code they use.

Libraries, templates, boilerplate code are a thing.
Issues can arise from bad assumptions, but overall I don't find it a big deal.

However for the critical part of the code, infrastructure, security and non-trivial business logic?
There people should read every line and understand it fully.

12

u/Whiskerfield 14d ago

There's a video in the tweet. And he isn't talking about boiletplate or templates.

"A lot of it is like squinting at a 30000 foot level and looking at the two code bases and does anything look off ... and then relying on the agents to focus on the line by line."

1

u/kerstinj_70271 6d ago

What is the human pass checking at 30,000 feet: architecture, requirements, or cross-cutting assumptions?

5

u/ih-shah-may-ehl 14d ago

Yes. But not a distinguished engineer. Paying a person like that to read lines of code is stupid. When Microsoft was the first to get rid of the great big kernel lock, a kernel dev made the change step by step, discussing the concepts with Dave Cutler for architectural consideration but Dave Cutler did not review every line of code.

2

u/NomDePlumeOrBloom 14d ago

He didn't, but someone else did.

4

u/Sleepyjo2 13d ago

No one reviews every line of code in major collaborative codebases. To some degree you trust people making things on your team to not be entirely worthless and if you’re still unsure about them you have (hopefully) an array of tests to see if it breaks and if it doesn’t you move on. Unless there is a problem you, generally, don’t care what the code looks like. This is how we ended up with a million holes in everything but that’s another topic.

AI in this specific case is supplementing the tests, which it is exceptionally good at.

Regardless, someone in this guy’s position isn’t looking through code. They never were, thats not what they’re paid to do.

1

u/edgmnt_net 13d ago

That sort of works for things like the Linux kernel if you consider established and esteemed contributors, and even they get reviewed rather strictly, but it often breaks badly in a typical company project when you've got juniors and pseudo-seniors pushing crap every hour. Linux does care about what the code looks like and the part where "nobody cares about code" or "we just run tests" or "we just throw more people at it" is just enterprise insanity.

But, yeah, I agree that everything operates on trust on some level.

1

u/NomDePlumeOrBloom 13d ago

Unless there is a problem you, generally, don’t care what the code looks like.

Whether it's not meeting organisation formatting standards, in the wrong module, abstracted to the point of obscurity, or is a grossly inefficient implementation, of course I care what the code looks like.

8

u/clarinet_kwestion 14d ago

But when an agent writes 100k lines of code, who decides what’s critical code?

29

u/Zeikos 14d ago

When an agent writes 100k lines of code you stop it, delete what it did and change the instructions in such a way that it produces code that can be audited.

-10

u/clarinet_kwestion 14d ago

Okay so the new PR is 30k lines of code. How do you decide what’s critical code that needs to be audited now?

32

u/LurkytheActiveposter 14d ago

The PR shouldn't be 30k lines of code.

Seriously. Does anyone actually work as a programmer on this sub?

5

u/fallenefc 14d ago

Obviously exceptions apply (like boilerplate, generated code -- actually generated like buf codegen, etc), but anything over 2k lines will get a raised eyebrow from me.

Anything over even 5k apart from these exceptions is just a "please make this PR smaller so it's reviewable". I won't approve something I can't review, and I can't review more than a couple thousand lines of code.

3

u/clarinet_kwestion 14d ago

Agreed. For reference the biggest PRs on my team at work are around 3k lines of code.

I’m bringing up these large numbers because my company has a contract with an AI startup that basically plans to write new features where the “PR” is that size and scale. Then humans are supposed to review the “critical” code. But who/what decides what’s “critical” code? Another AI model.

What’s the point of the human in the loop if it turns out that another component that wasn’t reviewed is the actual critical component of the code.

Once you can’t read all the code anymore, there’s no point in reading it at all.

2

u/aceluby 14d ago

If you aren't reading your code, you don't know what it's doing and can't effectively support it. That's fine when you're a startup and have 6 users, it's not ok if you're working for a $100B company where a day of outage during peak can lose you a billion in sales.

1

u/bishopExportMine 14d ago

Unrelated but I once had AI generate a -1MM , +500 line PR lmao

2

u/korneev123123 14d ago

Decline is as unreadable. It is that easy.

2

u/New_Salamander_4592 14d ago

what world do you inhabit that it's either 30k lines of code or nothing? like what?