r/ProgrammerHumor • • Oct 20 '26

Meme claudeWasNotHere

Post image
18k Upvotes

230 comments sorted by

View all comments

Show parent comment

5

u/scriptmonkey420 Oct 20 '26

I would rather I have too many tests than not enough.

5

u/dim13 Oct 20 '26

Sure, here you go: "1 + 1 == 2". Passed!

2

u/transferStudent2018 Oct 20 '26

LLMs don’t write good tests. They write stupid tests like “test that the correct implementation of the interface was called” instead of verifying actual behavior

7

u/davidemo89 Oct 21 '26

Maybe with 5 month ago you had this issue. Not with today models

2

u/Tcamis01 Oct 21 '26

Also you can give them test guidelines. Its really user error.

5

u/scriptmonkey420 Oct 20 '26

That's just not true.

1

u/TheStatusPoe Oct 21 '26

My experience is LLMs go overboard with mocks unless you set up extremely tight guardrails and even then will "cheat" by using mocks if it gets into a point where the code can't be tested. Whenever I start to feel friction writing tests that a good signal to me that the code needs to be refactored to make it easier to test, which is something LLMs tend to not do.

I'm of the opinion that mocks do not do a good job of testing the observable behavior of the unit and am in agreement with the comment you're responding to. 

1

u/YeetCompleet Oct 20 '26

It is indeed the better problem to have

1

u/TitusBjarni Oct 21 '26

I used to be anal about TDD but now YOLO Claude and never read my own tests