post  Badly coded breathalyzer

Hammurabi (399)   Link to this post
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.

firedraco (2048)   Link to this post
Lmao, I can't believe that got out of testing...I guess all the programmers/testers were in on it together...
Duoas (2964)   Link to this post
I believe it. Shoddy software is sickeningly common...
tition (238)   Link to this post
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
rootboy (10)   Link to this post
It sounds like they were beta-testing the code at the bar. ;>


This topic is archived - New replies not allowed.