this post was submitted on 30 Jun 2024
309 points (92.6% liked)

Programmer Humor

19512 readers
314 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
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] -5 points 4 months ago (2 children)

That's why I said false negative. The medical test is testing for the presence of a disease. So if they find the disease is considered a positive test (it found what it was looking for). For static analysis on code, its the opposite. Its testing if your code is free of issues that it can detect. If it finds no issues, then the test was positive. If does find issues, the test failed and each issue is a negative that contributed to the test failing.

[–] [email protected] 13 points 4 months ago

I’m not debating. It is not a matter of opinion. I’m doing you the courtesy of informing you how the entire rest of the world uses the term.

If action A looks for thing X, and it finds thing X, then the test is positive. If action A fails to find thing X, then the test is negative.

If action A claims to find thing X, but later confirmation determines that thing X is not really there, then this situation is called “false positive”.

If action A claims fails to find thing X, but later confirmation determines that thing X is actually there, then this situation is called “false negative”.

That thing X may subjectively be considered an unwanted outcome has **nothing ** to do with the terms used.

[–] [email protected] 3 points 4 months ago (1 children)

You could say "A static analysis tool is testing for the for the presence of defects" or "a medical test is testing if your body is free of diseases that it can detect" to change how you're looking at either of the tests in the previous comment.

[–] [email protected] 0 points 4 months ago (1 children)

By your logic it would be a positive for your code to have errors/warnings. And on the latter, that would appropriate if there was a test that determined if you are free from all known diseases (or at least those that it can detect).

[–] [email protected] 8 points 4 months ago

Is it a positive to have pathogens that cause dengue/malaria in your blood? Yet we still say that someone tested positive for dengue if they have the virus.

Static analysis tools don't test for all known issues either, no?

It's all just semantics dude. :)