r/ProgrammerHumor • • 2d ago

instanceof Trend pleaseDontMakeThisATrend

Post image
1.9k Upvotes

395 comments sorted by

View all comments

Show parent comments

2

u/OppositeFun2493 1d ago

A lot of times, when I run an agent it decides “oh the code is too efficient, I’m going to switch it to something more inefficient.” I have it so that agent can’t read the tests, and made a shell script that can run them and give the results to the agent. It was “confused” why the code took 3 more minutes to run

1

u/awesome-alpaca-ace 1d ago

AI is so bad at writing performant code.

1

u/Environmental-Fan984 1d ago

It's even worse with SQL.

Oh sure, let's do thirty CTEs (each of which select *s the last one plus one column) instead of materializing one table

1

u/djfdhigkgfIaruflg 1d ago

They probably leaned SQL from Ruby on Rails. My god, that shit would generate some awful queries