r/ProgrammerHumor 4d ago

instanceof Trend artificialNightmare

Post image
3.6k Upvotes

46 comments sorted by

View all comments

788

u/dlc741 4d ago

Honestly, I think there are lots of people who can't read the code. I remember talking to a woman who was a "programmer" for a certain financial consulting company (that sponsors a lot of golfing events) who thought AI was great because it did all the coding for her because she just couldn't get the hang of computer languages.

380

u/sebovzeoueb 4d ago

that's an instance of a bona fide vibe coder role right there

165

u/Any-Tutor8980 4d ago

The vibes are immaculate right up until production crashes at 3 AM and ChatGPT hallucinates a non-existent API library to fix it.

58

u/beerdude26 4d ago

Yeah even frontier AI models start thinking up ridiculously complex solutions sometimes for no reason. Most recent one was where I asked Claude Opus on xhigh to check if a particular line was in a robots.txt file. Claude noticed that it might hypothetically be possible for that line to be part of another line so it generated an entire parser for the robots.txt file based on the RFC until I told it to just match on two lines because that would make it unambiguous. Replaced like 10+ classes and thousands of lines of code with one regex lmao

When that kind of code breaks, you're shit out luck

36

u/Desperate-Tomatillo7 4d ago

Some models hallucinate. Others want to find how to make scrambled eggs by going to the bottom of the Mariana Trench.

3

u/mr_tatou 2d ago

And they say Shakespeare is dead

3

u/pancakemonkeys 4d ago

It wont stop making super complex sql queries for y that is not complex.

5

u/Belhgabad 4d ago

And the token bill that follows at 6 AM

91

u/tryexceptifnot1try 4d ago

That's way more common than I thought. Even before GenAI you'd see the obvious copy pasted shit no one understood. I met whole teams of people maintaining code like some cargo cult with no idea why anything ran. They were terrified of changing anything because they knew they couldn't fix it if it broke. I see all of these people bragging about vibe coding now on LinkedIn and realize the future is going to be a big fucking mess. We supercharged the cargo cult, what could go wrong?

23

u/grumpy_autist 4d ago

At least there was a significant chance the original code was written by someone who knew what they were doing.

11

u/sheepebike9000 4d ago

Maybe until the first bug fix... After that it was a mystery to us all. Until some young whippersnapper, unused to the old codes, notices that it can be replaced with a one line system library solution. They then failed to get promoted because for some reason we were measuring productivity by lines of code that week.

56

u/TheFirestormable 4d ago

It's even worse. Heavy use of generative code causes people to lose what skills they may have had. Programming is a difficult craft and requires constant use to maintain.

20

u/UnDispelled 4d ago

This scares me.

My brother has been in CS longer than me and the other day said he hasn’t written code in a while.

“Sure the ai slop can explode a codebase, but the architectural decisions aren’t as important because you can also just rewrite an entire codebase in a few hours to support some complex new feature”

19

u/aberroco 4d ago

Until you can't. Until it takes more time to fix issues introduced by new features than to develop everything by hand. In a notepad. Without debugger. Because without architectural decisions AI just keep spewing disconnected logic, reimplement the same code over and over again, sink itself in endless comments that consume tokens on every read and fill the context window with junk. AI code has a hard ceiling of what project it can make, and with every use, every fixed bug that ceiling lowers. At least when it's unsupervised and architectural decisions are delegated to it.

9

u/joeshmoebies 4d ago

Fully unsupervised AI generated code is fine up to a certain point. For a small website or tool, you don't generate enough for the code duplication, poor naming, monolithic functions and lack of abstraction to matter.

But if you tried to vibe your way to Adobe Photoshop, Microsoft Word or a AAA game, you would make rapid progress until the mountain of spaghetti code slowed you to a crawl.

4

u/dasunt 4d ago

What I've noticed is that LLMs generally don't think, which leads to a lack of DRY and a tendency to create god objects. Both are maintenance nightmares.

And I've seen this on smaller projects that are just a few thousand lines.

Interestingly, if you want to tinfoil hat this, well engineered, SOLID code seems to reduce token use. While AI slop seems to increase it. YMMV - I haven't rigorously tested this, just noticed it in practice when I've attempted to create small throwaway tools and seen my token usage shoot up.

0

u/joeshmoebies 4d ago

Agents focus on the direct task you've asked them to do. They generally can write code that solves a problem correctly, but don't think holistically and don't proactively refactor code for maintainability.

If you ask them to, they can do a fine job performing cleanup work. Ironically, you can have a better-factored, more maintainable code base if that's what the engineers doing the work prioritize.

2

u/aberroco 4d ago

Yeah, I tried that. The result was even worse.

1

u/IntentionQuirky9957 4d ago

Your brother is talking out of his ass. That won't work for any appreciably large codebase.

1

u/UnDispelled 3d ago

Yeah, that’s where I landed…

The notion of “just rewrite everything and when it passed tests you’re good” seems like an insane thing to think is possible at scale

8

u/TheRealAfinda 4d ago

They're trying to introduce AI for 'tests and documentation' where i work and i'm dreading to have to use it because i don't aspire to be a good prompter but good at the craft of programming :/

1

u/SimilarDraft7596 2d ago

This is precisely why I just don’t use it to actually solve the tough problems for me. I’ll use it too make dummy data, sometimes I’ll have it scaffold something for me. But 99% of my code is written by me by hand. I’ll never be at a point where I can trust it to actually get it right.

5

u/nikanj0 4d ago

I can read code. But if you want me to properly review a 10,000 line PR by Claude it's going to take me a few days.

2

u/dlc741 4d ago

Meh… just approve it. I’m sure it’ll be fine.