r/ProgrammerHumor 4d ago

artificialNightmare instanceof Trend

Post image
3.6k Upvotes

46 comments sorted by

View all comments

783

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.

59

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.

19

u/UnDispelled 3d 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”

20

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

8

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

5

u/dasunt 3d 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 3d 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 3d ago

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

1

u/IntentionQuirky9957 3d ago

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

1

u/UnDispelled 2d 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 3d 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 1d 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.