Thursday, December 26, 2019

Robots slacking off

Dear readers,
this is very likely my last cartoon for 2019 and I am already looking forward to drawing and publishing the next ones in 2020.
14 cartoons in a year is not bad, considering the fact, I have hardly any time to settle back after work and after having helped kids for school.

For those who want to know, I have a quite consistent hit-count on my blog (1600 pageviews p. month). In my world this is a lot. Well, not enough to become famous but still a lot of reasons to continue drawing in 2020.  I wish you very XMAS (even though I am kind of late) and a happy New Year 2020.
Torsten J. Zelger

Sunday, December 8, 2019

False Positives


When developers start working on a new feature, they sometimes hard-code things with the intention to replace this part later with dynamic values. Sometimes, these snippets are forgotten, and you are testing features that work with hard-coded results. Success messages aren't excluded from this practice.

Simply said, never trust any success messages. If the program claims it worked, the program may be wrong. The opposite is also true.

The term "false positives" has its roots in medical testing. A false positive is an error in which a test result improperly indicates presence of a disease (the result is positive), when - in reality - it is not present, while a false negative is an error in which a test result improperly indicates no presence of the disease when in reality it is present. 
 
Yet another example:
Automated tests in NUNIT are declared with the "[Test]" attribute and in other programming languages there are similar terms in use to mark as method as test-method such as @Test, or other.
Anyhow, if a developer forgets to add the attribute, nothing bad happens. The compiler doens't care about it. The developer may have invested a lot of time developing the test case and then simply forget about this attribute. What happens is, the test never fails, because it gets never executed.