Badly coded breathalyzer

May 15, 2009 at 1:24am
Here's an interesting article about a shoddily coded breathalyzer.

http://www.dwi.com/new-jersey/state-v-chun/

Base One did an extensive evaluation, finding 19,400 potential errors in the code.

An example of one of the errors:

Readings are Not Averaged Correctly: When the software takes a series of readings, it first averages the first two readings. Then, it averages the third reading with the average just computed. Then the fourth reading is averaged with the new average, and so on.

May 15, 2009 at 2:49am
Lmao, I can't believe that got out of testing...I guess all the programmers/testers were in on it together...
May 15, 2009 at 5:51am
I believe it. Shoddy software is sickeningly common...
May 15, 2009 at 2:27pm
hahaha :) Extremely entertaining.

And now a note on the analysis of the situation:
Readings are Not Averaged Correctly: When the software takes a series of readings, it first averages the first two readings. Then, it averages the third reading with the average just computed. Then the fourth reading is averaged with the new average, and so on. There is no comment or note detailing a reason for this calculation, which would cause the first reading to have more weight than successive readings.


Obviously the developers of Alcotest 7110 MKIII-C were not the only incompetent participants in the story :))

1/2(1/2a+1/2b)+1/2c = 1/4a+1/4b+1/2c
Last edited on May 15, 2009 at 6:04pm
May 19, 2009 at 11:12pm
It sounds like they were beta-testing the code at the bar. ;>

Topic archived. No new replies allowed.