Badly coded breathalyzer

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.

Lmao, I can't believe that got out of testing...I guess all the programmers/testers were in on it together...
I believe it. Shoddy software is sickeningly common...
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
It sounds like they were beta-testing the code at the bar. ;>

Topic archived. No new replies allowed.