r/ProgrammerHumor • • Oct 26 '26

instanceof Trend thisIsVeryTrue

Post image
27k Upvotes

1.6k comments sorted by

View all comments

Show parent comment

31

u/ItsSadTimes Oct 26 '26

Once I saw claude setup a unit test that just asserted true. Thats it. The test was supposed to check a speciric branch oh a helper function and the unit test made the correct call, but then didnt test it. The unit test would pass no matter what. Unless we completely broke the function to cause an exception.

12

u/Retsyn Oct 26 '26

I've heard about this! Vibe coders are too fucking optimistic. Stuff like this should be regarded as scary enough to shut the whole thing down.

Since the "Fitness factor" for good performance is "make user happy" and not actual future proofing, we can expect a lot of shit like this.

9

u/ItsSadTimes Oct 26 '26

Nowadays most of my job is future proofing AI slop code. And holy shit does it take a long time. Not saying that its impossible for AI to write good code, but you gotta pay attention or its gonna go down some dumb rabbit holes every 5 seconds unless you best your model into submission.

Plus you still gotta look at the output, cause if you dont look at it sooner someone else is gonna have to look at it later.

0

u/morpheousmorty Oct 27 '26

I have seen many a human deliver unit tests which ultimately tested nothing. Shutting this down is going to be a lot more complicated than having mixed results.

2

u/Retsyn Oct 27 '26

That's a few dummies with liability. Not a widely adopted practice.

1

u/default-username Oct 27 '26

The widely adopted practice used to be having dummies with liability do all the coding.

1

u/Retsyn Oct 27 '26

Every Human ever was a dummy?

0

u/[deleted] Oct 26 '26

[deleted] — view deleted comment

1

u/ItsSadTimes Oct 26 '26

So have I, but just saying that all because AI is more prevelant now doesnt mean that this shit doesnt still happen. Idiots with AI are still idiots.

1

u/danfay222 Oct 26 '26

Yeah a lot of people are learning the importance of correct incentives here. I know we first told our agents to prioritize writing tests, and the two problems we found were writing trivial tests and writing incorrect tests to conform with active bugs. Both are relatively easy to fix by modifying your prompts, but you just need to think about it.

1

u/arbitrarycivilian Oct 26 '26

Tbf I’ve seen people do that