863
you are viewing a single comment's thread
view the rest of the comments
[-] Morphit@feddit.uk 12 points 6 months ago

The point being made is that it also depends how often the 'true' value gets used in the code. Tests might only evaluate it a few times per run, or they could cause billions of evaluations per run. You can't know the probability of a test failure without knowing the occurrence rate of that expression.

[-] killeronthecorner@lemmy.world 4 points 6 months ago* (last edited 6 months ago)

Yes you're correct, this was the point I was making.

To elaborate: could be 100s of times in a codebase, even 1000s, being executed in tests on local machines and build servers 100s of times a day, etc. etc.

[-] themusicman@lemmy.world 2 points 6 months ago

But it would hit a different place every time... Most developers wouldn't even consider checking for this, and the chance of getting a repro in a debugger is slim to none

this post was submitted on 09 Feb 2024
863 points (97.6% liked)

Programmer Humor

18890 readers
1138 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS