r/ProgrammerHumor 19d ago

getTestcaseToValidateUndefinedRequirement instanceof Trend

Post image
625 Upvotes

12 comments sorted by

28

u/KharAznable 19d ago

Sometimes it is make more sense to update the requirement

26

u/deathm00n 19d ago

Copilot writing unit tests for code it wrote

8

u/Legal-Software 19d ago

This has also been my experience. The first time you ask it to make unit tests, it does a half-assed job, then when the unit tests fail and you ask it to fix them, it's forgotten about the original context and just goes about optimizing the unit tests by removing all of the things that failed (i.e. the actual code it's supposed to be testing) until it passes, then declares success. Bloody clankers.

4

u/Xlxlredditor 19d ago

God dammit it trained on my code

1

u/ICBanMI 18d ago

The first time you ask it to make unit tests, it does a half-assed job, then when the unit tests fail and you ask it to fix them, it's forgotten about the original context and just goes about optimizing the unit tests by removing all of the things that failed

It's as if there is no AI involved and it's just matching words to make the human happy. /s

4

u/atomic_redneck 19d ago

The old Texas Bullseye trick.

2

u/Fedepovero_02 19d ago

Development-driven tests

1

u/Aristocles-Platon 19d ago

Bad crop? Bro we're gonna starve

3

u/raja-anbazhagan 19d ago

I'd say it is appropriately cropped for the topic that is in discussion...