r/ProgrammerHumor • • Oct 20 '26

Meme claudeWasNotHere

Post image
18k Upvotes

230 comments sorted by

View all comments

Show parent comment

325

u/Iankill Oct 20 '26

I wonder if this was because one of the first things people used ai for was having it write tests because no one likes writing tests

154

u/cheese_is_available Oct 20 '26

It's because the humans that reviewed AI slop heavily penalized no tests, but didn't penalize recreating tests that already existed because it's fucking hard to notice that. You only have to skim the diff for the first one, but you need to review the whole tests directory in details for the second one. Same problem for the AI if they need to check btw. Maybe the harness could penalize covering a line of code that is already covered but coverage is an imperfect metric.

0

u/[deleted] Oct 21 '26

[deleted] — view deleted comment

3

u/Oddly_Energy Oct 22 '26

Previous poster gave two examples of penalty:

  1. Penalize the AI for not writing tests.
  2. Penalize the AI for writing redundant tests.

Penalty #1 is "the first one". Penalty #2 is "the second one".

In short: If the AI gets a penalty for missing tests, but no penalty for redundant tests, it will start writing redundant tests to reduce the risk of missing a test.

2

u/cheese_is_available Oct 21 '26

To say "no automated tests, bad AI" and be correct you only need to check the fucntion signatures and find none that start by "test".

1

u/nicman24 Oct 21 '26

probably was for mapping code without documentation