Slashdot Mirror


Court Orders Breathalyzer Code Opened, Reveals Mess

Death Metal writes with an excerpt from the website of defense attorney Evan Levow: "After two years of attempting to get the computer based source code for the Alcotest 7110 MKIII-C, defense counsel in State v. Chun were successful in obtaining the code, and had it analyzed by Base One Technologies, Inc. By making itself a party to the litigation after the oral arguments in April, Draeger subjected itself to the Supreme Court's directive that Draeger ultimately provide the source code to the defendants' software analysis house, Base One. ... Draeger reviewed the code, as well, through its software house, SysTest Labs, which agreed with Base One, that the patchwork code that makes up the 7110 is not written well, nor is it written to any defined coding standard. SysTest said, 'The Alcotest NJ3.11 source code appears to have evolved over numerous transitions and versioning, which is responsible for cyclomatic complexity.'" Bruce Schneier comments on the same report and neatly summarizes the take-away lesson: "'You can't look at our code because we don't want you to' simply isn't good enough."

707 comments

  1. But does it work? by will+this+name+work · · Score: 4, Insightful

    Poorly written code is one thing, but does it ultimately work?

    1. Re:But does it work? by Jason1729 · · Score: 4, Insightful

      Does it matter? The real question is "Can a prosecutor convince a computer illiterate judge beyond reasonable doubt that it does ultimately work?".

    2. Re:But does it work? by Yold · · Score: 5, Insightful

      I read the report earlier, and there are some very valid issues with the source. The first is that in incorrectly averages readings taken, assigning more weight to the first reading than the subsequent ones. It also has a buffer overflow issue, where an array is being written past its end, and even if this results in an error, it goes unreported.

      You would have to be a fricken moron not to have a problem with mis-averaging, however in my experiences with law-people, they can be even worse than PHBs.

    3. Re:But does it work? by gd2shoe · · Score: 4, Insightful

      Good question, but it needs to be reworded. Does it always work for all inputs?

      Also important, if it's a poorly written mess, why is the company claiming that it works? I see no indication that they've done due diligence for a device used to convict people. Just because they've never observed it to fail, doesn't mean a thing.

      --
      I won't join Slashcott. OTOH, If Beta goes live, I just won't be back until it's fixed. Sorry Dice.
    4. Re:But does it work? by moderatorrater · · Score: 1

      probably

    5. Re:But does it work? by geekgirlandrea · · Score: 5, Informative

      Read the article. The code in question, among other things, calculates an arithmetic mean of a sequence of values by successively averaging each value with the mean of all the previous ones, and reduces 12 bits of precision coming from the hardware sensor to 4 for some unspecified but undoubtedly stupid reason.

    6. Re:But does it work? by mea37 · · Score: 4, Insightful

      My first thought as well.

      Of course, with poorly written code, it's hard to show whether or not the code ultimately works by examination of the code.

      Then again, proving that the code works (which should be the standard when the code is analyzed in court) by code examination is very difficult even for well-written code.

      Perhaps a better approach would be documented, repeatable testing of the device. When I challenge a radar gun, I get to ask about its calibration documents, but I don't think I get to debate the blueprints from which it was built.

      My personal opinion - and before getting on an "innocent until proven guilty" kick bear in mind that I'm not a part of the court system in this case - is that the defense realizes that almost all software systems look awful and are trying to game their way out of a conviction they've probably earned.

      That said, if for no other reason then to eliminate such gaming, there should be standards for testing and documenting the proper function of these devices. Any device that can't be calibrated and tested with sufficient certainty should be banned from use as evidence in court. If the device passes the test, then exactly how it does it shouldn't really matter.

    7. Re:But does it work? by MozeeToby · · Score: 4, Insightful

      I'd be more interested in their test plan and test results than their source code if I were trying to convince a computer illiterate judge of something. Find a missing test case or an uncovered corner condition and you might have a decent case, code that doesn't pass static analysis and is ugly... well that pretty much defines 99% of the code out there.

    8. Re:But does it work? by vertinox · · Score: 4, Insightful

      Of course, with poorly written code, it's hard to show whether or not the code ultimately works by examination of the code.

      Of course it works because it gives an end result instead of an error message.

      The question every should ask is "Does it work accurately?" or "Does poorly written code skew the results?"

      Can the defense prove that the code was written so haphazardly that it ignores some data or does it round incorrectly like Excel does? These things do and can happen with sloppy code.

      That said, if the code is just poorly commended and indented correctly (*wink*) but does the math right and makes sure there isn't a sampling or rounding problem, then it isn't a problem.

      --
      "I am the king of the Romans, and am superior to rules of grammar!"
      -Sigismund, Holy Roman Emperor (1368-1437)
    9. Re:But does it work? by plague3106 · · Score: 4, Insightful

      code that doesn't pass static analysis and is ugly... well that pretty much defines 99% of the code out there.

      It's more than ugly, it's difficult to maintain. Also, this point is largely irrelevent; 99% of the code out there isn't spitting out a number that says you're guilty of a serious offense.

    10. Re:But does it work? by wiredlogic · · Score: 3, Insightful

      Regardless of the state of the code no breathalyzer truly "works". None of them can directly detect blood alcohol content. All they do is use a proxy to estimate using the reaction products from your breath. These devices are wholly unscientific. There is no possible way they can derive a credible estimate with a precision of 0.001% or even 0.01%. There is no accounting for body size, type, or metabolic rate. Furthermore these devices can be triggered by more than just ethanol. Chocolate is reported to cause a false reading as well as other common foods. This is why one should always refuse a breathalyzer test even if you haven't been drinking. There are too many chances for a false positive to risk it.

      --
      I am becoming gerund, destroyer of verbs.
    11. Re:But does it work? by internerdj · · Score: 4, Insightful

      Also it looks like their out of range error scheme was to set it to the closest legal value and report it if it was recurring and continuous. Assume for a moment you took a test right after the last good reading, you took 32 samples. It would only report an error if all 32 samples failed. Otherwise 31 of the 32 will report the maximum legal extreme closest to that reading. Couple that with the fact that the averages were taken incorrectly, this isn't just reasonable doubt it is worse than using a RNG to find if they are drunk.

    12. Re:But does it work? by Volante3192 · · Score: 3, Insightful

      If I read the report right, they coded the thing to never actually fail in the first place. It'll always return what can be passed off as a legitimate answer.

    13. Re:But does it work? by digitalunity · · Score: 3, Insightful

      Looks like the answer is no. It's a black box that doesn't report internal errors except when it can't ultimately decide on an answer.

      The source code is useful only for showing the machines can be unreliable in certain circumstances, but unless he has substantiating evidence to show it gave an incorrect result he is unlikely to prevail.

      Example: Guy blows .09 after drinking 2 beers. He might have a case that the machine was wrong. Example 2: Guy drinks 8 beers and blows .18. Machine might be wrong, but even if it was off by a bit due to rounding averages, he's still guilty as sin.

      Sucks, but that's just the way the law looks at it.

      Someone mentioned earlier that the weighting of samples under repeat tests give weight to the first blow, which is a big red flag. The initial blow is probably the sample most likely to be contaminated by liquid from the mouth which will skew the reading dramatically, leading to higher BAC's than actuality. If someone blew a .12 and then a .07 on the same machine, he could be found guilty but it's possible the second sample is more accurate.

      --
      You can't legislate goodness. Let each to his own destiny, by will of his freely made choices.
    14. Re:But does it work? by Carnildo · · Score: 5, Insightful

      Perhaps a better approach would be documented, repeatable testing of the device. When I challenge a radar gun, I get to ask about its calibration documents, but I don't think I get to debate the blueprints from which it was built.

      Calibration and testing won't reveal all the edge cases that might cause errors. Consider a radar gun designed to take the average of five samples. You've got a car moving away from you at 70 MPH, and a duck flies into the beam for one sample, moving towards you at 5 MPH. This gives the following five samples:

      70 70 70 -5 70

      I can see a way that badly-written code would turn that into an average speed of 106 MPH (storing a signed char as an unsigned char, which would turn the -5 into a 251), and yet it would pass calibration and every test someone's likely to perform.

      --
      "They redundantly repeated themselves over and over again incessantly without end ad infinitum" -- ibid.
    15. Re:But does it work? by DnemoniX · · Score: 2, Insightful

      Well the problem with calculating the averages should honestly be enough to get this tossed. The defense can put up an exhibit with a set of numbers using the flawed methodology which shows a person to be over the limit. Then call an expert witness with a math degree, or an accountant for that matter. Show that the average when calculated normally is below the the legal limit. Even better is if you can show that the machine has calculated an average that falls below the legal limit but should have been above. That would show the device to be a public safety hazard for clearing persons who are actually impaired.

    16. Re:But does it work? by Bill,+Shooter+of+Bul · · Score: 1

      Not accurately enough to be used in a court of law.

      --
      Well.. maybe. Or Maybe not. But Definitely not sort of.
    17. Re:But does it work? by Hognoxious · · Score: 2, Insightful

      There is no accounting for body size, type,

      There's no need to. It measures a concentration (per unit volume), not how many beers you drank.

      or metabolic rate.

      Irrelevant. Just because you'll sober up quicker doesn't mean you aren't drunk now.

      Try not to hit anybody on your way home.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    18. Re:But does it work? by Yold · · Score: 2, Insightful

      In Minnesota (and other states), it is a crime to refuse a roadside breathalyzer test due to "implied consent" laws.

    19. Re:But does it work? by Anonymous Coward · · Score: 5, Informative

      >> assigning more weight to the first reading than the subsequent ones.

      It seems to apply more weight to later readings:

      where a1=1, b1=2, c1=3, d1=4
      (A1+B1+C1+D1)/4 = 2.5 (the correct average)
          and
      (((((A1+B1)/2)+C1)/2)+D1)/2 = 3.125

    20. Re:But does it work? by JWSmythe · · Score: 1

          I've read through some really shitty code before. Sometimes you can't determine if it should work right or not, but when you start spotting flaws of a significant magnitude, you can assume the result is wrong.

          Since this was never intended for release, and they got paid for it, as long as it gave something, they were happy. Now it's come to bite them in the ass. Ha!

          I try to write like there will be an audience someday, even if it's just me reading my own code years later.

         

      --
      Serious? Seriousness is well above my pay grade.
    21. Re:But does it work? by Yold · · Score: 4, Informative

      correction, you may refuse a roadside breath test, but not one at the police station.

    22. Re:But does it work? by fracai · · Score: 5, Insightful

      Presuming it's the same summary that I read, it contained a mistake.

      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.

      This actually places more weight on the final reading, not the first.

      --
      -- i am jack's amusing sig file
    23. Re:But does it work? by al0ha · · Score: 1

      Being a computer expert, or an expert about anything other than the law, is not the job of a prosecutor, judge or defense attorney.
      Thus I argue it does matter and it matters that independent experts can review the device and make conclusions to be presented in court.

      --
      Did you ever wake up in the morning, with a Zombie Woof behind your eyes? -- FZ
    24. Re:But does it work? by Reece400 · · Score: 1

      By the sounds of it, it works so long as all the hardware is fine and new. However if any electronics malfunction it either won't know about it, or ignore it unless it hasppens 32 times in a row! Meaning a broken one could give erroneos results every other test without ever raising any red flag!

    25. Re:But does it work? by MozeeToby · · Score: 4, Interesting

      No, but some no trivial amount of code is running the x-ray machine at the dentist, processing my credit card, managing my fuel injection, saving my thesis paper, and timing stoplights throughout my city.

      We trust our lives and livelihoods to shitty code every day and the plain fact of the matter is that shitty code usually works. As programmers we like to think of ourselves as artists; creating a master piece of perfectly engineered code. In reality, all projects face budget and time constraints, most projects have legacy code which is hard to maintain, and most teams have at least one guy who just doesn't get it.

      If the code works, and you can show empirically that the code works, that is proven beyond a reasonable doubt it my opinion. Not beyond any doubt, but that isn't the standard that our justice system is based upon.

    26. Re:But does it work? by Man+On+Pink+Corner · · Score: 2, Insightful

      The code in question, among other things, calculates an arithmetic mean of a sequence of values by successively averaging each value with the mean of all the previous ones, and reduces 12 bits of precision coming from the hardware sensor to 4 for some unspecified but undoubtedly stupid reason.

      Well, it's not hard to imagine why they throw away all those bits. Prospective LEO customer: "Wow, this thing never gives the same reading twice. How am I supposed to secure convictions with numbers this flaky?"

      The averaging thing, on the other hand... that's just a dumbass bug. One that's probably wrecked a few peoples' lives.

    27. Re:But does it work? by digitalunity · · Score: 4, Interesting

      Actually, research I read when I got my DUI in 2007 seemed to indicate the release of alcohol vapors into the air by the lungs can vary widely between persons, by as much as 20%.

      This has nothing to do with body size, type or metabolic rates that I'm aware of, but more research is obviously needed for the scientific community to reach a consensus. The sampling process is fundamentally flawed but the courts have routinely rejected any evidence to the contrary.

      I don't know about 49 of the states, but in Washington state, if you want something more accurate than a breathalyzer, you have to demand the police take you to the hospital to have blood drawn at your own expense. They are required by law to comply, but 99% of DUI suspects know nothing of their rights.

      If I got pulled over again that same night, I would have driven home without a DUI and even if they did manage to get me to perform parking lot special olympics(also called the field sobriety test), I would have asked for a lawyer. Like most first time offenders, I took a plea deal to avoid significant jail time and paid the ridiculous fine and took alcohol awareness classes. The whole thing was a farce, intended to make money.

      I blew .086% and easily could have challenged the results in court, given the breathalyzer had a sticker on it that said it hadn't been calibrated in 2 years.

      --
      You can't legislate goodness. Let each to his own destiny, by will of his freely made choices.
    28. Re:But does it work? by shutdown+-p+now · · Score: 1

      Regardless of the state of the code no breathalyzer truly "works". None of them can directly detect blood alcohol content.

      Not all jurisdictions define limits in terms of blood alcohol content - some (e.g. UK) use breath alcohol content instead, which is what breathalyzers do accurately measure.

    29. Re:But does it work? by Dan+Ost · · Score: 1

      So if you refuse to take it at the station, do they physically force you to take it somehow or is the refusal treated as a confession?

      --

      *sigh* back to work...
    30. Re:But does it work? by Chabo · · Score: 1

      I don't know Minnesota law, but in most states you can opt for a blood test in lieu of a breath test, without penalty. Personally, I'd rather do this, despite not liking needles.

      --
      Convert FLACs to a portable format with FlacSquisher
    31. Re:But does it work? by erroneus · · Score: 3, Insightful

      Whether or not it "works" isn't quite enough in my opinion. It needs to be clearly written in such a way that the purpose and methods used in sampling input from hardware and the making of calculations are verifiably accurate and true in all cases. This is an instrument that measures whether or not someone is within a prescribed legal limit and needs to be as provably clear and accurate as possible. We are talking about taking away freedoms from people as a result of this test machine and there should be as little room for error as possible.

      If I were to prescribe a system for analyzing breath for alcohol content, I would require that a single test unit be comprised of two machines from two different manufacturers and that any single sample be split equally between the two machines for measurement such that when both machines return results and are both in agreement within a prescribed "reasonable" difference from one another, then we might begin to say we have a reasonably accurate measure from which judgements can be reasonably made.

      In the mean time, software architecture needs to be held to the same legal standards as ACTUAL architecture and engineering. I recall being involved in a cabling project where all terminations were reading perfectly, but when I inspected the raceways, the bed radius of the cabling was way too tight and much of the cable was tied to various pipes and conduits and not fixed to the hardware intended for the handling of the cable. All of the cabling was not installed according to clear and complete specification and I was furious at what I found. The first answer offered to me was "but it all works right?"

      If you took your car in for repair and they charged you the full price of the repair with parts and you found that it was repaired with duct tape and bailing wire, would you accept "but it works!" as a reasonable answer to your complaint? I think not!

      Back to this situation: "Does it work?" The real answer? If you cannot read the code and make clear sense of it, you cannot prove that it works, only that it works under the practical conditions of testing. That is simply NOT good enough for any scientific measurement and especially not good enough for measurements that may be used to determine whether or not a person is sent to prison.

    32. Re:But does it work? by JCSoRocks · · Score: 5, Insightful

      I'm not generally someone that insists everything needs to be open source. However, in a situation like this, where this device makes the difference between a life changing conviction and exoneration, it's pretty obvious that people should have the right to examine it. The court was able to order it opened here, but it makes you wonder how many people have been screwed by this.

      Sadly in the majority of cases where evidence based on something like this (DNA, hair analysis, etc) is shown to be based on someone or something that's not good - nothing comes of it. I saw a blurb about a "forensic expert" that would give the prosecution any testimony they wanted. The state he was based in refused to reexamine the cases he was involved in even after he was shown to be a liar.

      It's depressing but it's one reason I steer clear of the law as much as I can. As much as we Americans like to think of our legal system as dispensing justice, the sad fact is that it frequently doesn't.

      --
      You are using English. Please learn the difference between loose and lose; they're, there, and their; your and you're.
    33. Re:But does it work? by EkriirkE · · Score: 1

      If they were recording each reading for averaging, this would be the issue, but their avg method is a way to cut on memory and processing costs - you only have to store 1 value and keep averaging it vs store an array of readings then average the array. Yes, they could keep adding to the base number then divide at the end, but the processor sounds 8-bit ("Atari-style" "from the 1970s" - 6502???) and couldn't handle such a large value (overflowing, sans erreur)

      --
      from 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
      to 45 2F 6E 40 3C DF 10 71 4E 41 DF AA 25 7D 31 3F
    34. Re:But does it work? by mea37 · · Score: 2, Insightful

      Yes, but to GP's point - if the code had been subjected to proper tests, then it wouldn't matter how hard it was to maintain. Either the maintainers overcame that difficulty and it passed the test, or they didn't and it failed.

    35. Re:But does it work? by NewWorldDan · · Score: 1

      We may never know. It seems quite likely that undetected failures could occur. But more important than that, no sample is kept for later verification. It's one thing to have an imperfect device for field testing, but using those results in court is bad proceedure. A blood sample is far more reliable, plus multiple samples can be taken for independant analysis.

    36. Re:But does it work? by sexconker · · Score: 4, Insightful

      Show me a programmer creating "perfectly engineered code", and I'll show you a programmer building up its resume.

    37. Re:But does it work? by wfstanle · · Score: 4, Informative

      "Just because they've never observed it to fail, doesn't mean a thing."

      Correct! This is a point that many people fail to understand. Testing can't prove that there aren't bugs. All it proves is that a bug did not occur. Failing a test just proves that a bug exists while passing all test just proves that you failed to find a bug. Passing many tests can boost your confidence that there are no bugs. Verification can prove that your code is correct but for most programs it is unfeasible.

    38. Re:But does it work? by digitalunity · · Score: 5, Informative

      In all 50 states, refusal to take a breathalyzer at the police station will result in a 1 year(minimum) suspension of your drivers license.

      In all 50 states, you can refuse to take a roadside breathalyzer as they're inadmissable in a court of law. If you have had even 1 drink, always ask to go to the station for a real breathalyzer. The PBT's, or portable breath testers, are wildly inaccurate and only give the police probable cause to arrest. It will not work in your favor to take it.

      --
      You can't legislate goodness. Let each to his own destiny, by will of his freely made choices.
    39. Re:But does it work? by digitalunity · · Score: 2, Informative

      Several states such as Washington state will let you get a blood test, but the breathalyzer at the station is still legally required and you have to pay for the blood test out of your own pocket.

      --
      You can't legislate goodness. Let each to his own destiny, by will of his freely made choices.
    40. Re:But does it work? by sexconker · · Score: 1

      One that's probably wrecked a few peoples' lives.

      TWO meanings for the price of one.
      I see what you did there.

    41. Re:But does it work? by feldicus · · Score: 1

      Technically, the article has it backwards. The last reading has the most weight. The point is still perfectly valid, though. I just can't prevent myself from being pedantic about it.

      feldicus

    42. Re:But does it work? by poetmatt · · Score: 1

      you forgot the word "accurately", which is more important.

      Think of this like voting machines where you hit democrat and it puts in a republican vote. Does it still "work"?

    43. Re:But does it work? by mea37 · · Score: 2, Insightful

      "Calibration and testing won't reveal all the edge cases that might cause errors"

      Then you aren't testing correctly.

      "I can see a way that badly-written code would turn that into an average speed of 106 MPH "

      You may need to revisit the legal definition of "reasonable doubt". Being able to contemplate a scenario where the evidence could be wrong is not sufficient to overturn the evidence.

      Regardless, if the testers don't know that "an input suffered overflow or underflow" is an edge case they need to test, then they aren't testers.

    44. Re:But does it work? by digitig · · Score: 1

      Someone mentioned earlier that the weighting of samples under repeat tests give weight to the first blow, which is a big red flag. The initial blow is probably the sample most likely to be contaminated by liquid from the mouth which will skew the reading dramatically, leading to higher BAC's than actuality.

      Except, as others have pointed out, that was a mistake and the algorithm actually gives higher weighting to later readings. Which on your argument is pretty much the behaviour it needs, except that the behaviour is clearly not planned and weighted to the actual way the readings would decrease.

      --
      Quidnam Latine loqui modo coepi?
    45. Re:But does it work? by Midnight+Thunder · · Score: 1

      Correct! This is a point that many people fail to understand. Testing can't prove that there aren't bugs. All it proves is that a bug did not occur. Failing a test just proves that a bug exists while passing all test just proves that you failed to find a bug. Passing many tests can boost your confidence that there are no bugs. Verification can prove that your code is correct but for most programs it is unfeasible.

      This prompts the question: what black box tests were done to define how reliable the device is? If a sanctioned testing process shows that it works 90% of the time then it shows it is as reliable as most technology is, but is 10% reasonable doubt? You can adjust the percentages all you want, but the point I am trying to make is if it works most of the time and fails in the odd case does that make the device unreliable? I am yet to see anything that is 100% reliable.

      --
      Jumpstart the tartan drive.
    46. Re:But does it work? by chimpo13 · · Score: 1

      There's no way anyone is going to believe you when you say, "I just had 2 beers". That's a magic number that screams, "I'm lying" even if it is true.

      Ask cops, paramedics, and emergency room personnel and "I just had 2 beers" is a running joke. Like "I was sitting on my porch minding my own business".

    47. Re:But does it work? by Anonymous Coward · · Score: 1, Insightful

      You would have to be a fricken moron not to have a problem with mis-averaging, however in my experiences with law-people, they can be even worse than PHBs

      Writing lousy code seems to be a prerequisite for being considered a great and invaluable corporate developer in some organizations. As long as it appears to work correctly who cares whether it actually does? .... well until you get sued for incompetence but the common consensus on that issue seems to be that this is a risk that comes with the territory. If you haven't moved on and covered your tracks properly by the time the results of your scramble to meet those deadlines is flushed out into the open it's your own fault anyway. The older I get the less it surprises me what kind of, utter, utter crap people actually have the gall to charge you money for!

    48. Re:But does it work? by mea37 · · Score: 1

      That's an interesting definition of "it works". By any chance are you in our QA department?

      "Can the defense prove that the code was written so haphazardly that it ignores some data or does it round incorrectly like Excel does? These things do and can happen with sloppy code."

      These things can be and are detected by proper testing.

      Infering that they might have happeend because the code is sloppy and sloppy code might do that, is a bit like infering that Johny might have stolen a CD because Johny is a teenager and teenagers might do that.

      The issue isn't the quality of the code; the issue is the absence of proper testing requirements around these devices.

    49. Re:But does it work? by HisOmniscience · · Score: 3, Insightful

      ...programmer building up its resume.

      I always knew programmers weren't human.

    50. Re:But does it work? by geekgirlandrea · · Score: 4, Interesting

      Well, if we assume the machine was sensitive up to the LD50 for ethanol of 0.5% BAC, then with only 4 bits of precision the uncertainty just from the rounding error is comparable to the difference between being over the limit and being completely sober. This was covered in the comments on Bruce Schneier's blog. That one's probably wrecked a few peoples' lives too.

    51. Re:But does it work? by Darkness404 · · Score: 3, Insightful

      The problem isn't that it can break, the problem is it can return bad readings. For example, a dentist's X Ray machine isn't suddenly going to show cavities everywhere because there is no code in the X-ray. Worst thing with a credit card machine is that it doesn't work, most of the time it doesn't overcharge you or something like that, or if it does a few phone calls will sort it out. Again, the worst thing that happens with fuel injectors is they break, your car doesn't run, you pay a few hundred and get it fixed. Worst thing with stoplights is they break, there is always a human driver who can figure out if all the lights are on red or green and call the police to manage traffic.

      Breathalyzers are basically black boxes, there is no human to really check them out. With the code more apt to return false readings then simply break, it is dangerous code, when those readings can be the difference between a crime and a non-crime.

      --
      Taxation is legalized theft, no more, no less.
    52. Re:But does it work? by 3dr · · Score: 1

      Oops, I moderated the wrong tag by accident. Posting to remove (hopefully).

    53. Re:But does it work? by DeadCatX2 · · Score: 5, Insightful

      You are correct. In the biz, we refer to this as an exponentially-weighted moving-average-filter. Recent samples are weighted more heavily than older samples.

      y(n) = alpha*x(n) + (1 - alpha)*y(n-1)

      The alpha value controls how much of the current input makes it to the output and how much of the old output stays. i.e. with an alpha value of 0.5, half of the new value is added to half of the old value. With an alpha of 0.1, 10% of the new value gets added to 90% of the old value.

      This filter is nice because it doesn't require you to remember all the values that you want to average together, but it's a horrible way to get over the inherent noisiness in sensors.

      --
      :(){ :|:& };:
    54. Re:But does it work? by Rene+S.+Hollan · · Score: 2, Interesting

      Yes, but in WA you can be convicted under DUI with 0% BAC.

      The "influence" does not have to be alcohol, nor an identifiable chemical intoxicant.

      Driving erratically is evidence enough of being "influenced".

      --
      In Liberty, Rene
    55. Re:But does it work? by wfstanle · · Score: 1

      'Of course it works because it gives an end result instead of an error message.

      The question every should ask is "Does it work accurately?" or "Does poorly written code skew the results?'

      This is not entirely accurate. A program and especially programs like this or safety critical programs should have a specification. A program is incorrect if its output fails to meet the requirements of the specification (providing that the input is good). Poorly written code might be correct according to its specification. I really wonder it there is a specification. If there is a specification, then does it say that what the program does is acceptable. If this is the case, then whoever wrote that specification should be fired.

    56. Re:But does it work? by Anonymous Coward · · Score: 3, Interesting

      To get more convictions... this makes sense now.

      Common wisdom holds that the end of a breath from the "bottom" of the lungs contains a higher percentage of alcohol than the main body of the breath, this is held to be why the officer will tend to tell you to push harder to get that last higher sample into the device. If anything sets off the machine, it'll be that last bit with a more concentrated sample.

      Whether that reflects the *actual* blood alcohol level in any well defined and useful fashion needs to be explored some more.

    57. Re:But does it work? by Chyeld · · Score: 1

      In some places, refusing the test carries heavier penalties than taking it and being found legally drunk. Many states consider the issuance of a drivers license to be implied consent by you to submit to chemical testing if you are pulled over. In addition, the penalties for refusing are completely seperate of anything they give you for the actual DUI issue. Even if they can't prove you were drunk, you get still get hit with the refusal.

    58. Re:But does it work? by Anonymous Coward · · Score: 0

      Seeing as how they've already determined that breathalyzers from at least one manufacturer had their percentage of false readings off by a decimal place or two(I think the claim was of 2.7% when in reality it was 27%), I don't see that I'd be too convinced regardless of the results.

    59. Re:But does it work? by Mateo13 · · Score: 3, Funny

      I wonder if they're hiring QA testers...

    60. Re:But does it work? by Andy+Smith · · Score: 1

      I'll show you a programmer building up its resume

      "its" :-)

    61. Re:But does it work? by Hatta · · Score: 3, Informative

      It measures a concentration (per unit volume), not how many beers you drank.

      It measures a concentration per unit volume of breath. There are many assumptions in extrapolating this to concentration per unit volume of blood.

      --
      Give me Classic Slashdot or give me death!
    62. Re:But does it work? by Tanktalus · · Score: 3, Insightful

      No, writing lousy code is not a prerequisite for being considered great and invaluable. As /.ers are so fond of saying, correlation is not causation.

      It's just that if you are a lousy coder, you probably have time for proper amounts of sucking up, while if you're a great coder, you probably are too busy getting things to work properly to concern yourself with interpersonal relationships. And it's easy to see why the former get more promotions than the latter.

    63. Re:But does it work? by doug · · Score: 1

      I read the report earlier, and there are some very valid issues with the source. The first is that in incorrectly averages readings taken, assigning more weight to the first reading than the subsequent ones.

      Actually, Bruce seemed to get that one wrong. The description is one of a rolling average which averages the most recent measurement with the previous average. This weights the average with the final measurement, as it is 50% of the final average. With 3 measurements, the result is 25% based off of #1, 25% based off of #2, and 50% from #3. With the fourth measurement that becomes 12.5% from #1, 12.5% from #2, 25% from #3, and 50% from #4. Only the last few measurements have any noticeable impact on the final result.

      BTW: This isn't necessarily wrong. Assuming all the measurements are in the same basic range, does this really matter? Also there could be a valid reason that the final sample is weighted more heavily, but I haven't seen that. If they can give a solid reason for this, then the outrage is much ado about nothing. If not, well, then they deserve to lose a lot of contracts.

      I think that turning off the error checking logic (those interrupts) is the bigger deal. That will be the source of a lot of reasonable doubt which is all that is required.

      What I'm not sure is the role that breathalysers have in the conviction process. If the cop is an independent observer, then both he and the machine are likely to agree before a judge convicts. But if the cop is swayed by the readings, then there is no serious review of the machine's results. My guess is that the cop thinks you're guilty when he pulls you over, so the machine is just justifying his position after the fact, but I have no way of knowing if that is really the case.

      - doug

    64. Re:But does it work? by TheRealMindChild · · Score: 1

      What is there to compare the tests with? A breathalyzer from another company? A different breathalyzer from THE SAME company? In this context, I wouldn't trust either. Then we are left with the question of, if this testing mechanism is the de facto standard of accurate, why aren't they using that?

      --

      "When life gives you lemons, don't make lemonade. Make life take the lemons back!" -- Cave Johnson
    65. Re:But does it work? by swilde23 · · Score: 0, Flamebait

      Funny how morons seem to get that wrong...

      --
      There are 10 types of people in the world. Those that understand this sig, and those that beat up people who do.
    66. Re:But does it work? by just+fiddling+around · · Score: 1

      The problem is that if you refuse, you earn an automatic conviction. At least you can fight the machine's result, but the law is clear cut if you do not submit to the test.

      A better way to prove your innocence is to insist on a blood sample taken quickly after your arrest. BAC is done in labs and should be repeatable. Some jurisdictions only use the blood samples in court and take the breathalizer as a pre-test do decide to draw blood.

      --
      You're not old until regret takes the place of your dreams.
    67. Re:But does it work? by greed · · Score: 1

      Well, in this particular case, it's fairly apparent that the uncovered corner conditions are obvious during static analysis. And the incorrectly-weighted averaging.

      Code that passes static analysis is not known good.

      Code that fails static analysis is known bad.

      Static analysis does not mean "it's pretty". It means the logic and arithmetic work.

    68. Re:But does it work? by Jason1729 · · Score: 1

      In law, if your experts cannot convince the judge that it works that, by definition, raises resonable doubt. The onus never shifts onto the accused to prove it doesn't work.

      So how do the prosecutor experts convince a judge who knows nothing about programming that even though the code might not be perfect it still works well enough that he should be satisfied beyond resonable doubt?

    69. Re:But does it work? by Anonymous Coward · · Score: 0

      I can see a way that badly-written code would turn that into an average speed of 106 MPH (storing a signed char as an unsigned char, which would turn the -5 into a 251), and yet it would pass calibration and every test someone's likely to perform.

      Additionally, if the average was calculated the same way this breathalyser calculates it's average then the measured speed could range from 81 MPH to 161 MPH, depending on when the incorrect measurement occurred.

    70. Re:But does it work? by TheEldest · · Score: 5, Interesting

      This seems to make sense to me. The breathalizer is supposed to measure the blood alcohol content, and this is done by measuring the alcohol content in air expelled by the *lungs* (with a knowlege of partial pressures).

      But if you equally weight beginning readings with ending readings, then you can be skewed by the first reading, which comes from the air in the mouth, instead of the lungs (giving low scores for people with time since their last drink, and people high scores with a recent last drink).

      I would think that this method would give a more accurate reading by filtering out the readings from 'mouth air' and giving preference to 'lung air'.

      But regardles, tests should have been done using both methods, and comparing to blood test to see which returns more consistantly accurate results. I wonder if those tests need to be made public as well.

    71. Re:But does it work? by SoupGuru · · Score: 4, Interesting

      Remember when it used to be you couldn't drunk drive?
      Then it was you couldn't be behind the wheel while drunk?
      Then it became you couldn't even be in the driver's seat with the car off while drunk?
      Then it became you couldn't drive if you couldn't get out and walk in a straight line?
      Then it became reciting your alphabet backwards...
      Then suddenly, you couldn't have an arbitrary percentage of alcohol in your blood to do all those things.
      Then it became whatever the machine said your blood alcohol might be.

      There are no laws against drunk driving anymore. There are laws about not being able to potentially operate a vehicle if a machine determines you have enough alcohol on your breath.

      --
      What doesn't kill you only delays the inevitable
    72. Re:But does it work? by silas_moeckel · · Score: 1

      Your forgetting the truly scary bits. State are passing laws that say that the breathalyzers are correct under the law same as they did with radar guns. They did this years ago with surveyors where state ones were right and you could not bring a non state one in as evidence to counter it. Oh yea some states are restricting you from insisting on a blood test you either accept the breathalyzer or loose your right to drive.

      As a side note can we get back to reasonable, we need a right to drive you can not live a free life without being able to drive, removing that right should take a court order.

      --
      No sir I dont like it.
    73. Re:But does it work? by pjt33 · · Score: 4, Insightful

      This filter is nice because it doesn't require you to remember all the values that you want to average together

      Why would you need to remember all the values? As long as you remember the number of values and their total you're fine.

    74. Re:But does it work? by bcrowell · · Score: 4, Insightful

      Like most first time offenders, I took a plea deal to avoid significant jail time and paid the ridiculous fine and took alcohol awareness classes. The whole thing was a farce, intended to make money.

      When you use words like "farce" and "ridiculous," it makes it sound like you don't want to take responsibility for your own actions. I don't think DUI laws are "a farce, intended to make money." I think they're intended to protect people like me from getting killed by people like you.

    75. Re:But does it work? by Grishnakh · · Score: 4, Insightful

      Our legal system and government are about as non-corrupt as Mexico's. Ours just isn't quite as blatant about it.

    76. Re:But does it work? by Entrope · · Score: 1

      These things can be and are detected by proper testing.

      That's an interesting definition of "proper testing". By any chance do you have infinite time and monkeys available for your testing?

      Most complicated systems -- especially ones that involve embedded software -- are so complicated nowadays that you cannot plausibly test enough cases to determine whether the system has defects. You need good design approaches and multiple levels of (and approaches to) testing to reduce the number of defects to an acceptable number.

      If you find a lot of bugs through traditional testing, and fix them all, that does not suggest that you will find fewer bugs in the future. It almost always indicates that you have even more bugs to find. (Beyond the fact that it means your defect density was too high in the first place, changing N lines of code -- for any reason -- is more likely to introduce new defects than writing N new lines of code.)

    77. Re:But does it work? by retchdog · · Score: 1

      You can save the memory and still do it correctly by just re-weighting the "running average".

      This would be a valid design, however, if the variance of the hardware improved (decreased) as the samples came in, in which case the recent samples should get more weight. I doubt that this is the case, but it may have a reason behind it.

      --
      "They were pure niggers." – Noam Chomsky
    78. Re:But does it work? by Man+On+Pink+Corner · · Score: 2, Informative

      Very true. To some extent, it's reasonable to truncate a few bits of precision if the noise floor of the BAC sensor is substantially higher than the dynamic range of a 12-bit ADC. No reason to display a bunch of meaningless flickering digits extending far to the right of the decimal point.

      But when you're displaying a decimal value, every place value with full 0-9 range takes about 3.3 bits of precision. If you're going to return numbers like "0.18" from a device with a range of 0.00 to 0.99, you need to keep at least 7 bits intact, or you're making stuff up. If their BAC sensor's uncertainty is insufficient to provide consistent, monotonic 7-bit values, or if they're deliberately throwing away all but four bits, then they're making stuff up.

      So, yeah. Conclusion: they're making stuff up.

    79. Re:But does it work? by TheEldest · · Score: 1

      Blood and Urine tests.

    80. Re:But does it work? by gd2shoe · · Score: 1

      Verification can prove that your code is correct but for most programs it is unfeasible.

      This is one of those times when it's a reasonable expectation. This code needs to stand up in court as verified to operate beyond any reasonable doubt. It really should have been a system requirement for the final product.

      I don't know the size of the codebase in question, but I'm guessing it is reasonably small. If it is too large for verification of the whole thing, then vital sections of it should have been verified. Management probably had other ideas of how to spend the budget or meet the time schedule. (Could have been the lead developers fault; impossible to tell at present.)

      --
      I won't join Slashcott. OTOH, If Beta goes live, I just won't be back until it's fixed. Sorry Dice.
    81. Re:But does it work? by RichardJenkins · · Score: 1

      More specifically, if you they only did black box testing of any complex piece of software then you'd expect there to be some error conditions that you miss, so on a device like this I'd expect there to be white box testing also.

      To use a metaphor - consider a car with over complex brakes that rather than being properly designed have been tweaked and fiddled with through successive manufacturing iterations. The testing may well indicate that they perform well in all conceivable circumstances, but I sure wouldn't trust them unless someone knows how they work end to end.

    82. Re:But does it work? by geekgirlandrea · · Score: 1

      Yeah, exactly. Well, they still shouldn't be covering up their limited precision in the last digits by just suppressing them. They should be reporting a confidence interval. Trying to get the average cop to understand the concept of measurement error is probably hopeless, though.

    83. Re:But does it work? by Anonymous Coward · · Score: 0

      Correction, you can refuse the test every single time.

      A condition of having a drivers license however is your submission to that test, in which case a refusal generally means they suspend it for at least a year.

      You can refuse most tests the court asks of you, its just generally stupid to do so unless you are actually guilty of committing the crime.

    84. Re:But does it work? by camperdave · · Score: 3, Funny

      We trust our lives and livelihoods to shitty code every day

      Well, like the saying goes: If builders built buildings the way that programmers write programs, the first woodpecker to come along would destroy civilization.

      --
      When our name is on the back of your car, we're behind you all the way!
    85. Re:But does it work? by blueg3 · · Score: 1

      It's just "concentration", which is volume per unit volume (or mass per unit mass), not "concentration per unit volume".

    86. Re:But does it work? by getnate · · Score: 1

      You can't demand a lawyer until you are arrested. During the field test you are not under arrest. They use the field test to decide if they are going to arrest you or not. NEVER TAKE ANY FIELD TESTS. DONT PHYSICALLY WALK A LINE OR TAKE A FIELD BREATHALYZER! It will only be used as evidence against you later. If you get arrest afterwards you car will be impounded and you will be required to take the breathalyser at the police station. You can refuse that too but then there will be bad repercussions. You may lose your drivers license for awhile.

    87. Re:But does it work? by Anonymous Coward · · Score: 0

      I noticed that too. In other words, the code review might be even more flawed than the code itself. And there's really nothing in the report to support the assertion that the "Readings are Not Averaged Correctly", they just used a weighted average.

      On the other hand, at least the review was exposed to the light of day.

    88. Re:But does it work? by Grishnakh · · Score: 4, Interesting

      I disagree. Anything upon which guilt or innocence rests on needs to be held to a higher standard.

      For many other applications, especially non-government ones, if the code doesn't work well, then customers probably aren't going to buy it, and changes will be made. For instance, your example of fuel-injection code. If you don't do that correctly, you're going to have an engine that runs like crap and get poor economy. Cars that run poorly generally don't sell well. They might sell some, but as we see with GM and Chrysler, you have to do better than that to avoid bankruptcy.

      Saving your thesis paper? The code in TeX is probably some of the most bug-free code around. At least I hope you're using TeX and not something crappy like MS Word for a thesis. But even MS Word isn't that bad, since so many businesses rely on it and don't have problems with random data corruption to my knowledge.

      Timing stoplights is a good counterpoint to your example. In my experience, stop lights have horrible timing most places I go. It's almost like they're intentionally designed to make you stop at every single light, unless you drive at > 80mph on surface streets. Why is such poor performance accepted from our traffic lights? Because they're run by the government, and we the people don't have a choice. That's exactly the same as this breathalyzer crap: if you're accused, you don't get a choice about which breathalyzer they use on you. It's decided by the government (probably with help from bribes), and that's what they use, whether it works well or not.

    89. Re:But does it work? by rblancarte · · Score: 1

      Short answer yes.

      For whatever reason Schneier did a review on a case from 2 years ago. If you read that page you realize that this was analysis done in 2007. Since then the NJ Supreme Court ruled that this particular breathalyzer is accurate and can be trusted.

      http://www.njdwidefense.com/alcotest.htm

      --
      It is human nature to take shortcuts in thinking.
    90. Re:But does it work? by The+Moof · · Score: 5, Interesting

      Don't always assume the judge will, in fact, look at the evidence and arguments. In their eyes, it doesn't look good to overturn a DUI conviction. Period.

      Had a buddy of mine leave a night club and he got pulled over for supposedly making an illegal left turn. Blew over the state's .07 and got arrested per the usual.

      However, the judge didn't care that there was no reason to be pulled over (with photos of the left-turn sign) since the cop explicitly said it wasn't due to erratic driving, *only* the 'illegal' left turn. Examples must be made. DUI upheld.

      Hell, even I got pulled over once for simply driving at 2am, but my breathalyzer revealed a stunning 0.00% BAC. After chatting with the cop for a bit, turns out they were just looking for easy DUI targets, and I happened to be driving on the same road as them.

    91. Re:But does it work? by smallfries · · Score: 1

      Why would you need to measure it against another device? The actual ground truth is quite simple. Take a group of volunteers who have abstained from alcohol for a few days. Weight them. Then get them drunk and use the device. If you record their alcohol intake over time against the measurements seen then testing is easy.

      --
      Slashdot: where don knuth is an idiot because he cant grasp the awesome power of php
    92. Re:But does it work? by mea37 · · Score: 1

      There are any number of reasons why a breathalyzer might be better for field use than another test, yet that other test would serve as a perfectly good baseline for lab testing / calibration of the breathalyzer.

      For example, you can't take and analyze a urine sample road-side during a traffic stop. A breathalyzer doesn't involve drawing blood, or require a lab or a technician's time to analyze each reading.

      Those are the "pro"s. Proper testing would tell us whether there's a "con" to offset them -- that being a loss of accuracy.

    93. Re:But does it work? by blueg3 · · Score: 1

      There's no reason to assume that sensitivity. For one, the sensitivity is more likely determined by the sensitivity of the probe rather than some human limit. For another, once you're at n times the legal limit, higher values are completely unnecessary.

    94. Re:But does it work? by evanbd · · Score: 4, Informative

      If you have a noisy sensor and are trying to keep a low-noise estimate of the input, while that input is changing, you do some sort of filtering on the data. The weighted rolling average described above is nice for a number of reasons, mainly it's simple to implement and simple to analyze. In some cases, other filters are better.

      If you have a noisy sensor and want to measure a single unchanging input, you would want a different sort of filter. In this case, the simple arithmetic average works quite well.

      As you correctly observe, the two filters of similar complexity. Which one you use should depend on the sort of input you're trying to measure. In this case, they used the former type of filter on the latter type of data, which is a definite no-no. This will result in data that is far noisier than you would otherwise expect from the raw sensor noise and the number of samples taken. When that noise could be the difference between a DUI conviction and and the cop telling you to drive home carefully, I'd say that's worth worrying about.

    95. Re:But does it work? by BitZtream · · Score: 1

      The effects of a suspension of privledges for refusing a test are far different from a conviction for DUI for instance. DUI is a moving violation, refusal of a BAC check isn't, its unrelated to your driving record as far as points or insurance is concerned as it really has nothing to do with the 'driving' aspect itself.

      In most cases/states if you refuse a breathalyzer and lose your license for it, you can still get a permit that will allow you to work and you won't end up paying through the nose for insurance for the rest of your life or something close to that.

      Refusing a test and getting a suspension shows up as a suspension without any real reason when most people do a check of your criminal records or driving history, it could be a suspension for failing to pay your insurance premium, refusing the test, or failure to pay your taxes, depending on where you live. It simply looks much better on your record than actually being convicted of a DUI.

      The real solution is to simply not drive drunk. Stay home, call a cab, walk, whatever, doesn't matter, this is an easy problem to avoid.

      --
      Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
    96. Re:But does it work? by vux984 · · Score: 1

      What is there to compare the tests with?

      1) How about a calibrated sample of 'air' containing known quantities of alcohol? If the breathlyzer reports the same level of alchol that we put in the sample, we're good.

      2) How about taking simulteous breathlyzer and blood samples. If the breathlyzer reports the the same (within a given error tolerance) alochol level as the blood test, its good.

      That wasn't hard.

    97. Re:But does it work? by Chirs · · Score: 2, Informative

      A moving average is useful if you don't have a large enough data type to store the sum of all the values.

    98. Re:But does it work? by BitZtream · · Score: 1

      As a side note can we get back to reasonable, we need a right to drive you can not live a free life without being able to drive, removing that right should take a court order.

      Billions of people live free everyday without being able to drive. I love being an American and being able to drive my nice car rather than walking, but its just ridiculous to claim we 'neeed a right to drive', we need a law 'to get off your fat ass and walk a little' or a 'stop being such a spoiled whiney little bitch' law.

      Driving is not a right. It is not a requirement for life, anywhere. You can travel without a car just the same as you can travel without an aircraft, a tank or a boat. If you can't walk, you can't drive. You do not have or NEED a 'right' to drive. Whats next, you'll tell us the government shouldn't be allowed to license drivers and they should provide cars for everyone in the country?

      --
      Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
    99. Re:But does it work? by geekgirlandrea · · Score: 1

      So, they should have a range higher than 0.5% and have even worse quantization error at the low end? Lower than 0.5% and have distortion due to saturation? Why exactly are you defending this bullshit?

      Clearly, what they *should* do is pick an upper cutoff that's easy to achieve with the hardware they have and also large enough compared to the values encountered in practice to avoid distorting the measurements, and then carry enough bits of precision to cover the two decimal digits they give the readings in. This is going to be more than four.

    100. Re:But does it work? by Anonymous Coward · · Score: 0

      It's only a farce until a drunk driver runs down you or someone you love, douchebag.

    101. Re:But does it work? by Gerzel · · Score: 1

      Really for legal work code should be fairly well written to a good standard for just this reason.

      While we might lament at a judge being illiterate of computer matters, it still needs to be easy to read code so that the prosecution can prove that the code actually does what they say it does.

      Really when you think about it, or at least when I do, in a computer literate judicial system the requirement for well written code for these types of machines becomes greater as both prosecution and defense will look at the code in greater detail.

    102. Re:But does it work? by woot+account · · Score: 1

      Strange as it looks, "its" is the correct singular, gender-neutral, third person, possessive pronoun.

    103. Re:But does it work? by pnewhook · · Score: 1

      Yup. And a surefire way to start an argument is to put two or more programmers in a room and ask them how a coding project should be done.

      --
      Tesla was a genius. Edison however was a overrated hack who liked to torture puppies.
    104. Re:But does it work? by Anonymous Coward · · Score: 0

      ...For instance, your example of fuel-injection code. If you don't do that correctly, you're going to have an engine that runs like crap and get poor economy. Cars that run poorly generally don't sell well....

      Clearly you don't live in the U.S. (if you do, then you need to get your head out of your ass) GM and Chrysler putting out engines that run like crap and get poor economy are the smallest problems adding to the mess that is the auto industry today. What, you think Ford is doing just fine because they build engines that don't run like crap and get better fuel economy?

    105. Re:But does it work? by Anonymous Coward · · Score: 0

      This filter is nice because it doesn't require you to remember all the values that you want to average together

      You don't have to remember all the values anyway, so long as you are willing to accept a bit more round-off error:

          A := ((N-1)/N)*A + (1/N)*S

      where A is the running average and S is the N'th sample.

    106. Re:But does it work? by Hatta · · Score: 1

      Yeah I know it looked awkward. I was going for parallel construction with the parent post, probably should have included the parentheses.

      --
      Give me Classic Slashdot or give me death!
    107. Re:But does it work? by jonbryce · · Score: 1

      You would solve that problem by requiring people to blow in 100ml or whatever of air before it starts taking readings, or by measuring CO2 levels.

    108. Re:But does it work? by dave562 · · Score: 1

      A similar thing happened to my boss not too long ago. He was out on a weeknight and a couple of drinks at a restaurant. He has a car with headlights that automatically turn off when you take the key out of the ignition, so he always leaves them on. The valet turned them off before parking the car. He got into the car and didn't turn the headlights on. He got pulled over and the officer used the headlights being off as probable cause for the breathalyzer. He failed by a pretty small margin, and the police officer even said something to the effect of, "Even though you weren't driving erratically, the fact that your headlights were off are is sign that you might be drunk so I'm going to give you a breathalyzer now."

    109. Re:But does it work? by pnewhook · · Score: 1

      However, the judge didn't care that there was no reason to be pulled over (with photos of the left-turn sign) since the cop explicitly said it wasn't due to erratic driving, *only* the 'illegal' left turn. Examples must be made. DUI upheld.

      He blew over - he was guilty! Why would he even expect to be let off?

      --
      Tesla was a genius. Edison however was a overrated hack who liked to torture puppies.
    110. Re:But does it work? by Stormwatch · · Score: 3, Funny

      Oops, I moderated the wrong tag by accident.

      Browsing under the influence, I see.

    111. Re:But does it work? by TerranFury · · Score: 1

      You can save the memory and still do it correctly by just re-weighting the "running average".

      That is (if your readings are x(0), x(1), ...),

      a(k+1) = [a(k)*k + x(k)]/(k+1)

      a(0) = 0 .

      If you did this with C-style "'rounding'-by-truncation", however, your estimate would be systematically low because with this rounding scheme (x/y)*y <= x for any integers x,y. "Banker's rounding" (a.k.a. "round-to-even") is slower but avoids this bias.

    112. Re:But does it work? by jonbryce · · Score: 3, Informative

      In Britain, the breathalysers decide whether or not you get taken to the police station.

      When you arrive at the police station, they take a blood sample. They test half of it, and that decides whether or not you get convicted. You get the other half and can arrange for your own tests on it.

    113. Re:But does it work? by pnewhook · · Score: 1

      OR you can simply not drink before you drive, or if you do drink find alternate transportation home.

      If you don't commit a crime there cannot be any evidence against you. Unless of course you happen to be pulled over in redneck Texas.

      --
      Tesla was a genius. Edison however was a overrated hack who liked to torture puppies.
    114. Re:But does it work? by cayenne8 · · Score: 1, Troll
      "What I'm not sure is the role that breathalysers have in the conviction process. If the cop is an independent observer, then both he and the machine are likely to agree before a judge convicts. But if the cop is swayed by the readings, then there is no serious review of the machine's results. My guess is that the cop thinks you're guilty when he pulls you over, so the machine is just justifying his position after the fact, but I have no way of knowing if that is really the case."

      Talked to a lawyer about my state. If I were to get pulled over, and knew I was over the now ridiculously LOW limit of .08...the smart thing to do is not say a word. If the cop wants you out of the car, at that point he is taking you to jail no matter what, so I will not give him any evidence. I will refuse the field tests (nothing more than filming you stumbling as evidence), and put my hands out for the cuffs. I'll refuse to take any tests too. Here, that will result in loss of license for a year I think, but, you won't have a DWI on your record, and worse they can charge you with is usually wreckless driving. A good lawyer, and you get suspended license,but usually a permit that will allow you to drive to work, for food...etc.

      It would suck, but, at least no DWI on your record. Check with your state laws first...know what they do and what your rights are, but, the one thing that hold true...shut up, and lawyer up for anything he cops arrest you for, even if you are innocent.

      --
      Light travels faster than sound. This is why some people appear bright until you hear them speak.........
    115. Re:But does it work? by Timmmm · · Score: 2, Insightful

      You know you don't actually need to do that.

      average = (new_value-average)/++n + average;

      I think that should work.

    116. Re:But does it work? by Thinboy00 · · Score: 2, Informative

      This seems to make sense to me. The breathalizer is supposed to measure the blood alcohol content, and this is done by measuring the alcohol content in air expelled by the *lungs* (with a knowlege of partial pressures).

      Actually, it measures presence/absence of ketones in the air. Also, they have you blow "continuously" for several seconds (the mouth doesn't hold that much). Finally, .08 is considerably drunk, but it isn't you're-falling-over-how-could-you-possibly-think-you-could-drive drunk.

      --
      $ make available
    117. Re:But does it work? by Grishnakh · · Score: 2, Insightful

      You need to get your head out of your ass and learn to read. My point is that any car company putting out engines that run like crap and get poor economy (relative to their competition for the same vehicle type of course) will not last long. I did not say that GM and Chrysler are going down because of crappy engines. In fact, I'd say that every engine out there by any major manufacturer runs just fine these days; I don't think any of them have highly shoddy FI code.

      What I said there was that a car company has to do better than selling some [cars] to survive. I.e., you might be able to get a few morons to buy a car that runs like crap, but it's not going to be enough customers to keep the company afloat. Especially in today's economy, a company needs to do well in most aspects of its business in order to survive.

      But that doesn't apply to this breathalyzer company, because their customer is the government, and you don't have to even make a decent product when the government is your customer; you just have to secure a contact, maybe with a few bribes. It also helps a lot when the customer (law enforcement) doesn't care about how well your product works, as long as they can use it to make lots of money, even if it's fraudulent. This is the same situation we have with red-light and speed photo enforcement. If you get snapped by a speed camera, and you're sure you were under the speed limit, what are you going to do? Threaten to take your business away from Redflex? Your local police department or municipal government certainly doesn't care if the ticket was in error, because they're making money from you because of it. What are you going to do, vote them out? Good luck with that.

    118. Re:But does it work? by Thinboy00 · · Score: 1

      You can save the memory and still do it correctly by just re-weighting the "running average".

      This would be a valid design, however, if the variance of the hardware improved (decreased) as the samples came in, in which case the recent samples should get more weight. I doubt that this is the case, but it may have a reason behind it.

      Is that reason backed by law? IANAL.

      --
      $ make available
    119. Re:But does it work? by ckaminski · · Score: 1

      Not if you're instead doing

      (((A+B)/2)+c)/3 ... - / N

    120. Re:But does it work? by cayenne8 · · Score: 2, Interesting
      "Actually, it measures presence/absence of ketones in the air. Also, they have you blow "continuously" for several seconds (the mouth doesn't hold that much). Finally, .08 is considerably drunk, but it isn't you're-falling-over-how-could-you-possibly-think-you-could-drive drunk."

      Keytones!?!

      So, I wonder if you could make an argument against this evidence if you are on Atkins or some other form of low carb diet that puts you into a constant state of ketosis?

      And as for .08...that is NOT drunk, not for most people. The .1 was more fair, but, .08 can get a grown man on just a few glasses of wine with a meal depending on situation.

      It really should be more subjective somehow...I mean, you can have someone that is severely impared on 2 drinks, and another big fella that can have 4-6 beers in a short period and be perfectly fine. I guess they had to have a number somewhere, but, .08 is WAY too low.

      I really hope some of the attempts to break the feds power over the states by blackmailing them over funding can work here soon. It was the MADD groups that are really after NO drinking permitted that forced them to force all the states to raise the drinking age to 21...and lower the limit to .08.

      The feds should NOT have that power.

      --
      Light travels faster than sound. This is why some people appear bright until you hear them speak.........
    121. Re:But does it work? by Thinboy00 · · Score: 1, Insightful

      Strange as it looks, "his" is the correct singular, gender-neutral, third person possessive pronoun.

      Speak English, please (also removed a wrong comma -- it's not a serial comma because there was no "and", "or", or similar).

      --
      $ make available
    122. Re:But does it work? by Just+Some+Guy · · Score: 1

      In all 50 states, refusal to take a breathalyzer at the police station will result in a 1 year(minimum) suspension of your drivers license.

      I've heard that refusal to take the breathalyzer is a civil offense, while a DUI is a criminal offense, and the penalty for the latter is always greater than for the former. The consequent advice was to refuse a breathalyzer if you know you'd fail so that you only get the civil penalties.

      Not being in the habit of driving drunk, I haven't actually looked into it. Anyone know if there's any truth in that theory?

      --
      Dewey, what part of this looks like authorities should be involved?
    123. Re:But does it work? by cayenne8 · · Score: 1
      "For example, you can't take and analyze a urine sample road-side during a traffic stop. A breathalyzer doesn't involve drawing blood, or require a lab or a technician's time to analyze each reading."

      And in many states, unless you are involved in an accident, usually with serious injury to another party, you cannot be FORCED to take an invasive test like a blood test.

      --
      Light travels faster than sound. This is why some people appear bright until you hear them speak.........
    124. Re:But does it work? by Thinboy00 · · Score: 1

      Better yet, get two Real Programmers (i.e. gratuitous GOTO users) to work on the same code. They will shoot each other in the foot (feet?).

      --
      $ make available
    125. Re:But does it work? by Anonymous Coward · · Score: 0

      Disclaimer: I'm a cop.

      In my state, its not that simple. In order to take a breath test at the station on the Datamaster cdm, we need to have invoked implied consent. Implied consent requires a triggering event, which means you have to A) Be arrested for DUI, B) Refuse a road-side PBT, or C) Take a road-side PBT with a result of .08 or greater.

      The reality is that we are trained not to rely on PBTs at all, but rather to rely on field sobriety testing which has been scientifically proven to be 90+% accurate when conducted by experienced officers. The PBT / Datamaster test are simply tools to determine if any impairment observed during standard field sobriety tests was caused by alcohol or another factor.

      In my state, you can also request an independent blood test if and after you agree to take the test we request.

    126. Re:But does it work? by Just+Some+Guy · · Score: 1

      And equally important, to me: why is anyone actually defending this potential life-ruiner? Why don't the cops, prosecutors, and judges want to switch to another brand without the same tainted reputation? I would think that the goal of a prosecutor, in particular, is to get convictions and not advocate one specific brand of test equipment.

      --
      Dewey, what part of this looks like authorities should be involved?
    127. Re:But does it work? by Thinboy00 · · Score: 1

      What is there to compare the tests with?

      1) How about a calibrated sample of 'air' containing known quantities of ketones? If the breathlyzer reports the same level of alchol that we put in the sample, we're good.

      [snip]

      There, fixed that for you.

      --
      $ make available
    128. Re:But does it work? by decoy256 · · Score: 4, Insightful

      No, our system doesn't dispense "justice", which is why I'm a defense attorney.

    129. Re:But does it work? by 0100010001010011 · · Score: 4, Insightful

      The majority of crashes and deaths aren't caused by people that blow a 0.086. They're habitual offenders who blow .25s.

    130. Re:But does it work? by IDtheTarget · · Score: 1, Interesting

      Actually, research I read when I got my DUI in 2007...If I got pulled over again that same night, I would have driven home without a DUI and even if they did manage to get me to perform parking lot special olympics(also called the field sobriety test), I would have asked for a lawyer. Like most first time offenders, I took a plea deal to avoid significant jail time and paid the ridiculous fine and took alcohol awareness classes. The whole thing was a farce, intended to make money.

      I blew .086% and easily could have challenged the results in court, given the breathalyzer had a sticker on it that said it hadn't been calibrated in 2 years.

      People like you make me sick. I was an Emergency Medical Technician for two years, and got to see how people like you destroy the lives of innocent families doing nothing more offensive than driving home at night.

      You idiots go on and on about ways to beat the system, without for one second realizing that every time you drive while under the influence, you risk the lives of others.

      If it was up to me, DUI would be classified as "attempted murder", since you KNEW before you left the house that you were going to go drinking, and you KNEW that you had the obligation to make other arrangements for getting home. You DECIDED to risk the lives of the rest of us because you couldn't be BOTHERED to make arrangements for a taxi or a designated driver.

      If I ever go into politics, I'll pass a law that requires you to give up your keys before you're served a single drink, and that requires you to pass a breathalyzer before you are given your keys back. And if you end up murdering somebody anyway, then the bartender/bar owner becomes an accomplice when you are tried.

      Disagree with me? Then try responding at 2am to a scene where a drunk driver kills a family of four, including a 3-month-old child, and the drunk only needs an over-night observation at the ER. THEN you can tell me how I'm over-reacting.

    131. Re:But does it work? by Anonymous Coward · · Score: 1, Informative

      He blew over - he was guilty! Why would he even expect to be let off?

      Because the initial traffic stop was illegal. The police are not entitled to pull over anyone they like whenever they want - the police need probable cause.

      Under the "poison tree" doctrine http://en.wikipedia.org/wiki/Fruit_of_the_poisonous_tree evidence gathered by the police behaving illegally is thrown out of court.

    132. Re:But does it work? by osu-neko · · Score: 1

      BTW: This isn't necessarily wrong. Assuming all the measurements are in the same basic range, does this really matter?

      If all the measurements are in the same basic range, you don't need to average at all, or maybe only average one or two. If they're bothering to take a running average a substantial number of times, then one of two things is true, (a) they don't need to, so the software is misdesigned to take a running average of 20 readings when it only needs two, or (b) they do need to, so the software is misdesigned to take what's effectively the average of the last couple readings while pretending to average 20. Either way, the software is flawed.

      Having worked on field sensors before, I'm suspecting they need to due to a certainly level of noise in the data from the sensor. I've seen this a lot on cheap ADC (analog to digital converter) chips used for mass-produced sensors. You could use a more expensive ADC, but you get the same result by just using the noisy ADC and averaging a number of readings. However, if they were using the averaging method described in the article, the results are basically trash. The result will be thrown off too much by the noise in the last one or two readings.

      Without testing the hardware in this case I can't say for sure, but I know from the devices I've worked with, this would *definitely* produce screwy, invalid results.

      --
      "Convictions are more dangerous enemies of truth than lies."
    133. Re:But does it work? by Anonymous Coward · · Score: 0

      Why would a correct average require you to remember all the values you want to average together?

      The straightforward way to compute the average is to store the accumulated sum of your samples taken so far and the actual number of samples taken so far, then the correct average is known to be the (sum / the number of samples) after any arbitrary number of samples, and only storing 2 values.

      If I had to place a wager as to why they use an exponential weighted average system instead it isn't because the programmer was really bad at math, it's probably because the microprocessor they were using didn't have a floating point instruction set and they were using integer fixed point math with limited precision relative to the precision required to store each sample. Someone somewhere probably said (new sample + old sample) >> 1 is good enough, fuck it.

    134. Re:But does it work? by blueg3 · · Score: 1

      I'm saying it's entirely reasonable to have a limit lower than 0.5% and distortion due to saturation. The function of device is to determine if an arrest is warranted. The legal limit is in the vicinity of 0.08%. Distinctions in values above 0.2% or so aren't meaningful.

      If you'll note, I'm not defending anything. I'm just pointing out that your choice of limit is completely arbitrary. It's unreasonable to assume that limit and then make claims about a final sensitivity.

    135. Re:But does it work? by gd2shoe · · Score: 1

      To him the problem is two-fold. First (and less important), he cannot "win" this case that way. Two, it opens the court to a flood of appeals, and not just DUI either. There may have been vehicular manslaughter cases that need to be revisited (in many states, an accident involving death is an automatic manslaughter if a driver is found to be drunk, regardless of his behavior while driving). Prosecutors hate appeals. I would too if I were a lawyer and a prosecutor.

      This isn't to say that your point isn't a good one. Sometimes it's just hard for people to see the forest through the trees.

      --
      I won't join Slashcott. OTOH, If Beta goes live, I just won't be back until it's fixed. Sorry Dice.
    136. Re:But does it work? by DeadCatX2 · · Score: 1

      The keyword is moving average. Let's say your filter averages 8 consecutive samples together. The first 8 samples arrive and you're adding them together with the total. What happens when the 9th sample comes in? You need to delete the first sample, which is difficult if you don't store that value in an array.

      An anonymous poster brought up this equation...

      A := ((N-1)/N)*A + (1/N)*S

      where A is the running average and S is the N'th sample. There are concerns about precision and round-off error that will build up over a long period of time. So, for instance, the first few people might be less likely to be "over the limit", while the last few will be more likely.

      Also, doing a division in an embedded system like that is not exactly easy or fast. You could pre-compute fixed-point representations of (N-1)/N and (1/N), but that does nothing to address the numerical stability of that implementation.

      --
      :(){ :|:& };:
    137. Re:But does it work? by aaaantoine · · Score: 1

      Actually, research I read when I got my DUI in 2007 seemed to indicate the release of alcohol vapors into the air by the lungs can vary widely between persons, by as much as 20%.

      ...

      I don't know about 49 of the states, but in Washington state, if you want something more accurate than a breathalyzer, you have to demand the police take you to the hospital to have blood drawn at your own expense. They are required by law to comply, but 99% of DUI suspects know nothing of their rights.

      We have these little portable devices that can check a person's blood sugar. Why don't the police have blood sensors that can check blood alcohol content... via blood, instead of breath?

    138. Re:But does it work? by Anonymous Coward · · Score: 0

      Congratulations on buying into the "us vs them" argument. The last bar I was into, I successfully blew a BAC that indicated I should be dead after two beers. I weigh about 200 lbs--it just wasn't possible. The machines aren't reliable--period. They aren't supposed to protect "people like you"

      If you want people responsible for their own actions--throw them in jail when they hurt somebody regardless of how or why they hurt them. BAC is not a measure of inebriation because it is not a measure of alcohol content in the blood. Most of the alcohol awareness classes constitute thinly veiled state sponsorship of religion.

      I realize the old saying says never assume maliciousness when incompetence would explain it--but a lot of the laws places like MADD lobby for really can only be explained by willful incompetence. The statistics demonstrate that tired drivers, or drivers that have woken up less than an hour ago are every bit as dangerous as people with a BAC well over the legal limit--but we see no laws against it. Care to explain why?

      They could never get the law passed. This isn't about safety--it's about the illusion of safety, generating revenue and think of the children. If you claim otherwise--you're lying--and deep down, you know it.

    139. Re:But does it work? by arootbeer · · Score: 1
      What's wrong with using a normal average? If for some reason you're memory-constrained, you still only have to store 2 values, disregarding history:

      y(0) = 0
      y(n) = (y(n-1) * ((n - 1) / n)) + x(n) / n

    140. Re:But does it work? by DeadCatX2 · · Score: 1

      As mentioned elsewhere, a correct moving average requires you to remember the values, or to engage in hacks that fake a moving average at the expense of precision. I don't see why they were using a moving average in the first place, because they're probably not interested in the sensor's output for the vast majority of the time.

      You don't need floating point to handle this kind of computation. You could precompute the reciprocal of your filter size in fixed-point format and multiply that by the sum if you wanted.

      I don't understand why they didn't just specify a filter size that is a power of 2, so they could use right-shifts to do the division. You wouldn't even need any fixed-point math at all. Read 2^n samples, sum them, right-shift by n, done. No moving average, no divisions, not even any multiplies.

      --
      :(){ :|:& };:
    141. Re:But does it work? by natedubbya · · Score: 1

      Averaging is obviously a problem, but the standard number of tests a DUI requires is two. The police take two tests of your breath, and use the resulting number. Done. Hence this averaging error really isn't that serious...

      But regardless, what the article doesn't say is that the machines have internal tests on a *known BAC sample* and verify with themselves that they are reading the known number. If the incorrect reading ever comes back, the machine refuses to function. This test is run automatically before every single test on a suspect, it's automatic. So regardless of how crappy the code is, it's kind of a black-box-magic that gets verified, and so you can be confident that the thing works.

      Complain about some stupid while loops and if statements, but if it works, it works. No?

    142. Re:But does it work? by DeadCatX2 · · Score: 1

      Nothing in particular is wrong with a "normal" average. The question is, did they want this to be a moving average in order to smooth a stream of data, or did they really intend on using a simple average to de-noise a single point in time?

      Also, that implementation will require divisions or hacks to get around divisions (as if multiplies aren't hard enough), and even after that it will still suffer from numerical instability after a long period of time due arithmetic precision or the lack thereof.

      --
      :(){ :|:& };:
    143. Re:But does it work? by Anonymous Coward · · Score: 0

      if you were being particularly paranoid, it would be easy to think the police were using this model because it was the most effective revenue raiser.
      Personally, i think they should take into account the size of your car in determining the correct blood alcohol limit, if your driving a Fiat 500, 500ml of Vodka is an acceptable amount of alcohol to drink, even if you cause an accident your unlikely to do any damage in one of those...

    144. Re:But does it work? by bugs2squash · · Score: 1

      I wonder if they did pee or bleed on the breath-machine to test it.

      --
      Nullius in verba
    145. Re:But does it work? by BobMcD · · Score: 1

      Many things that are not required to live your life are, in fact rights:

      Equality.

      Religion.

      Speech.

      I could keep you in a box, toss in table scraps from time to time, and you'd stay ALIVE.

      You deserve more than that, you say?

      We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain unalienable Rights, that among these are Life, Liberty and the pursuit of Happiness.

      To me, that reads, 'drive a car', within the context of America in 2009.

    146. Re:But does it work? by Anonymous Coward · · Score: 0

      Frakkin' machines!

    147. Re:But does it work? by mzs · · Score: 1

      What about the large portion of the population that have 'minor constriction' indications if they take a spirometer test, does the breathalyser flag the reading as potentially invalid? About one in five adults have a minor constriction.

    148. Re:But does it work? by LackThereof · · Score: 1

      one should always refuse a breathalyzer test even if you haven't been drinking

      It's already been said in this thread, but I'll say it again for emphasis.

      In most American states, refusing a field sobriety test (electronic or otherwise) results in the immediate suspension of your license. Do not pass go, do not collect 200 dollars. You can't appeal and have your license reinstated, the act of refusing the test is enough to revoke your license.

      It's far better to take the test and risk blowing >0.08%, and then immediately laywer up.

      To be fair, most officers don't use the breathalyser as their first filtering method to investigate suspected DUIs. Typically officers rely on the horizontal gaze nystagmus test, which is a far more accurate method of measuring intoxication levels around the legal maximum. However, that test generates no evidence which you can present in court, other than the sworn testimony of the officer who administered it. So once a DUI suspect has failed the HGN test, the officer will administer a breathalyser, so they have something to submit as evidence.

      --
      Legalize recreational marijuana. Seriously.
    149. Re:But does it work? by Intron · · Score: 1

      A := ((N-1)/N)*A + (1/N)*S

      can be rewritten like this to avoid floating point "noise"

      DELTA := (( S - A) / N)
      A := A + DELTA

      Another problem is when there is small variation around a large offset.
      Then you have to calculate the average difference from the offset and add
      it back at the end.

      --
      Intron: the portion of DNA which expresses nothing useful.
    150. Re:But does it work? by brainiac+ghost1991 · · Score: 3, Interesting

      but why were you driving while over the limit anyway. Driving a car is dangerous, not just for you, but for those around you, by being under the influance of alcohol you are risking killing someone. Why take the risk? if you need to drive don't drink any alcohol.

    151. Re:But does it work? by lannocc · · Score: 1

      In Montana, the automatic suspension for refusal is 6 months, not a year.

    152. Re:But does it work? by cyphercell · · Score: 1

      You're an idiot. Blood alcohol is blood alcohol. The big guy can drink a little more than the little woman. Just not as much as you'd like.

      --
      Under the influence of Post-Cyberpunk Gonzo Journalism
    153. Re:But does it work? by mr_stinky_britches · · Score: 1
      Wouldn't the word "their" have been an equally qualified option?

      Show me a programmer creating "perfectly engineered code", and I'll show you a programmer building up their resume.

      The above looks okay to me, but I'm not an English major.

      --
      Censorship is obscene. Patriotism is bigotry. Faith is a vice. Slashdot 2.0 sucks.
    154. Re:But does it work? by Joe+U · · Score: 1

      I think they're intended to protect people like me from getting killed by people like you.

      When you use terms like "people like you" it makes it sound like you don't want people to take responsibility for their own actions and instead come up with policies, procedures and laws that don't actually help the public, but instead generate revenue and make you 'feel good'.

    155. Re:But does it work? by LanMan04 · · Score: 1

      .08% is ridiculously low. Double that any maybe you're starting to get impaired.

      --
      With the first link, the chain is forged.
    156. Re:But does it work? by sexconker · · Score: 1

      The comma is correct. Many people consider it optional (I do not). In a comma-delimited list, and is implied.

      "Its" is correct. "His" states a gender, when I was referring to all programmers.

    157. Re:But does it work? by jeff4747 · · Score: 1

      And in many states, unless you are involved in an accident, usually with serious injury to another party, you cannot be FORCED to take an invasive test like a blood test.

      In all the states I've lived in, you consent to a some form of blood alcohol test when you get a license. You are free to choose whether it's blood, breath or urine.

      Refusing to take the test results in it's own penalties.

      Given the time required to get you to a technician to draw the blood, you're probably best off demanding a blood test. It's more accurate than the other 2 methods anyway.

    158. Re:But does it work? by sexconker · · Score: 1

      "Their" is plural.
      "A programmer" is singular.

      "His" would limit the scope to male programmers.
      "Her" would limit the scope to female programmers.
      "His/her" or other such bullshit is retarded.
      "Its" is correct.

    159. Re:But does it work? by Anonymous Coward · · Score: 0

      "Then it became you couldn't even be in the driver's seat with the car off while drunk?"

      First I thought you were exaggerating, but I did a quick search and found:

      http://www.dui.com/dui-library/connecticut/news/guilty-of-dui-while-in-parked-car

      Any officers care to comment what to do in this case? Say you come out of the club/bar, notice you're a bit buzzed and decide to rest it off a bit. Can you safely sit in the passenger side of your car and just put the keys in the glovebox or center console (or trunk)?

    160. Re:But does it work? by DeadCatX2 · · Score: 1

      What if you aren't using floats, and you're using fixed point instead? The problem there is more of a precision problem than round-off. Like, for instance, a filter size of 3, whose reciprocal isn't neatly represented in fixed-point notation.

      What all of the replies to my statement point out is that there is no such thing as an easy way to average something. There is ALWAYS a gotcha - what instructions you have available on your target architecture, how much data you're averaging, what kind of response you want from the filter, your arithmetic precision, etc. No one averaging method will work for everything.

      --
      :(){ :|:& };:
    161. Re:But does it work? by sexconker · · Score: 1

      Today's woot off sucks.

    162. Re:But does it work? by Toonol · · Score: 2, Insightful

      That may or may not be a flaw. It certainly isn't a true average, but an average isn't the only legitimate way to combine successive data values.

      That said, I'm not sure why a rolling average like this would be used for this purpose. Is there a medically sound, scientifically reviewed 'proper' procedure to measure alcohol in breath? I have a fear that this was just thrown together by some programmers.

    163. Re:But does it work? by woot+account · · Score: 1

      Strange as it looks, "his" is the correct singular, sexist, third person, possessive pronoun.

      Speak English, please (also removed a wrong comma -- it's not a serial comma because there was no "and", "or", or similar).

      Fixed your wording and added back in a comma that belongs there. All of those words are describing the word "pronoun," thus they all belong.

    164. Re:But does it work? by fast+turtle · · Score: 1

      Since this is a medical testing device, it must be regulated by the USFDA and meet the minimum requirements for testing accuracy, reliability and consistency, otherwise any conviction based upon the findings of such a device are invalid.

      Just thing about a conviction based upon a unit that provides a positive reading, even when you haven't been drinking. What kind of result would that be? Blood in the water for the legal sharks wouldn't it.

      --
      Mod me up/Mod me down: I wont frown as I've no crown
    165. Re:But does it work? by WCguru42 · · Score: 1

      Strange as it looks, "one's" is the correct singular, gender-neutral, third person possessive pronoun.

      Speak English, please (also removed a wrong comma -- it's not a serial comma because there was no "and", "or", or similar).

      His is a decidedly masculine pronoun. One is the correct gender neutral pronoun, though it is fairly antiquated.

      --
      "Educate the mind but never at the expense of the soul."~Blessed Basil Moreau
    166. Re:But does it work? by drsmithy · · Score: 3, Insightful

      If I were to get pulled over, and knew I was over the now ridiculously LOW limit of .08...

      That's not a "ridiculously LOW" limit. Indeed, for most of the world it's _over_ the limit.

    167. Re:But does it work? by WCguru42 · · Score: 1

      Worst thing with stoplights is they break, there is always a human driver who can figure out if all the lights are on red or green and call the police to manage traffic.

      Are you really that oblivious when you drive. THE worst thing that could happen with stoplights is if they were all turned green. Most people see a green light and go. You wouldn't have to wait for someone to call the police because they noticed the lights were all green because they'd be there because of the multi-car pileup. Now, if all the lights just went dark, then you'd only have a minor problem on your hand of fewer people flying through no-signal traffic lights. If they all went red you'd just have annoyed people but probably no high speed crashes.

      As for the credit card reader, say it consistently overcharged by $5. Say you shop at the local grocery store multiple times a week. You might not be able to pick out that $5 surcharge on your bills but it would definitely add up.

      --
      "Educate the mind but never at the expense of the soul."~Blessed Basil Moreau
    168. Re:But does it work? by owlstead · · Score: 1

      Yes, but why wouldn't you? It's not like a maximum of 32 test results cannot be saved even if they would be using an "atari" processor. Maybe you need the results for evidence or to do different statistics on them.

      Keeping just one number is a nice optimization. But in the end it is probably one that's not needed anyway.

    169. Re:But does it work? by soupforare · · Score: 1

      ...we need a law 'to get off your fat ass and walk a little' or a 'stop being such a spoiled whiney little bitch' law.

      I'm about fourty minute's walk away from the general store. I don't mind the walking but the fact that I have to do it on a highway with no sidewalks is a bit frightening sometimes.
      This is in Massachusetts not Montana, god help the folks out in the deep nothing.

      Maybe you can live free with a car. Up here hitching has been illegal for a long time and unless you live and work in downtown Boston there isn't any metro. Not having access to a vehicle in the states is an extreme handicap, the country is much too big and everything is spaced out far too much. Local shops don't exist and local jobs aren't far behind.

      --
      --- Do you believe in the day?
    170. Re:But does it work? by WCguru42 · · Score: 1

      Cause of habit doesn't make up for the fact that he forgot to turn his headlights on. Maybe if he was completely sober he would've noticed right away.

      This all depends on what time of night it was. If it was at the point where headlights aren't absolutely necessary then that sucks for him. But if it was at the point where lights need to be on then maybe he should've checked first.

      --
      "Educate the mind but never at the expense of the soul."~Blessed Basil Moreau
    171. Re:But does it work? by Anonymous Coward · · Score: 0

      Creating a larger data type is not hard. Creating a data type that can hold values up to (32 * MAX_VALUE) and supports addition and division by a constant (the constant being DEFAULT_NUMBER_OF_SAMPLES_TAKEN) should be very very easy for a decent programmer.

    172. Re:But does it work? by WCguru42 · · Score: 1

      Yes, but in WA you can be convicted under DUI with 0% BAC.

      The "influence" does not have to be alcohol, nor an identifiable chemical intoxicant.

      Driving erratically is evidence enough of being "influenced".

      I believe that every state has this law. It's sometimes called reckless driving, reckless endangerment, attempted use of a deadly weapon...

      --
      "Educate the mind but never at the expense of the soul."~Blessed Basil Moreau
    173. Re:But does it work? by WCguru42 · · Score: 1

      some (e.g. UK) use breath alcohol content instead

      Well, that's rather silly. There are many reasons your breath might reek of alcohol while the rest of your body is completely free. But seriously, what matters is BAC, not AAC (Air Alcohol Content, not the file format).

      --
      "Educate the mind but never at the expense of the soul."~Blessed Basil Moreau
    174. Re:But does it work? by noidentity · · Score: 1

      There is no possible way they can derive a credible estimate with a precision of 0.001% or even 0.01%.

      Do they really claim to give an accuracy of one part in 100000 or 10000?

    175. Re:But does it work? by pnewhook · · Score: 1

      The police are not entitled to pull over anyone they like whenever they want - the police need probable cause.

      If that were true then ride programs where they pull everyone over would be illegal which they are not. They do however need probably cause to search you.

      evidence gathered by the police behaving illegally is thrown out of court.

      Except for: The doctrine is subject to three main exceptions. The tainted evidence is admissible if (1) it was discovered in part as a result of an independent, untainted source; (2) it would inevitably have been discovered despite the tainted source; or (3) the chain of causation between the illegal action and the tainted evidence is too attenuated.

      I'd say the second applies in your friends case since he was drunk.

      --
      Tesla was a genius. Edison however was a overrated hack who liked to torture puppies.
    176. Re:But does it work? by godglike · · Score: 1

      A simple demonstration of their incorrect averaging should suffice to get the evidence dismissed.

      1,2,3,4,5,6,7,8 averages to 4.5
      using the scheme descibed by Schneier results in 7.0078125. Egregious is the only word that can describe that error.

      2 minutes in Excel shows the correct value plus the cumulative error developing in the incorrect scheme:
      1.5, 2.25, 3.125, 4.0625, 5.03125, 6.015625, 7.0078125.

      That demonstration will show that little or no thought went into algorithm design and testing and that the machines are effectively random number generators and useless for evidence gathering.

      Trying it with 7 ones and a 9 (average is 2) produces between 5 and 1.0625 depending on the position of the 9. So two drinks becomes 5, 4, 3, or 1 because 1/2 the alcohol arrived in a spike.

    177. Re:But does it work? by WCguru42 · · Score: 1

      As a side note can we get back to reasonable, we need a right to drive you can not live a free life without being able to drive, removing that right should take a court order.

      I beg to differ. Plenty of people get by with no cars. Instead, they use public transportation. Your argument would be more convincing if it was that people had the right to transportation. If you decide to place others in unnecessary danger then you shouldn't have the privilege to drive. Same goes with guns, if you unjustifiably shoot someone you should lose that second amendment right, because you've shown yourself to be a complete ass.

      But you make a great point at the beginning of your post. The government should not have the right to declare an inherently inaccurate test correct. The law would benefit from requiring actual blood tests to validate BAC. A breathalyzer can be used to determine whether or not someone should be tested for being intoxicated but it really shouldn't be admissible in court. I'm not too up on my human biology, but, if there's similar error in urine samples (I have no idea how consistently they measure BAC) then they should also be tossed out.

      --
      "Educate the mind but never at the expense of the soul."~Blessed Basil Moreau
    178. Re:But does it work? by Anonymous Coward · · Score: 0

      Like most first time offenders, I took a plea deal to avoid significant jail time and paid the ridiculous fine and took alcohol awareness classes. The whole thing was a farce, intended to make money.

      When you use words like "farce" and "ridiculous," it makes it sound like you don't want to take responsibility for your own actions. I don't think DUI laws are "a farce, intended to make money." I think they're intended to protect people like me from getting killed by people like you.

      He said the fine was ridiculous and the class was a farce. Neither of those prevents him from killing you, however they do generate money for the state.

      If he said, "They ridiculously took away my license, and impounded my car forever, which was a farce." I'd be inclined to agree with your comment about not wanting to take responsibility. Anyone who's taken a traffic class of any kind can agree that they are a farce designed to annoy moreso than form good habits.

      How you got modded up as insightful, I'm baffled.

    179. Re:But does it work? by WCguru42 · · Score: 1

      Well the problem with calculating the averages should honestly be enough to get this tossed.

      That hinges on the averaging method being an incorrect method. Maybe there is some justifiable reason (biological, physical, etc) to weigh the later measurements more significantly. That is what needs to be determined (and I'll let someone else do that).

      --
      "Educate the mind but never at the expense of the soul."~Blessed Basil Moreau
    180. Re:But does it work? by amirulbahr · · Score: 1

      If the code works, and you can show empirically that the code works, that is proven beyond a reasonable doubt it my opinion. Not beyond any doubt, but that isn't the standard that our justice system is based upon.

      If you could test the code against all possible inputs then you would have no need to write the code in the first place as a solution would already exist. This applies to all types of software.

    181. Re:But does it work? by Anonymous Coward · · Score: 0

      I would hope that any programmer would know that code which runs an X-Ray Machine needs to be particularly well examined and designed.

    182. Re:But does it work? by cc_pirate · · Score: 1

      Maybe so, but 0.08 can be gotten with just two beers which means to me that 0.08 is an idiotic limit to set the law it. What was wrong with 0.1 other than MADD wasn't able to push for even more temperance laws?

      --

      "There are laws that enslave men, and laws that set them free. " - Sean Connery as King Arthur

    183. Re:But does it work? by mgblst · · Score: 1

      You would hope that testing would include putting in mangled data, seeing what the machine does.

    184. Re:But does it work? by Skater · · Score: 2, Informative

      Wasn't there an X-ray machine with a coding error that caused people to get many times the dose they should've? Yep, here it is.

    185. Re:But does it work? by B1ackDragon · · Score: 1

      Something similar happened to me in high school. Coming home after a party (WITH a d.d.) we got pulled over for "not dimming our lights" behind the cop in front of us (read: being a bunch of kids in a car at 11pm), and the three of us not driving got taken to the police station and our parents called.

      The other two were over 17, so they went before a judge and got MIPs. I was only 16 at the time, so I had to visit the juvenile prosecutor guy. He let me off the hook, noting that it's not actually illegal to have your brights on behind another car, and the cop should not have pulled us over. (I bet the fact that we all only blew ~0.04 had something to do with it too.)

      --
      The snow doesn't give a soft white damn whom it touches. -- ee cummings
    186. Re:But does it work? by Bourbonium · · Score: 1

      DUI laws and their enforcement are important, but the original post makes a valid point. There is a lot of money to be made from DUI arrests (a first offense can cost the driver as much as $10,000 in fines and penalties alone, in addition to drivers license suspension and increased insurance premiums). Local governments (city/county) make a shitload of money this way, so there is every incentive to lower the BAC limit even more, or "tweak" the code of a breathalyzer to ensure a high test result as often as possible, rounding up a result before generating the output rather than displaying the true result.

      Like simple possession of marijuana, these DUI cases are the "low-hanging fruit" that police love to harvest. It's a hell of a lot easier (not to mention safer) to spend your hours on patrol arresting drunks and stoners than risking your life chasing down dangerous rapists, thugs and murderers. Violent career criminals tend to not have jobs or steady income, so they don't even generate much revenue for your particular jurisdiction when arrested; they only cost the taxpayers more money to incarcerate. DUI cases are much easier to prosecute because the defendents almost always plead guilty or no contest, pay their fines, and go back to work to pay their taxes. Gangstas, rapists and murderers rarely ever pay the state back, and only cost the government more money to imprison, so we're all better off just letting them back on the streets.

    187. Re:But does it work? by dave562 · · Score: 1

      I've been completely sober and not turned my headlights on, and because of the light pollution in the area I was in, driven for miles before realizing they weren't on. I agree that he should have been sober and not driving "over the legal limit". I seriously question whether or not having your headlights off is really probable cause for a breathalyzer. If I were a lawyer, I'd fight the charge on those grounds.

    188. Re:But does it work? by mysidia · · Score: 1

      The authors of the code were so skilled they wrote code that analysts didn't understand, and couldn't determine if it worked or not; therefore, analysts just spouted detractions about its complexity, hoping not to be asked "but does it work?"....

    189. Re:But does it work? by bcrowell · · Score: 2, Insightful

      a first offense can cost the driver as much as $10,000 in fines and penalties alone

      A drunk driver could kill me. I don't think $10,000 is excessive as a deterrent. My life is worth a lot more to me than $10,000.

    190. Re:But does it work? by Anonymous Coward · · Score: 0

      if the means used to convict cannot be PROVEN to be accurate then NONE of the convictions have been earned.

    191. Re:But does it work? by Anonymous Coward · · Score: 0

      Please don't go into politics. Self-righteous assholes like you make me sick, and our government at all levels is already over-populated with them. Prohibition never worked and all your laws haven't done squat to make the problem go away. Passing more laws, making any level of alcohol consumption the moral equivalent of "attempted murder" makes about as much sense as passing a law making drinking the moral equivalent of "attempted suicide."

      You have delusions of grandeur and would be happy to force everyone you know to behave as you feel they must to live in your fantasy world. Wake up, jerk. You're dreaming.

      Get over yourself.

    192. Re:But does it work? by Bourbonium · · Score: 1

      You're right. $10,000 is not a deterrent. People still drive drunk. The money it costs them doesn't change their behavior at all. The AA meetings and alcohol awareness classes don't change more than 10% of the people ordered into these programs. 90% of them will drink again. 50% of those will drive drunk again. A drunk driver can still kill you, no matter how much money he or she has already paid to the government as a consequence of behavior. That's why the police and the courts love DUI cases, the more the better. Multiple offenders pay even more money into the general fund.

      But your insurance company probably doesn't value your life nearly as much as you do. $10,000 is probably all they'll pay out if you end up in the morgue after an accident, unless you have a very generous policy.

    193. Re:But does it work? by Anonymous Coward · · Score: 0

      Eh? My understanding here in California is that you can demand a blood test at the station.

      Of course, if you actually have been drinking a fair amount, you may still have alcohol in your stomach, so you'd be better off taking the inaccurate roadside test.

    194. Re:But does it work? by JackieBrown · · Score: 2, Insightful

      It really should be more subjective somehow...I mean, you can have someone that is severely impared on 2 drinks, and another big fella that can have 4-6 beers in a short period and be perfectly fine.

      As much as .08 sucks, I'd rather have that than a cop "subjectively" deciding if I am drunk.

    195. Re:But does it work? by retchdog · · Score: 1

      Uh, I don't think there are laws about "how to take an average". In some cases, there are NIST or ANSI standards, but they can't cover every possible scenario. It would be impossible to cover all cases. There are laws about incompetence and negligence and it'll be a mess to see if they cover this. Hence the esteemed and virtuous class of lawyers to apply the principles of justice and truth to ... ugh... I'm going to vomit.

      --
      "They were pure niggers." – Noam Chomsky
    196. Re:But does it work? by dryeo · · Score: 1

      Who takes the blood sample? In Canada they can only (easily) get a search warrant for a blood sample if you are in an accident and unconscious. They still have to come up with a doctor or medical technician to remove the blood. And yes they have to take 2 samples so you can get one and get it independently tested.
      Generally the road side breathalyzers are just so they can take you to the station for the "good" breathalyzer or usually they give you a 24 hr roadside suspension which doesn't involve court etc unless you are really drunk.

      --
      https://en.wikipedia.org/wiki/Inverted_totalitarianism
    197. Re:But does it work? by tiananmen+tank+man · · Score: 1

      It would make sense if the comments parralled the code, but the comments say the average, not a wieghted average.

    198. Re:But does it work? by Anonymous Coward · · Score: 0

      I doubt the correct approach to get a reasonable blood alcohol level involves a simple one time average of many samples over time. More likely they need to do some kind of histogram analysis.

    199. Re:But does it work? by ctmurray · · Score: 1

      Good comments here. The instruments need to prove a level of accuracy, and then prove they have been calibrated. Where I work we calibrate all the instruments. If an instrument falls out of spec (detected during calibration check) we have to go back to any data that was generated from the instrument and see if the error would change our analysis. The instrument has to be brought back to spec, and the frequency of calibration increases.

    200. Re:But does it work? by DarkOx · · Score: 1

      I suppose the justifiability of all that would depend on which is more correlative with BAC, the body of the breath or squeezed bit of residual air at the end of it. In fairness it might be the latter, I have no idea.

      --
      Repeal the 17th Amendment TODAY! Also Please Read http://www.gnu.org/philosophy/right-to-read.html
    201. Re:But does it work? by digitalunity · · Score: 1

      Have you stopped to consider for a moment that I was probably under the legal limit? I drank 1 beer in 1 hour and another 2 beers in 1 hour. That's 3 drinks in 2 hours, more than what I should have had. But given your medical training, does .086 sound reasonable for that limited number of drinks for a 180 pound male? Everyone I've talked to suggests not.

      I didn't feel the slightest bit impaired when I was pulled over and was quite confident I would pass the PBT. Contrast that with the multiple repeat DUI offenders I met in my alcohol awareness class.

      Not sure about other states, but in Washington if you get a DUI you have to go to a victims panel where victims of DUI crashes get the opportunity to speak. It's very sad as any traffic fatality is tragic.

      You can take your self righteousness and shove it up your ass. You don't know me.

      --
      You can't legislate goodness. Let each to his own destiny, by will of his freely made choices.
    202. Re:But does it work? by digitalunity · · Score: 1

      Yeah no shit. I took the field sobriety test and the patrolmen lied. He wrote on the form for the one leg stand that I both 1) had my hands in my pockets because it was so cold and 2) used my arms to balance myself. Doesn't make a bit of sense to me.

      For the horizontal gaze test, I stared at the stupid light for about 45 seconds at which point I took my eyes off the light and looked at him and asked "Are we done yet?." This was obviously not the right thing for me to do, but the standard for that test specifies a maximum of 20 seconds duration. Anything longer and you're reaching for a conclusion that isn't apparent-i.e. if you don't know in 20 seconds, the result is negative.

      I walked a perfectly straight line, even the patrolmen agreed. However, I did not pivot on the correct foot as shown(in a dark parking lot).

      In a civil action, I lost my license for 90 days as the state failed to see any insufficiencies in this evidence.

      --
      You can't legislate goodness. Let each to his own destiny, by will of his freely made choices.
    203. Re:But does it work? by cayenne8 · · Score: 1
      You gotta get yourself and your bike home somehow.

      If you don't want people to drink and drive at all...why do you have public bars that serve alcohol to people?

      You drive by and see all those cars parked outside a bar? You seriously think 99% of those people driving homw aren't over the 'legal' limit?

      Be realistic....

      --
      Light travels faster than sound. This is why some people appear bright until you hear them speak.........
    204. Re:But does it work? by The+Warlock · · Score: 1

      You may need to revisit the legal definition of "reasonable doubt". Being able to contemplate a scenario where the evidence could be wrong is not sufficient to overturn the evidence. Which is exactly why the code needs to be a matter of court record, so that the defendant can see whether or not this scenario actually exists or not.

      Seriously, what is the benefit of denying this right to the defendant?

      --
      I've upped my standards, so up yours.
    205. Re:But does it work? by cayenne8 · · Score: 1
      "Refusing to take the test results in it's own penalties."

      Depends on the state. Here? I'm not taking ANY tests to give them evidence against me. Worst case, you get reckless driving and a suspended licnese up to a year. You shut up, lawyer up...and you'll be out without a DWI on your record, and even with a suspended license, you can get permits to drive to work, stores, etc....

      Rough, yes, but better than a DWI

      --
      Light travels faster than sound. This is why some people appear bright until you hear them speak.........
    206. Re:But does it work? by Anonymous Coward · · Score: 0

      An arbitrary 0.08 is not anywhere near enough alcohol to risk your life. I would be much more concerned about someone texting. Someone doesn't reach 0.08 and then all the sudden run through red lights. Stop drinking the MADD juice.

    207. Re:But does it work? by Guido+von+Guido · · Score: 1

      Stupid mods! What kind of idiot modded that--oh, wait, it was me.

      Carry on then!

    208. Re:But does it work? by cayenne8 · · Score: 2, Insightful
      "You're an idiot. Blood alcohol is blood alcohol. The big guy can drink a little more than the little woman. Just not as much as you'd like."

      Sure, BAC is BAC....but, different people can handle and function to MUCH different levels at given BAC. At .04, someone might be really out of it...but, others at .08 are just barely starting to show any signs of intoxication at all. Some people just have more tolerance than others.

      --
      Light travels faster than sound. This is why some people appear bright until you hear them speak.........
    209. Re:But does it work? by home-electro.com · · Score: 1

      OMG, that sounds terrible. But show me one product that IS NOT, quote,

      not written well, nor is it written to any defined coding standard. SysTest said, 'The Alcotest NJ3.11 source code appears to have evolved over numerous transitions and versioning, which is responsible for cyclomatic complexity

      end quote.

    210. Re:But does it work? by Anonymous Coward · · Score: 0

      You are a part of the problem. Did you read the article? Do you have any idea how inaccurate these portable breathalyzers are? The way you wrote your response clearly indicates that you won't change your mind about any of this. The reality is that his (her?) actual BAC could have been anywhere from obviously legal to obviously illegal. But, no, you've damned digitalunity, and that's that.

      Fuck you and your unquestioning faith.

      At the risk of making a straw man, I don't drink so don't bother accusing me of defending a fellow DUI recipient.

    211. Re:But does it work? by Magnus+Pym · · Score: 1

      Especially considering most code is written nowadays by inexpensive 20-somethings in Bangalore on their first commercial project.

    212. Re:But does it work? by home-electro.com · · Score: 1

      Pleeeease. Habitual offenders are unlikely to be repeat offenders and hence can't cause majority of crashes.

    213. Re:But does it work? by digitalunity · · Score: 1

      Depends on your point of view I suppose. Is losing your license for a year worth it to avoid a DUI?

      I guess if you live in a strict state and think you're over 0.15% BAC then it might make sense, seeing as you might lose it for a year anyway.

      --
      You can't legislate goodness. Let each to his own destiny, by will of his freely made choices.
    214. Re:But does it work? by MoeDrippins · · Score: 1

      Correct. The articles mis-interpret the math; the weighting is too far to the last reading, not the first.

      --
      Before you design for reuse, make sure to design it for use.
    215. Re:But does it work? by digitalunity · · Score: 1

      Roadside tests are just for the police to get probable cause for an arrest. Most testing procedures include a breath test at the station, a 20 minute wait and another breath test. If you blow .07 the first time and .09 the second time, you get a DUI even though your BAC was below the legal limit while you were driving. The laws in most states say driving within 2 hours of having over .08% BAC constitutes DUI.

      --
      You can't legislate goodness. Let each to his own destiny, by will of his freely made choices.
    216. Re:But does it work? by tepples · · Score: 1

      Plenty of people get by with no cars. Instead, they use public transportation.

      Public transportation such as bus service is for those who are privileged enough to be able to do all their travel 1. within the city, 2. on the hour, 3. during the day, 4. on Monday through Saturday.

    217. Re:But does it work? by MoeDrippins · · Score: 1

      This filter is nice because it doesn't require you to remember all the values that you want to average together

      Why would you need to remember all the values? As long as you remember the number of values and their total you're fine.

      Because it's a MOVING average [that the poster to whom you're replying is talking about]. You only use the last "n" numbers in a SIMPLE moving average, so you need to remember them all so you know which ones to drop off.

      With an exponentially smoothed moving average, you only need to know the last calculated MA, the new input, and (as he puts it) the alpha value. (I've heard that term labelled epsilon, but tomato, tomahto.)

      --
      Before you design for reuse, make sure to design it for use.
    218. Re:But does it work? by tepples · · Score: 1

      Typically officers rely on the horizontal gaze nystagmus test, which is a far more accurate method of measuring intoxication levels around the legal maximum. However, that test generates no evidence which you can present in court, other than the sworn testimony of the officer who administered it.

      Would it be so hard to camcord the suspect's eyeballs?

    219. Re:But does it work? by ClosedSource · · Score: 2, Insightful

      But laws are usually based on the measured value rather then unmeasurable and subjective determination of the driver's ability to function.

    220. Re:But does it work? by bh_doc · · Score: 2, Insightful

      "Its" referring to a person is almost certainly not correct. "His" is arguably correct, as it is both the male-specific and, historically, gender neutral pronoun. In recent time it has been assumed almost exclusively to be male-specific and its gender-neutral use has fallen out of favour. "Their" as a singular gender-neutral pronoun has since become popular. Welcome to evolving English. http://en.wikipedia.org/wiki/Gender-neutral_pronoun#Historical_solutions

    221. Re:But does it work? by Anonymous Coward · · Score: 0

      >>> There are too many chances for a false positive to risk it.

      I remember going on a school visit to a police station and some officer gave a pupil a breath test and he failed, apparently because of having some cough sweet

    222. Re:But does it work? by ppanon · · Score: 4, Insightful

      You can think that you're doing fine because you've gotten good at compensating. For instance, dancers and figure skaters can learn to compensate for inner ear/balance issues from spinning at speeds and duration that would have most people nauseous or throwing up, but the spinning doesn't affect their reflexes. However you don't have to have your cochlear sense of balance feel impaired for intoxication to be affecting your ability to drive. It doesn't take much alcohol for your reflexes and cognitive response to be impaired enough to cause an accident, even if it's not obviously apparent. While there is some variation, the acceptable BAC levels were based on correlation with average results from testing for significant reflex and attention deficits.

      You might be one of the outliers, but the odds are much better that you might are one of the myriad of people who delude themselves into thinking that they are outliers because their judgement is impaired. Unless you've actually personally undergone reflex/response testing by a third party in conjunction with BAC testing to judge your personal susceptibility to alcohol, your judgement on the subject after alcohol consumption is unreliable. However your ability to compensate for impairment in normal driving conditions wouldn't save you from an accident in an unexpected situation the way unimpaired reflexes would.

      The small restriction on the few outliers is not a high price to pay for the safety of innocents. Nobody says you can't drink or drive, just that you have to exercise some level of personal responsibility and not do both (or for that matter, drive and consume any other drug that impairs your ability to drive safely)

      --
      Laissez lire, et laissez danser; ces deux amusements ne feront jamais de mal au monde. - Voltaire
    223. Re:But does it work? by ClosedSource · · Score: 1

      And if there were rules of thumb for programming that were as simple as those used for constructing buildings, the average construction worker could do it.

    224. Re:But does it work? by ClosedSource · · Score: 1

      Of course, you could just refrain from drinking and driving.

    225. Re:But does it work? by SnowZero · · Score: 2, Informative

      So, let's assume that individual readings are the true value plus some zero-mean error (it's supposed to be calibrated, after all). Using the exponential average that was in the actual device's code, your error will never be better than 1/2 of an individual reading (the last one). To beat this with a array to implement a sliding-window average, you'd need only 5 entries to get a more accurate reading than their approach (error is proportional to sqrt(N) for an arithmetic mean). That's 10 bytes. How cheap of a processor do you expect them to be using, such that 10 bytes is unacceptable? With 16 bytes, you get twice the accuracy, as well as the ability to take the average by a bit shift (likely not worth bothering with since you would convert it to base-10 for display anyway).

    226. Re:But does it work? by ClosedSource · · Score: 1

      Call me petty, but it doesn't bother me that offenders have to pay through the nose even if the fines don't deter them. It's not justice since the fines can't compensate for the damage caused, but it's better than nothing.

    227. Re:But does it work? by ClosedSource · · Score: 1

      If it's the law, than you best follow it. If you believe the law should be changed, than lobby for it or if your state allows create an initiative. As long as the law is on the books, it's dumb to argue in court that you "weren't really drunk" at .08.

    228. Re:But does it work? by ClosedSource · · Score: 1

      Had you been drinking? If not, then you've clearly identified a problem. If you were, than who knows?

    229. Re:But does it work? by Anonymous Coward · · Score: 1, Interesting

      I realize this article is about screwed up code, and much criticism and analysis is justifiably about that code. However, the reason the code is made so important is because the legal system has been skewed to procedurally depend solely on breathalyzers. This dependency is complete failure to maintain a chain of evidence and providing for a defense, critical issues in determining innocence and guilt.

      In a breathalyzer, the evidence is destroyed. While some /.ers make think "duh," there is little to no reason why there isn't retention of the breath/air sample, in addition to savings of at least 2 additional samples (B and C samples for non-government affiliated independent labs).

      Even athletic drug testing has better procedures and policies in place. If an athlete is caught cheating in the Olympics or in the Tour de France, a B sample is checked to verify the results, and often times (but not always) the A and B samples that were tested still has enough sample left to recheck.

      Our legal was circumvented thanks to bad police, bad judges, and an irresponsible SCOTUS decision and lazy Congresses and Presidents since then that refuse to take the chain of evidence into account. The US Supreme Court stupidly decided that because the breath sample was not "deliberately" destroyed, it could not be held against the prosecution's case.

      Also, there was no impetus to raise the standard, despite it being easy to do so. The first way to do this is the aforementioned storing of a breath sample, which some breathalyzers do as they capture the breath to effectively test BAC. The second, and more accurate in addition to being available as a backup or redundant test method to make sure someone is guilty or innocent, is to take blood samples. Some states allow this, but do not allow the person to choose (refusing a breathalyzer and insisting on a blood test is not always allowed or legal).

      Again, the analysis of the code is extremely important, but only because our system has become so lazy and stupid to rely on such an inferior and singular tests. There is nothing else that quickly comes to mind where insuffient evidence is kept, lab tests completely destroy the entire contents of the evidence, no actual evidence is kept to verify or refute the results for the defense, and all this is allowed to find someone guilty.

    230. Re:But does it work? by ppanon · · Score: 2, Interesting

      That's close. Since you want to take the previous average, turn it back into a running total by multiplying it by the old item count, sum that with the new value, and finally dividing by the new item count, we get:

      n++
      new average = old average*((n-1)/n) + new_value/n

      which, simplified into your format would actually make it:

      average = (new_value-average)/n++ + average;

      From a numerical analysis point of view though, you're probably better off getting separate totals and count and calculating the average at the end. There will be less accumulated error.

      --
      Laissez lire, et laissez danser; ces deux amusements ne feront jamais de mal au monde. - Voltaire
    231. Re:But does it work? by gonz · · Score: 1

      This filter is nice because it doesn't require you to remember all the values that you want to average together

      Why would you need to remember all the values? As long as you remember the number of values and their total you're fine.

      Not true unless you're talking about a very small number of samples. With integer or fixed point variables, the total will eventually overflow. With floating point variables, the precision errors will steadily compound and can corrupt the result.

      A better solution is to store an array of readings over a time window (e.g. the past 5 seconds), and repeatedly recalculate the array average. However, this requires memory and CPU resources that often aren't available for embedded systems. People try to optimize the average by keeping a running total (i.e. adding the newest sample and subtracting the oldest sample), but this reintroduces the problem of steadily accumulating floating point errors. There are more robust algorithms (e.g. from Knuth or Welford) that address this problem.

      One last point is that a windowed average is only mathematically valid for a signal that doesn't have too much noise. Otherwise you're looking at a lowpass filtering problem, and a windowed average is essentially the worst of "finite impulse response" filters.

      -Gonz

    232. Re:But does it work? by Docboy-J23 · · Score: 1

      they can be even worse than PHBs.

      Would somebody please mod this guy offtopic? I don't see what Dungeons & Dragons has to do with any of this.

    233. Re:But does it work? by centuren · · Score: 2, Insightful

      "You're an idiot. Blood alcohol is blood alcohol. The big guy can drink a little more than the little woman. Just not as much as you'd like."

      Sure, BAC is BAC....but, different people can handle and function to MUCH different levels at given BAC. At .04, someone might be really out of it...but, others at .08 are just barely starting to show any signs of intoxication at all. Some people just have more tolerance than others.

      Police officers, at least in this state, still use their judgement when interviewing and observing someone suspected of driving drunk. For example, you don't actually have to have .08 to be arrested. If you're below .08 but still relatively high, you can be arrested for reckless driving. Obviously you can be arrested for reckless driving without a breathalyser if you are driving recklessly, but it's my understanding they can use their judgement applying that charge to drivers who are intoxicated but within the legal BAC.

      Of course, that doesn't mean they'll judge you to be fit to drive if you're over .08, but the line has to be drawn somewhere. Since it is so low for some people when comparing BAC to motor skill impairment, the best advice is always to not drink at all if you know you'll be driving, or not drive at all if you find you've had more than one drink. All the same, I wouldn't be surprised if I found out the average DUI arrest recorded a BAC of well over .1.

    234. Re:But does it work? by omnichad · · Score: 1

      But doesn't this weights HEAVIER on the first reading (at least according to GP.

    235. Re:But does it work? by omnichad · · Score: 1

      No. That was stupid of me. I read that wrong. But shouldn't it wait to take readings until it can be reasonably sure that the "mouth air" is done? Does it?

    236. Re:But does it work? by Toonol · · Score: 1

      No, "His" is appropriate. English allows fallback to the male gender when the subject's gender is unknown or mixed.

    237. Re:But does it work? by hoofie · · Score: 1

      Not quite. If you blow positive on the road-side machine they arrest you and take you to the nick. You are then breathalysed again with one of these. If that is STILL positive then you are charged with the offence and then normally bailed to appear in court. If it's negative then you are given a bit of a lecture and then told to bugger off and don't do it again.

      The result of the machine at the station IS recognised by the court so that's enough to get you banned.

      There has been challenges to this in the UK but the UK Judiciary isn't quite a flexible as US courts so the chances of that defense working are pretty well zero unless the coppers cocked up and didn't calibrate the machine that night or something.

      As for the blood sample, the police will ask if you want to have one taken so it can be checked [you can have a sample as well]. You don't have do but it's worth doing as it just MIGHT get you off the hook if the result is borderline.

      Here in Oz they have Booze Buses where they block the road and breathalyse whoever they feel like. If you blow positive they have everything nicely ready in the bus including the accurate machine etc. ready for customers - and they LOVE doing it at 8:30 in the morning also.

    238. Re:But does it work? by omnichad · · Score: 1

      when did his become gender neutral? And why didn't I get to vote? I already missed the vote on demoting Pluto...

    239. Re:But does it work? by okmijnuhb · · Score: 1

      Justice is a commodity you must pay for. If you have enough money you can sometimes buy injustice. Witness OJ Simpson.

    240. Re:But does it work? by Lehk228 · · Score: 1

      it's easier for the system if there are less ways an innocent person can demonstrate their innocence.

      we have gone from "innocent until proven guilty" to "don't GAF if you are innocent",

      --
      Snowden and Manning are heroes.
    241. Re:But does it work? by sjames · · Score: 1

      He may have been thinking of the case of continuous sampling when you want to smooth the samples. However, in this case where a fixed number of samples are taken and result in a single value, you're correct. A proper average is just accumulate N samples then divide by N.

      Of course, in a case like this, they really should be doing a LOT more validation on the samples. For example, the value should settle within a few samples and then see only small variations due to noise and quantization errors. Any wild excursions should be considered a fault and lock the system out until it's serviced.

    242. Re:But does it work? by WCguru42 · · Score: 1

      You forgot 5, those of us who can't afford a vehicle. Yup, not everybody can afford a car and therefore have to work their schedules around the bus/subway schedules. It's a whole lot of fun, lots of waiting and getting up early and getting home late. But it sure beats trying to walk 20+ miles to get to work in the morning.

      And since when did buses not run on Sundays? You must live in the lower midwest. I remember living there and thinking they had some crazy rules.

      --
      "Educate the mind but never at the expense of the soul."~Blessed Basil Moreau
    243. Re:But does it work? by WCguru42 · · Score: 1

      If you were violating the law in any way (such as not having headlights on) it would be nearly impossible to convince the judge that the cop had no cause to breathalyze you. You might have forgotten to turn your lights on for a non-alcohol related reason but that doesn't keep the cop from having some cause to question.

      --
      "Educate the mind but never at the expense of the soul."~Blessed Basil Moreau
    244. Re:But does it work? by ppanon · · Score: 1

      Well, you're right, but what really matters is what blowing technique was used to calibrate the machine when in the conversion formula was developed. If the formula constants were calibrated based on the body of the breath, but the police officer gets you to blow out the last dregs, then the measurement will appear higher than it is.

      That said, I think there's a good chance that the last dregs of breath would be more accurate and that that's how they would do the calibration. The longer the air has been in your lungs, the more likely you would get the partial pressure of whatever they're measuring equalizing across the alveolae. That would also explain why the machine would require that you need to blow a certain amount of air through a little straw before accepting readings. Not only will it force you to use the deep lung air, but it will also force you to keep the air in your lungs longer and give more time for the partial pressures to equalize across the membranes.

      In that case it makes sense that they would want to weigh the later measurements more heavily. However what they should probably do is take ongoing measurements, keeping the last N, identifying when the measurements start to plateau (indicating deeper lung air) and average those remaining measurements. If there are insufficient deep lung air measurements, requiring re-testing.

      Come to think of it, if you thought you were close to the limit, your best bet would be to do a full exhale first (without appearing to if you're directed not to), take a deep breath to freshen up the deep lung air, and then blow as fast as possible (possibly releasing some through the nose) to decrease the time for the new air to become contaminated. A singer/wind instrumentalist with good breath training might pull it off if they weren't too impaired to try.

      --
      Laissez lire, et laissez danser; ces deux amusements ne feront jamais de mal au monde. - Voltaire
    245. Re:But does it work? by sjames · · Score: 1

      Not to mention that the cell that detects the alcohol will also register ketones which will be on your breath if you are diabetic, on a ketogenic diet (for epilepsy for example) or just fasting.

    246. Re:But does it work? by Anonymous Coward · · Score: 0

      That is true for normal averaging; however, in a moving filter you need a buffer or queue of some sort. This keeps track of past values read to perform averaging so after a value is no longer needed you know how much to subtract from the total.

    247. Re:But does it work? by Peyna · · Score: 1

      I don't recommend refusing. Your refusal to take the test can be used against you in court. (South Dakota v. Neville, if you don't believe me). Also, if it's not your first offense, many states have stiffer penalties for refusing.

      Instead, if you know you're not under the influence, offer your blood if you don't trust the breath machine. Two advantages. A more accurate test, and, can be preserved for independent testing down the road.

      --
      What?
    248. Re:But does it work? by spud603 · · Score: 1

      Wouldn't the word "their" have been an equally qualified option?

      Show me a programmer creating "perfectly engineered code", and I'll show you a programmer building up their resume.

      The above looks okay to me, but I'm not an English major.

      Absolutely not. 'Their' is plural, as in, "I'll show you a collection of programmers building up their resumes". You gotta use 'his' or 'hers' ('its' is not a personal pronoun and implies non-person).

    249. Re:But does it work? by dasunt · · Score: 2, Interesting

      The majority of crashes and deaths aren't caused by people that blow a 0.086. They're habitual offenders who blow .25s.

      Don't forget the statistics are sometimes utterly bullshit.

      Here in Minnesota, we had an interstate bridge collapse (the I35W bridge) into a major river a few years ago.

      Officially, all those deaths from the bridge collapse count as alcohol-related fatalities, due to the fact that a few of the people who died had detectable levels of alcohol in their blood.

      Note, they weren't necessarily drunk or even impaired, but since they had detectable levels, it counts.

    250. Re:But does it work? by spud603 · · Score: 1

      No, "His" is appropriate. English allows fallback to the male gender when the subject's gender is unknown or mixed.

      As is "Her", by most accounts.

    251. Re:But does it work? by Splab · · Score: 4, Interesting

      Since I'm not an American I don't know how a drunk stop works, but here in Denmark, you get to blow on a mobile device, if it shows up as drunk you are taken to the hospital for a blood sample and only that blood sample will be used against you.

      Are only the mechanical readings being used in the US?

    252. Re:But does it work? by Anonymous Coward · · Score: 0

      Disagree with me? Then try responding at 2am to a scene where a drunk driver kills a family of four, including a 3-month-old child, and the drunk only needs an over-night observation at the ER. THEN you can tell me how I'm over-reacting.

      You are a prime example of why victims shouldn't make laws. Hell, you weren't even a victim - you were barely involved - and it turned you into a troll. Fuck off and die of cancer.

    253. Re:But does it work? by Toonol · · Score: 1

      It always has been, at least for the last couple centuries. It's not quite gender neutral; if the gender is a known female, use "hers". If it is a non-gendered item, like a book, use "its". If it is a male, or the gender is unspecified, use "his". As stated elsewhere, "their" is plural, and so not appropriate, although people are using that word (and "it's") in an overly-eager attempt to conform language to ideology.

    254. Re:But does it work? by sjames · · Score: 1

      Interestingly, none of the examples you gave will cause as much damage to your life if their software momentarily glitches as the breathalyzer will. Even the X-ray machine probably won't (unless it's a really serious failure like the therac-25 where the electromechanical interlocks were also inadequate).

      For example, as long as the hard wiring will not allow green in two directions at once, the software in the traffic light can screw up all it wants and it will only inconvenience you for a few minutes. The software and hardware for a credit card transaction has more checks and balances (such as checksums, not allowing unusually large charges, etc) than the breathalyzer even though you an error there would probably cost you far less than a DUI.

      The X-ray machine COULD be a real problem, but those generally have hard wired safetys to prevent actual harm no matter what the software does. That would be because as a medical device the makers recognize that a malfunction there could have life altering (or ending) consequences and design accordingly. For example, when the beam is turned on a timer starts. If the software doesn't turn it off before the timer expires, the whole machine shuts down until it is reset by a technician.

      Of all of those, only the breathalyzer has no interlocks to detect faults and assure at least sane functioning.

    255. Re:But does it work? by parlancex · · Score: 1

      That _would_ work well using floating point data types, but if they had the ability to use floating point that wouldn't have precluded them from using accurate more simple methods anyway. More than likely the embedded microprocessor had limited integer fixed point arithmetic capabilities only, using this kind of method with fixed point integers would result in the truncation of the fractional contribution of each successive sample, which would cause the calculation to become highly inaccurate after a large number of samples, specifically, it would be up to N less than the real average where N is the number of samples.

    256. Re:But does it work? by michaelhood · · Score: 1

      That doesn't work. But a simple blood test would work as a control.

    257. Re:But does it work? by Anonymous Coward · · Score: 0

      Huh, what? Write some code that determines the prime factors of an arbitrary large number. I'll test it against 10 numbers of my choice, and if it passes them all in reasonable time I'll say that your code works from empirical analysis. Testing that it solves a problem is not the same as having a solution; the same applies to breathalyzer. (Test using sophisticated blood sample analysis against Q&D breath test - do they match?)

    258. Re:But does it work? by sjames · · Score: 1

      Honestly, the problems pointed out go well beyond poorly written code. That was just the icing on the cake. The system was poorly DESIGNED (hardware and software) and everything about the code stinks of a rather cavalier attitude. Disabling exceptions for invalid opcodes and memory bounds errors is just plain irresponsible and shows that they would rather have it report a bogus value than indicate a fault.

      Other signs include a complete lack of feedback. The CPU controls the hardware, but has no way to make sure the hardware actually responds AND if it gets an 'impossible' reading, it just picks the last reasonable (but not necessarily correct) value it saw and calls it good. That's especially bad considering that that value may not even be from the same test run!

      Simply put, my VCR has more safeties in it than that breathalyzer does. It actually checks that the commanded mechanical actions happen and if they don't, it ejects the tape and shuts off. The people who made the breathalyzer clearly just did not care.

    259. Re:But does it work? by ps2os2 · · Score: 1

      The real question should be: Does it work correctly?

      Almost any program can run, but if the output isn't then you can say it doesn't create valid output.

    260. Re:But does it work? by ppanon · · Score: 1

      If you don't want people to drink and drive at all...why do you have public bars that serve alcohol to people?

      Hmmm. Let's see:

      • You might be meeting people to watch sports or want social contact in a mutually convenient location without having to worry about stocking alcohol, prepping snacks, cleaning up glasses, etc.
      • "Meat markets"
      • Blind dates in a fun yet neutral space,

      Back before the development of car culture, you used to have neighbourhood pubs as community rallying points to which you would either walk to, or ride your horse to. Horses had more sense than to ride hard into something just because the rider was drunk. It took a while for people to accept that the rules had changed when the car came along. Clearly some still don't.

      You drive by and see all those cars parked outside a bar? You seriously think 99% of those people driving home aren't over the 'legal' limit?

      • Controlled alcohol intake to match metabolism (~1 drink/hour),
      • Designated drivers,
      • Taxis.

      Some people are smart enough to stop if/when they need to or to stay out of their cars until it's safe. For the idiots who aren't, I have no sympathy. Decades ago, people didn't think that drunk driving was that serious. Then statistics were compiled that showed that it was a factor in a significant portion of driving-related injuries and fatalities, and attitudes changed. If you want to drink and drive, do it on a private back-road where you'll only kill yourself and passengers stupid enough to get into a car/on your bike with you.

      Admittedly, if you're drunk at night on a motorbike (as opposed to in a car), then you're more likely to kill or injure yourself than run down a pedestrian. But I remember once seeing a guy in late afternoon/early evening who was so drunk he couldn't hold up his bike,... near a park and an ice cream shop where pedestrians are common. The fool almost got himself run down too, but it wouldn't have taken much difference for him to take out someone else instead.

      --
      Laissez lire, et laissez danser; ces deux amusements ne feront jamais de mal au monde. - Voltaire
    261. Re:But does it work? by tepples · · Score: 1

      And since when did buses not run on Sundays?

      In Fort Wayne, Indiana, the city buses don't run at night, on Saturday evenings, on Sundays, or on any of six major holidays. There just isn't enough ridership to make Sunday service anywhere near cost effective. Two of the routes that go farther from the city center don't run on Saturdays either.

    262. Re:But does it work? by ps2os2 · · Score: 0, Flamebait

      Family of 4 out at 2AM??

      Maybe the parents should be investigated as well for child abuse.

    263. Re:But does it work? by Anonymous Coward · · Score: 1, Informative

      "You are (an idiot)" uses the old second person plural ("thou art" is, historically, second person singular). "You are" is nevertheless modern accepted usage for second person singular. For similar reasons, "their" is sometimes acceptable as a singular possessive pronoun under certain circumstances.

    264. Re:But does it work? by omnichad · · Score: 1
      Depends on if you're a purist or a realist. They is not a recent invention. Using Wikipedia for quick material:
      • Eche of theym sholde ... make theymselfe redy. – Caxton, Sonnes of Aymon (c. 1489)
      • Arise; one knocks. / ... / Hark, how they knock! – Shakespeare, Romeo and Juliet
      • 'Tis meet that some more audience than a mother, since nature makes them partial, should o'erhear the speech. – Shakespeare, Hamlet
      • I would have everybody marry if they can do it properly. â" Austen, Mansfield Park (1814)
      • That's always your way, Maimâ"always sailing in to help somebody before they're hurt. – Mark Twain, Adventures of Huckleberry Finn (1884)
      • Caesar: "No, Cleopatra. No man goes to battle to be killed." / Cleopatra: "But they do get killed". – Shaw, Caesar and Cleopatra (1901)

      People have been arguing about "it" for a very long time - long enough for correct to be ambiguous.

    265. Re:But does it work? by pimpsoftcom · · Score: 1

      Like it or not, I think you are a terrible person for driving drunk. Its drunk drivers like you who made me a widower and killed both my wife and the child in her womb, and the fact that you still dont take responsability for the fact that you have willingly endangered others lives is as deeply insulting as it can get.

      I hope somehow, someday, you get exactly what you deserve for your crimes, becouse its clear no punishment you have had was enough.

      --
      - d
    266. Re:But does it work? by martin-boundary · · Score: 1

      There's nothing you can do if it comes down to the police officer's word against yours. Thus, make sure it doesn't come to that. One way is to carry or conceil a camera and record yourself and the police from start to finish, ie tell the camera you're going to sit in your car and you don't intend to drive, and then in the event that the police comes over, you record the whole proceedings.

    267. Re:But does it work? by hldn · · Score: 1

      Depends on your point of view I suppose. Is losing your license for a year worth it to avoid a DUI?

      uh, the answer is absolutely yes.

      --
      http://www.accountkiller.com/removal-requested
    268. Re:But does it work? by martin-boundary · · Score: 1

      Trying to get the average cop to understand the concept of measurement error is probably hopeless, though.

      That's ridiculous. The only understanding the cop likely has in the first place is that the device spits out a number. There's no added difficulty in handling a device that spits out two numbers, and giving instructions on how the numbers must be recorded in their reports etc.

      You're making the mistake of thinking that the underlying purpose and implementation of the device needs to be clearly understood by the user before they can make use of it. It doesn't in this case. Just view it as a black box that spits out some number(s).

    269. Re:But does it work? by truesaer · · Score: 1

      I wonder if this method of averaging is then intended...it makes a bit of sense. When you first start blowing you might have recently had a sip of alcohol or something. But I think the idea is that when you do a sustained blow near the end you will only be getting the alcohol that is being released from the blood into your lungs in real time. In that sense weighting the most recent samples would make sense.

      I don't know if there is an accepted standard way that breathalyzers are supposed to condense data from multiple samples into a single value, but this method actually seems to be biased towards a lower reading rather than a higher one.

    270. Re:But does it work? by jamesswift · · Score: 1

      If I were to get pulled over, and knew I was over the now ridiculously LOW limit of .08...

      That's not a "ridiculously LOW" limit. Indeed, for most of the world it's _over_ the limit.

      US or Imperial Gallons?

      --
      i wish i could stop
    271. Re:But does it work? by kostmo · · Score: 1

      When performing a simple moving average, you need to remember all the old values at least long enough to "drop them out" of the average.

    272. Re:But does it work? by vg_locus · · Score: 1

      The American .08 i still 4 times higher than our Swedish .02. I would never take more than 1 glass of wine for dinner if I was driving. Yes, you can handle a car a .08 but not as good as sober. If you are handling a vehicle larger than a bike you should be as good a driver as possible. Driving is not a human nor civil right. It is a privilege if you decide to stay sober.

    273. Re:But does it work? by Eskarel · · Score: 1

      They don't have that power, they also don't have any obligation to maintain highways(the legal argument they used to build them in the first place is a bit of a stretch).

      Whether you like it or not, negotation is a part of life. The federal government was not given certain powers, those powers were given to the states. There's nothing in the constitution forbidding the states and the federal government making an agreement for the federal government to do something that it is allowed to do but the states can't or won't in exchange for the states doing something the federal government can't or won't do.

      If you don't like it then run for office on that plaform or support someone else to run for you.

      .08 isn't "drunk", but that's really not the point. The BAC limits aren't about being "drunk" which is a pretty wishy washy measurement, they're about impairment. Reasonable science indicates that alcohol impairs your ability to react as quickly and that not being able to react as quickly on the roads leads to an increase in accidents. BAC is already adjusted for build, weight and sex by the biological factors involved.

      It certainly isn't perfect, impairment isn't even and likely depends on what your reaction times were to start with, however on average at .08(which is actually considered far too high in most of the world) you will have measurably increased reaction times, which will make it much less likely that you will be able to avoid an accident if you are exposed to circumstances which require quick reaction times.

      There's also reasonable argument to be made as to whether the breathalyzers are perfect, however you can always ask for a blood test if you feel your result is innacurate.

    274. Re:But does it work? by Eskarel · · Score: 1

      Actually, from what I was taught, the correct, though tedious form is "his or her" as there is no such thing as a singluar gender-neutral, third person, possessive(for a value of gender-neutral where gender doesn't matter as opposed to where gender doesn't exist).

    275. Re:But does it work? by QuoteMstr · · Score: 1

      scientifically proven

      Science "proves" nothing. It merely provides supporting evidence. You should be automatically skeptical of anyone who uses the phrase "scientifically proven" --- either he's lying to you, or he doesn't know the caveats that go along with the scientific method.

    276. Re:But does it work? by Ihlosi · · Score: 1

      Well the problem with calculating the averages should honestly be enough to get this tossed.

      There's no "problem" with the lowpass filter. The problem is that whoever wrote that article apparently has no knowledge of signal processing, in particular spectra and filter types (FIR/IIR).

    277. Re:But does it work? by bloobloo · · Score: 1

      It is an average. It just isn't a mean average.

    278. Re:But does it work? by Gavin+Rogers · · Score: 1

      This is why one should always refuse a breathalyzer test even if you haven't been drinking

      "Refused to give a sample of breath for analysis." Instant fail. Off to gaol for you. Thanks for coming.

    279. Re:But does it work? by Zebedeu · · Score: 1

      What surprises me is that he didn't also get fined for driving at night with the headlights off.

    280. Re:But does it work? by Anonymous Coward · · Score: 0

      Here in Finland the way this works is that if breathalyzer shows you're over the limit they _always_ take you for a blood test and the result from that is the evidence. Never just the breathalyzer.

      Don't they do that? And why not?

    281. Re:But does it work? by Anonymous Coward · · Score: 0

      Nope, they're a farce, intended to make money--just like speeding laws, and countless other examples.

    282. Re:But does it work? by Zebedeu · · Score: 1

      I used to drink just enough to be safely below the limit, so that if I was stopped, I wouldn't lose my licence.

      I stopped doing it when I spoke with a friend of mine who's a heavy drinker, but never drinks even a small beer when he's driving.

      He told me: "it's not that I'm affraid of the police, but if I have an accident and I kill someone, I don't want to have doubts if it would've happened the same had I been completely sober".

    283. Re:But does it work? by Marcika · · Score: 1

      There are no laws against drunk driving anymore. There are laws about not being able to potentially operate a vehicle if a machine determines you have enough alcohol on your breath.

      Yes, and rightly so. It protects you as a driver against corrupt cops who misuse a field sobriety test to get convictions of anyone who looks the wrong way at them.

      It protects you from dangerous drunk drivers with good lawyers who can cast doubt on the police officers veracity or character.

      However arbitrary the limit set by the machine is, it is a lot better than having no exact cutoff.

    284. Re:But does it work? by Anonymous Coward · · Score: 0

      Perhaps the total can get too large to store in the allocated space (like a longint).

    285. Re:But does it work? by JoeInnes · · Score: 1

      Re: the traffic lights, they may well be. It may not be poor performance, it may be doing what it's designed to do. It's better that you have to stop at every set than one guy, who comes to the first set at the end of the cycle and races the amber, has to keep racing the amber to stay ahead of the stop lights. I know, I know, he shouldn't be doing it. But he will. And I suppose it keeps drivers alert.

    286. Re:But does it work? by Timmmm · · Score: 2, Informative

      That's the same. You just started n at a different value... :-)

    287. Re:But does it work? by bryan1945 · · Score: 1

      Only a 0.0! You fiend, all good drivers have at least a -1.0% nowadays!

      (Sounded funnier in my head)

      --
      Vote monkeys into Congress. They are cheaper and more trustworthy.
    288. Re:But does it work? by bryan1945 · · Score: 1

      10 PRINT "HELLO WORLD"
      20 GOTO 10

      Perfectly annoying when named 'RUN_ME'

      --
      Vote monkeys into Congress. They are cheaper and more trustworthy.
    289. Re:But does it work? by QuestorTapes · · Score: 1

      > ...here in Denmark, you get to blow on a mobile device, if it shows up as drunk you are taken
      > to the hospital for a blood sample and only that blood sample will be used against you.
      >
      > Are only the mechanical readings being used in the US?

      Note: IANAL. Typically, yes. There are a number of practical reasons for this, not the least of which is the difficulty is large cities of promptly transporting a drunk to a hospital, and getting the overworked staff to take a blood sample while the suspect is still intoxicated.

    290. Re:But does it work? by Teancum · · Score: 1

      Since all 50 U.S. states have different laws on this point, and often even municipalities within the same state can have differing laws on the topic (DUI legislation is a state, not a federal issue), this isn't quite so cut and dried.

      Also, even if the manufacturer guidelines suggest another blood test be done, often you will have a police agency take a shortcut and not bother to get the "second opinion"... and have the information from the device be the only piece of evidence presented in court.

      I would have to agree with the sentiment here that most of the hand-held devices used by an ordinary police officer should only be a screening device... to rule out obvious exceptions and suggest a more through test. Erratic behavior that turns out not to be due to alcohol or common controlled substances may be a symptom of a much more serious problem.

    291. Re:But does it work? by squizzar · · Score: 1

      Go and look up the process used by the guys that write software for the space shuttle.

      http://www.fastcompany.com/magazine/06/writestuff.html

      I get the impression people there aren't just building up their resumes.

    292. Re:But does it work? by clickety6 · · Score: 1

      To err is human...
      To totally screw-up takes a programmer..

      --
      ----------------------------------- My Other Sig Is Hilarious -----------------------------------
    293. Re:But does it work? by Anonymous Coward · · Score: 0

      >>Family of 4 out at 2AM?? Maybe the parents should be investigated as well for child abuse.

      Well, dickhead, there won't be any investigation of "child abuse" because the family is dead.

      Interesting how you'd classify child abuse as travelling overnight from Town A to Town C, by car? Pity the drunk fuck in Town B wiped them out.

      I hope you tell your stupid comment to some people you know, real people not just online people, just so they can tell you to your face what an ignorant dick you are.

    294. Re:But does it work? by Teancum · · Score: 1

      That may or may not be a flaw. It certainly isn't a true average, but an average isn't the only legitimate way to combine successive data values.

      That said, I'm not sure why a rolling average like this would be used for this purpose. Is there a medically sound, scientifically reviewed 'proper' procedure to measure alcohol in breath? I have a fear that this was just thrown together by some programmers.

      One of the points that needs to be made here is the original intended purpose of the equipment and the overall design goals. Is this equipment intended to be a screening device or something that is intended to be used for medical diagnostics? The standards here are on two completely different levels and shouldn't be considered the same thing.

      Also, such a rolling average that weighs later measurements is reasonable so far as to eliminate outliers (a huge problem with analog measurement devices like this) and to note that the equipment isn't measuring what was the blood alcohol, but trying to show what it currently being measured.

      My own software development experience for something like this was trying to read data coming from a radar gun being used to measure the speed of professional baseball players throwing a ball from the pitcher's mound. When I saw the raw data coming in from such devices, it was incredible about the range of data and the kind of outliers that were found. In this case the stadium owners (we were throwing the measured speed up on a display board in the stadium) wanted the pitching speed to be displayed automatically... so only when readings that were fairly typical for major league players would show up.

      What we ended up doing was a mean of the last eight readings, with the readings going into a queue as they came in. Obvious outliers never made it into the queue... such as the speed of an airplane flying over the stadium or the speed of the manager's pace going to the mound, and by averaging it kept what noise in the readings still existed under control. The user interface also had parameters that could be adjusted to change the outlier ranges from game to game as necessary.

      All analog measurements exhibit noise of some sort or another... either coming from the Analog/Digital conversion modules themselves (if poorly designed... unfortunately a common issue too) or from the fact that measurements of a particular sample can skew the data set.

      I'll also be honest, quite often software is used to make up for cheap equipment and averaging of samples to give far more apparent accuracy than an objective review of the measuring device would be validated for on its own.

    295. Re:But does it work? by Anonymous Coward · · Score: 0

      But even MS Word isn't that bad, since so many businesses rely on it and don't have problems with random data corruption to my knowledge.

      Unless you use "fast save" on older versions :-(

    296. Re:But does it work? by Schadrach · · Score: 1

      I have one friend who drinks pretty heavily, and has always seemed uncannily aware of exactly how much alcohol is in his system and exactly how it's going to effect him. To the point that one night at a D&D game, he stood up, said he was going to pass out in about 30s, walked over to the cushy armchair away from the table (as opposed to the metal folding chair he was in), took the time to get comfortable and was then unable to be awakened for a while. I know of a few occasions where he's been driving drunk, and you can tell because as he becomes increasingly impaired he slows down a lot, leaves more distance before the next car, etc. Essentially, he assumes his reactions are slowed more thank he actually thinks they are, and changes his habits around that. Given that unimpaired he tends to drive much faster than the speed limit, weave through traffic, and generally do lots of moderately unsafe things at high speeds to get where he's going slightly sooner, he might actually be safer when he's just barely impaired enough to know that he's impaired. =p

    297. Re:But does it work? by Teancum · · Score: 1

      While I do admire the quality of the software produced for the shuttle guidance computers, most software development budgets would never be able to sustain such scrutiny.

      When you have billion dollar budgets and can pay hundreds or thousands of dollars per line of code, yeah, it makes sense to demand high standards for such software designs. That people's lives depend on that software working correctly the first time it is actually used, that makes it all that more important to get it right the first time.

      While this breath analyzer device can be the difference between you getting arrested or being sent along on your way, few if any police departments could afford to pay the R&D costs or would be willing to buy equipment that has met this kind of standard.

    298. Re:But does it work? by SpooForBrains · · Score: 1

      In the UK, many child abuse cases rested on the testimony of Prof Sir Roy Meadow, now discredited. Many people were convicted of child abuse and had their children taken into care based on his testimony. There was a scandal about it, it was decided that all the verdicts should be re-examined, and yet, curiously, all the convictions were deemed to be safe on examination.

      Even thinking about it now still makes me angry, and I wasn't involved.

      --
      "The dew has clearly fallen with a particularly sickening thud this morning"
    299. Re:But does it work? by rwiggers · · Score: 1

      I haven't read the code, but if it is done like that it may not be an error at all, but just a low-pass filter. A rather bad one...

    300. Re:But does it work? by cayenne8 · · Score: 1
      "Controlled alcohol intake to match metabolism (~1 drink/hour),

      Designated drivers,"

      Yeah, like this is the 'norm'. [rolls eyes]

      You kidding yourself if you think even a sizeable minority does this.

      --
      Light travels faster than sound. This is why some people appear bright until you hear them speak.........
    301. Re:But does it work? by SpooForBrains · · Score: 1

      Having done further reading, it seems there have been some developments since I was last paying attention to this issue, and there are some inaccuracies in my above post.

      It also seems that "the law was changed such that no person can be convicted on the basis of expert testimony alone" which gives me some hope, although I don't see a source on Wikipedia for this claim.

      http://en.wikipedia.org/wiki/Roy_Meadow

      --
      "The dew has clearly fallen with a particularly sickening thud this morning"
    302. Re:But does it work? by cayenne8 · · Score: 1
      "Of course, you could just refrain from drinking and driving."

      Sure, I suppose I could go to a bar, and sip water, while all my other friends and every other patron is drinking to their pleasure. Yeah..that would be fun.

      If you think even a statistically significant minority of people at a bar are drinking reasonably enough to drive under the legal limit, or getting cabs or designated drivers, you are really not dealing with reality. That just doesn't happen.

      The only way you'll keep people off the road after having some drinks, is to ban public sales of booze in a bar type situation, and only allow it at home.

      --
      Light travels faster than sound. This is why some people appear bright until you hear them speak.........
    303. Re:But does it work? by Splab · · Score: 1

      It never cease to amaze me how hard it is to be an ordinary citizen in the US.

      Here in Denmark we don't have the Miranda statue, when you get arrested it is pretty much along the line: "The time is now 14:06 and you are under arrest". When being confronted with evidence there is a thing called illegal evidence - but you will still be charged, having gained the evidence by illegal means just means the policeman will get a slap on the wrist.

      Now this all sounds atrocious, but it (generally) works. No one blindly trusts the police in court, people get a mostly fair trial (we don't do the jury thing, we select people for lawmen (bad translation)).

      Sure as hell hope I'm never pulled over if I visit the US.

    304. Re:But does it work? by Anonymous Coward · · Score: 0

      Here in Denmark, when they switched to digital testers, our politicians wanted to change the law, so that the breathalyser would be enough. Thankfully, our judges told them "We are the ones deciding what evidence we consider good enough, thank you very much".

    305. Re:But does it work? by cool_story_bro · · Score: 1

      It never cease to amaze me how hard it is to be an ordinary citizen in the US... in Denmark we don't have the Miranda statue ... there is a thing called illegal evidence - but you will still be charged

      seems like any place you there are pros and cons, but in the US, those laws are in place to protect the rights of the citizens, even ones who may be breaking the law.

      Sure as hell hope I'm never pulled over if I visit the US.

      I sure as hell hope I'm never illegally searched in Denmark

      --
      You must wait a little bit before using this resource; please try again later.
    306. Re:But does it work? by cool_story_bro · · Score: 1

      any place you look* ... it's early

      --
      You must wait a little bit before using this resource; please try again later.
    307. Re:But does it work? by PhilHibbs · · Score: 1

      Yeah, that's a bit of a careless mistake, opens them up to pointless accusations of incompetence in their analysis.

    308. Re:But does it work? by Shatrat · · Score: 1

      'Their' is plural.
      It does sound better, though.

      The singular possessive thing is a bit of a pain.
      Fortunately, some of us have at least solved the plural second-person problem, we're just waiting for the rest of y'all to catch up.

      --
      09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
    309. Re:But does it work? by jonbryce · · Score: 1

      I guess the police surgeon (a qualified doctor) does it.

    310. Re:But does it work? by Sporkus · · Score: 1

      Nobody says you can't drink or drive

      Unless you're Amish.

    311. Re:But does it work? by cayenne8 · · Score: 1
      "Whether you like it or not, negotation is a part of life. The federal government was not given certain powers, those powers were given to the states. There's nothing in the constitution forbidding the states and the federal government making an agreement for the federal government to do something that it is allowed to do but the states can't or won't in exchange for the states doing something the federal government can't or won't do. If you don't like it then run for office on that plaform or support someone else to run for you."

      Well, we need the states to quit giving so much $$ to the Feds so that they can use it to blackmail them.

      ".08 isn't "drunk", but that's really not the point. The BAC limits aren't about being "drunk" which is a pretty wishy washy measurement, they're about impairment. Reasonable science indicates that alcohol impairs your ability to react as quickly and that not being able to react as quickly on the roads leads to an increase in accidents. BAC is already adjusted for build, weight and sex by the biological factors involved."

      I was more happy to support the old 0.1 BAC as impared, as that that is a much more realistic number. The .08 was pushed through by groups like MADD, whose ultimate goal is to abolish drinking.....08 is just too low. A person is still very much able to drive at .08 without problems, and that is a ridiculously low number...just a couple stiff drinks in an hour, and you can be dangerously close to the new legal limit, without actually posing a threat to anyone.

      --
      Light travels faster than sound. This is why some people appear bright until you hear them speak.........
    312. Re:But does it work? by IDtheTarget · · Score: 1

      Have you stopped to consider for a moment that I was probably under the legal limit? ... I didn't feel the slightest bit impaired when I was pulled over and was quite confident I would pass the PBT .... You can take your self righteousness and shove it up your ass. You don't know me.

      Don't I? How many of those in that class you took "didn't feel the slightest bit impaired"? They never do. I can't count the number of times I've heard "I'm just fine to drive! Give me my keys!" in a bar somewhere.

      I just pray that when, not "if", but "when", you have your DUI crash, that you hit a tree and not some poor family.

    313. Re:But does it work? by Ifandbut · · Score: 1

      iirc you can legally demand they take a blood sample if the you fail the blow test but they will still use the blow test in court.

    314. Re:But does it work? by mrchaotica · · Score: 1

      "His" would limit the scope to male programmers. "Her" would limit the scope to female programmers. "His/her" or other such bullshit is retarded. "Its" is correct.

      Bullshit. In English, "his" is the correct masculine and neuter pronoun!

      Your rule doesn't apply to English; it applies to some kind of creole of English and politically-correct bullshit.

      --

      "[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz

    315. Re:But does it work? by Anonymous Coward · · Score: 0

      It depends from state to state. Different states have different laws.

    316. Re:But does it work? by mrchaotica · · Score: 1

      Again, the worst thing that happens with fuel injectors is they break, your car doesn't run, you pay a few hundred and get it fixed.

      That's not true; excessively-out-of-spec injectors can destroy the whole engine. For example, a Diesel injector that fails to atomize the fuel (and instead releases it as a stream) can melt the piston, and a gasoline injector that gets clogged could make the mix too lean, causing detonation.

      --

      "[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz

    317. Re:But does it work? by Anonymous Coward · · Score: 0

      Look up "formal verification."

    318. Re:But does it work? by mrchaotica · · Score: 1

      Those "rules of thumb" only exist because a whole bunch of civil and structural engineers did a whole lot of research and then wrote them. Go look at the references in the building code sometime.

      --

      "[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz

    319. Re:But does it work? by just+fiddling+around · · Score: 1

      You got that right!

      I see the US does it different than in Canada: DUI is a criminal offence here, as is refusing to take the test.

      See? IANA(US)L, and it shows :-)

      --
      You're not old until regret takes the place of your dreams.
    320. Re:But does it work? by owlstead · · Score: 1

      Hey, my reply is gone. I'm pretty sure I clicked commit.

      The correct question is "why wouldn't you remember all the values". The values can be used as evidence, or other calculations can be based upon them. Only if you seriously run out of memory or if you need to have a possibly infinite amount of tests, then it makes sense to only store the intermediate value.

      Optimization is good, but should be used sparingly, and only if needed. Rugged code is more important even if it brings some overhead.

    321. Re:But does it work? by Ifandbut · · Score: 1

      Did the cop have probable cause to do a breath test?

    322. Re:But does it work? by digitalunity · · Score: 1

      No, you obviously don't know me at all.

      I know better than to drive after more than 3 drinks. You don't know drunk drivers either. I met a lot of them in my DUI classes. A lot of them blew +.15% which is beyond the realm of reasonableness. Nobody, and I mean NOBODY thinks they're sober at .15% but they drive anyway.

      You want to be pissed at drunk drivers? Start with the people who drink for 6 hours at the bar and drive home killing 2 people. Start with the people who get so drunk they pop a tire from hitting a curb on the way home and drive 3 miles on the rims without even knowing it.

      Vilifying the people who try to make responsible decisions doesn't do anyone any favors. Get off your high horse.

      --
      You can't legislate goodness. Let each to his own destiny, by will of his freely made choices.
    323. Re:But does it work? by digitalunity · · Score: 1

      The majority of alcohol related automobile fatalities are caused by two types of drivers-inexperienced young drivers who drink far more than they should and repeat offenders.

      The GP was correct. Even habitual offenders rarely cause multiple accidents with fatalities, but they do cause accidents quite frequently.

      --
      You can't legislate goodness. Let each to his own destiny, by will of his freely made choices.
    324. Re:But does it work? by mrchaotica · · Score: 1

      Timing stoplights is a good counterpoint to your example. In my experience, stop lights have horrible timing most places I go. It's almost like they're intentionally designed to make you stop at every single light, unless you drive at > 80mph on surface streets. Why is such poor performance accepted from our traffic lights? Because they're run by the government, and we the people don't have a choice.

      See XKCD, and be enlightened.

      --

      "[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz

    325. Re:But does it work? by Taibhsear · · Score: 1

      I believe the fifth amendment would disagree with you.

    326. Re:But does it work? by digitalunity · · Score: 1

      I'd had 3 beers in 2 hours. I blew a .086 on a breathalyzer that hadn't been calibrated in 2 years, so it's hard to say if I was over the limit or not.

      In any case, my point was kind of that the state refuses to take into account the subjective nature of it's evidence, even when it's self-contradicting.

      --
      You can't legislate goodness. Let each to his own destiny, by will of his freely made choices.
    327. Re:But does it work? by mrchaotica · · Score: 1

      Wow, that's really asinine!

      --

      "[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz

    328. Re:But does it work? by Eskarel · · Score: 1

      Where I live, it's .05 and people think the US is crazy to be at .08, you're a hell of a lot more impaired at .08 than you realize. You probably won't kill anyone, but ffs, as an adult male I can have at least two standard drinks without going over .05, if you're drinking enough to go over .08 make alternate arrangements. I know it's inconvenient to be without your car, but it's better than killing someone.

    329. Re:But does it work? by pnewhook · · Score: 1

      Smelling alcohol is probably cause. They can pull you over and check for this even if you are not driving erratically nor did anything else wrong.

      --
      Tesla was a genius. Edison however was a overrated hack who liked to torture puppies.
    330. Re:But does it work? by Anonymous Coward · · Score: 0

      I was on the jury of a dunk driving case not too long ago, in Ohio. Here, a man was stopped for drunk driving, had his breath tested (this was his 4th or 5th offense, making it a felony, hence the trial - otherwise it is a misdemeanor). He was taken to a holding facility where he was asked to provide a blood sample - and he refused. Apparently you're allowed to do that.

      I'm not sure if it is like that in all states and counties, but that is what happened here.

    331. Re:But does it work? by doug · · Score: 1

      This is a good time to recirculate professor's speech.

      http://www.youtube.com/watch?v=i8z7NC5sgik

    332. Re:But does it work? by Anonymous Coward · · Score: 0

      The DUI laws may not be intended to make money, but their application certainly can be.

    333. Re:But does it work? by Mister+Whirly · · Score: 1

      After living in Rio de Janeiro in the past, I came to the same conclusion. Everyone here is "on the take" as much as they are in Rio, the difference is in Rio they don't pretend that they aren't. At least they are "honest" dirty cops, lawyers, and judges.

      --
      "But this one goes to 11!"
    334. Re:But does it work? by kthejoker · · Score: 1

      Dentist's X-ray != code-driven. Except for the part where the image is transferred over to the NAS. All the rest of it is pure physics.

    335. Re:But does it work? by sexconker · · Score: 1

      "Almost certainly not correct"?
      It is correct.
      People are things.
      Everything is a thing.

      "Their" may be used as such, but it is done so incorrectly. It is wrong. It is not correct. I don't care if people are using it - that does not make it correct.

      Oh look, a shitipedia link. That's so authoritative and accurate and unbiased.

    336. Re:But does it work? by Anonymous Coward · · Score: 0

      The first thing you lose when you start getting drunk is your sense of impairment. And it starts to go at pretty low levels, around 0.03%. So, yeah, you wouldn't feel the slightest bit impaired regardless of whether you were. Also, 0.086% is way over the legal limit in a lot of places. For example, in my country, the limit is 0.05%.

    337. Re:But does it work? by sexconker · · Score: 1

      Nope sorry.
      It is the correct pronoun for all singulars.

    338. Re:But does it work? by Sancho · · Score: 1
    339. Re:But does it work? by sexconker · · Score: 1

      And how has NASA's budget situation been lately?
      In case you missed it, my comment had 2 meanings:

      1: Programmers creating perfectly engineered code are usually only doing so the include in their resume.

      2: Programmers creating perfectly engineered code will eventually be fired/let go as that practice is not economically viable. The same holds true for every good or service - cheap wins out over quality every single time.

    340. Re:But does it work? by Sancho · · Score: 1

      If they deny you that right, I wonder if you can get the case thrown out on a destruction of evidence claim.

    341. Re:But does it work? by AK+Marc · · Score: 1

      It would suck, but, at least no DWI on your record.

      Here, they would charge you with the DWI and refusal to submit to the test. And yes, refusal can be a felony if you do it repeately.

    342. Re:But does it work? by sexconker · · Score: 1

      If you allow "his" to be appropriate, you must also allow "her" to be appropriate. There is no logical reason for preference of one over the other.

      I have no problem with "his" being used, or being considered the default. I have serious issues with "his/her" and "(s)he" and alternating between the genders.

      But let's not fool ourselves. "His" is by no means correct unless the gender is known (and is male).

    343. Re:But does it work? by Anonymous Coward · · Score: 0

      Actually the stoplight example you give might be working as designed. You are assuming that the intention is to maximize traffic throughput, but the city council might have felt that it would be desirable to have cars stop at every light to keep speeds down, and increase exposure to street side businesses.

    344. Re:But does it work? by Mister+Whirly · · Score: 1

      But if the machine they use to determine that .08 reading is faulty, isn't it pretty much the same thing?

      This happened to a friend of mine about 15 years ago. He had been at a party earlier and had drank a few drinks. He then ate a huge meal, and waited several hours before he drove home - without having any more alcohol. He was pulled over on the way home by a cop who he had some previous run-ins with, and seemed to have an attitude towards my friend. (The cop had gone to high school with my friend's older brother and apparently they never got along.) After the cop pulled him over, he told my friend he had been "swerving all over the road, and crossed the center line several times". My friend told me that was bullshit, that he had been driving fine and wasn't impaired in the slightest. I was at the same party and had personally witnessed how much he had drank, and the time frame in which he had been consuming. I know he hadn't had any alcohol for at least 3 hours and had only had a few cocktails prior to that. So I have no reason to think my friend wasn't being truthful. The cop got him out and made him do the roadside sobriety tests. Which he did and passed with flying colors. The cop seemed mad about that and told my friend "I don't care if you passed those tests or not, I know you are drunk." He got out the portable breathalyzer, and had my friend blow. It came up green - meaning zero alcohol in his breath. The cop got even more mad, and said that the machine wasn't working because it was too cold (this was the middle of winter in Minnesota). He brought the machine into his car and held it in front of the heat for a few minutes, and then made my friend blow again. It came up green again. The cop insisted the machine was still not working correctly, and had my friend blow yet again. Green once more. Not to be stopped by reality, the cop once more insisted my friend blow, and this time it was yellow - meaning some alcohol in the system but not over the legal limit. Then the cop actually arrested him for DWI. Towed his car and my friend go to spend the night in jail. My friend got a lawyer and went to court, and the lawyer took the cop apart. He got all charges dismissed, AND got my friends money back he had paid in fines and towing charges. His lawyer told him he probably had a good harassment/wrongful arrest case, but my friend didn't want to pursue it any further. So after 3 blows of zero, the portable breathalyzer decided that in fact he did have some alcohol in his system. If I ever had to blow into one of those things and it said I was over the limit, (I have had to twice before and both times I hadn't had anything to drink at all and came up clean) I would get a lawyer and try to fight it. They just are not reliable enough to trust.

      --
      "But this one goes to 11!"
    345. Re:But does it work? by ClosedSource · · Score: 1

      The problem is that no analogous research can be performed for software because it's not grounded in physical laws. Potentially everything in the building code could be captured in software and it would still represent a tiny fraction of the space of possible programs.

    346. Re:But does it work? by Anonymous Coward · · Score: 0

      Ditto in Finland. And the breathalyzers the police use are actually rather accurate, though they'll always take a blood test or take an another reading with a precision breathalyzer if the initial test shows you are over the limit of 0,05%. You can pretty much choose between the precision instrument or a blood test, though by then you're already screwed.

    347. Re:But does it work? by ClosedSource · · Score: 1

      You make it sound like going to a bar is some kind of necessity like food or water. In any case, there are many countries with tougher laws where the majority of drinkers do make arrangements to be safe.

    348. Re:But does it work? by byteherder · · Score: 1

      Since I'm not an American I don't know how a drunk stop works, but here in Denmark, you get to blow on a mobile device, if it shows up as drunk you are taken to the hospital for a blood sample and only that blood sample will be used against you. Are only the mechanical readings being used in the US? Yes, the mechanical readings from the mobile device is enough to obtain a conviction in the US.

    349. Re:But does it work? by Frank+T.+Lofaro+Jr. · · Score: 1

      In Nevada they can forcibly take a blood sample from you, use it against you if high, but still suspend/revoke your license for refusal even though they did obtain it (albeit by force) and even if it is not high (a refusal penalty still holds even if you are not guilty of DUI).

      --
      Just because it CAN be done, doesn't mean it should!
    350. Re:But does it work? by ppanon · · Score: 1

      Go ahead and keep making excuses and rationalizations for your dangerous behaviour. If you hurt someone else or else you lose your licence and your insurance triples because of DUIs, your whining will get as much sympathy and attention as your rationalizations.

      --
      Laissez lire, et laissez danser; ces deux amusements ne feront jamais de mal au monde. - Voltaire
    351. Re:But does it work? by Grishnakh · · Score: 1

      Yep, traffic "engineers" don't even deserve the title "engineer", because they're either totally incompetent, or just tools for the politicians who actually determine how roads and traffic lights work. It's a profession with absolutely no honor, even worse than prostitutes.

      For instance, in many places, cities have intentionally shortened their yellow light times so that more people will run them, and get automated red-light tickets, thus generating revenue. Of course, this causes more accidents at these intersections, but the politicians don't care about that. What spineless "traffic engineer" actually implemented these timings? Engineering as a profession has a code of ethics, and traffic "engineers" have completely gone against these ethics, and so no longer can be properly called "engineers".

    352. Re:But does it work? by Grishnakh · · Score: 1

      I think having them timed this way encourages many people to drive extremely fast, in order to break the cycle.

      Also, isn't the government always harping on the need for better fuel efficiency? Having cars stop at every light kills fuel economy and greatly increases emissions.

    353. Re:But does it work? by AK+Marc · · Score: 1

      But people aren't gender neutral. They always have gender (in grammar, even if not on the daytime talkshows). So "he" is *always* correct for unknown gender. "She" is not correct. Even if it is more likey that it is a woman, "he" is still technically correct. "An unknown breast cancer survivor donated his house to the hospital." However, that last one is violated more than followed, but the grammar rules are still clear (and change much slower than the usage does). S/he, (s)he, she/he, they, etc. are all incorrect as well. Though I personally use "they". At least I know it's wrong and why I choose to use it.

    354. Re:But does it work? by Anonymous Coward · · Score: 0

      Works like that in Mexico too.

    355. Re:But does it work? by Anonymous Coward · · Score: 0

      Here in Austria it's like this:

      You have to blow into a pretest-device. If it shows you actually have drunken alcohol (it shows only yes/no but no value) you get to blow a second time into a more exact test device. If that one shows you drunk, you can demand to be taken to a hospital and a blood sample taken.

      However, if the second blowing showed you drunk, the burden to proof you are NOT drunk is upon you.

    356. Re:But does it work? by Mr.+DOS · · Score: 1

      But even MS Word isn't that bad, since so many businesses rely on it and don't have problems with random data corruption to my knowledge.

      Outlook's pst files being an entirely different kettle of fish (historically, anyway)...

            --- Mr. DOS

    357. Re:But does it work? by Grishnakh · · Score: 1

      True, but Outlook and Word are two different programs, even though they're usually part of the same suite. You're probably not going to have any serious problems writing a thesis in Word (other than it being inferior to one written in TeX), but don't ever count on Outlook keeping your emails safe.

      Of course, that's why I have no problem trusting Outlook to save all my work-related emails. If it fails and I lose all my work emails, it's not my fault, it's my stupid employer's for making me use Outlook, so any loss of productivity I can blame on someone else. Personal stuff is another matter, however.

    358. Re:But does it work? by Anonymous Coward · · Score: 0

      In Austria the Police sometimes pulls out EVERY car coming through a street, especially on Saturday nights between 22:00 and 24:00. Every driver has to blow into a pre-testing device which gives a yes/no answer.

      I have no problem with that, it is their job to find irresponsible people who operate an extremely dangerous device drunk. And even 0.03% can loosen you up a little so you start taking higher risks without being aware of them.

    359. Re:But does it work? by mzs · · Score: 1

      A lot of PID loops do this sort of average in the I term. Choose your constants right the stale data becomes meaningless soon. No it is not an average but is commonly called that.

    360. Re:But does it work? by Anonymous Coward · · Score: 0

      "The majority of crashes and deaths aren't caused by people that blow a 0.086."

      But some are. That's way more than one drink an hour. If you drink more than one drink an hour and then think you can drive, I seriously hope that you drive off a cliff and are killed before you kill me.

    361. Re:But does it work? by home-electro.com · · Score: 1

      How is it possible? If you cause an accident while DUI, you lose your license for a while, second accident -- for a loooong while. Third time you like go to jail.

    362. Re:But does it work? by digitalunity · · Score: 1

      Close but not quite.

      Take your statement to it's logical conclusion-habitual DUI offenders drive without licenses and insurance. Scary, but true.

      In most states, second DUI's have mandatory minimum sentences. In Washington, a self proclaimed "strict DUI" state, I observed a person being sentenced for their 6th DUI for only 180 days in jail. Of course, a person like that may have their license revoked permanently, but it apparently doesn't stop them.

      --
      You can't legislate goodness. Let each to his own destiny, by will of his freely made choices.
    363. Re:But does it work? by bh_doc · · Score: 1

      Hehe, the impotent vitriol of your reply is cute. I'm guessing, but I suspect that most people would think referring to a person as "it" is awkward and/or derogatory, whereas referring to a person as "they" (while maybe suboptimal in preference of "he" or "she") is acceptable and relatively common for gender-unknown/unknowable contexts. So this makes me curious: At what point does the use of any particular construct within an evolving language, such as English, become "correct" usage? When you say so?

    364. Re:But does it work? by Anonymous Coward · · Score: 0

      Get pulled over and accused of being intoxicated,
      Refuse the breathalyzer test and/or monkey dance,
      Leave my car by the side of the road,
      Have the officer detain and transport myself to the station,
      Spend a few hours there to take a test to prove my innocence,
      Make my way back to my vehicle(possibly call a taxi/friend unless the officer decides to transport back to it).

      Yeah, that's how I want to spend my time.

    365. Re:But does it work? by cayenne8 · · Score: 1
      Well, it is the best place to go get laid.

      and...it isnt' like we're talking about other countries...this is the US we're talking about.

      --
      Light travels faster than sound. This is why some people appear bright until you hear them speak.........
    366. Re:But does it work? by Tuoqui · · Score: 1

      99% of DUI suspects know nothing of their rights.

      99% of DUI suspects shouldn't have been drinking otherwise they might have the capacity to exert their rights.

      That said, up here in Canada we have police set up random checkpoints to catch DUIs. I'm as anti-laws as anyone but it makes sense that police would be able to stop someone and check them out if they are operating a motor vehicle and your right to drive drunk ends when you touch the public streets (and usually run over pedestrians or smash into other peoples cars)

      --
      09F911029D74E35BD84156C5635688C0
      +2 Troll is Slashdot's way of saying groupthink is confused
    367. Re:But does it work? by ClosedSource · · Score: 1

      "Well, it is the best place to go get laid."

      So you hear.

    368. Re:But does it work? by digitalunity · · Score: 1

      I'm not anti-law and I called my DUI a farce because nobody in the criminal justice system from police, to DA's to judges want to hear evidence that exculpates the suspect. My plea arrangement was for 8 hours community service, alcohol awareness classes and an $1100 fine. If I went to trial, I could have faced 90 days in jail.

      I call it a farce because the entire system is designed to force you into plea deals with fines and community service so you can avoid the possibility of disproportionately large jail sentences. Even my lawyer recommended the plea deal because he said the lack of calibration on the breathalyzer would be ignored at trial and I would go to jail.

      If the system really were about justice and protecting the public, they would use real jail sentences against the repeat offenders. When I was in court, I saw a 4th time offender being sentenced for like 90 days in jail. If they really thought 90 days in jail was "justice" for myself, a first time offender, they wouldn't offer 8 hours community service instead and give the 4th time offender 90 days in jail. I guess more succinctly, if 90 days in jail is "justice" for a 4th time offender, why is it also justice for a 1st time offender? By my calculations, the state of Washington makes something like $800,000 a week in DUI fines alone and another $50 per month from each offender with a case pending completion of a sentence. The average DUI offender spends about 8 months finishing their sentence(usually alcohol classes or probation), so that's another $400 per offender approximately.

      DUI's are big business.

      ps. Canada won't let me in until 2015 for vacation because of my DUI.

      --
      You can't legislate goodness. Let each to his own destiny, by will of his freely made choices.
    369. Re:But does it work? by Thinboy00 · · Score: 1

      [snip a lot]

      Fixed your wording and added back in a comma that belongs there. All of those words are describing the word "pronoun," thus they all belong.

      It isn't a serial comma -- there's no conjunction in the list.

      --
      $ make available
    370. Re:But does it work? by sexconker · · Score: 1

      Yes, when I say so.

      Barring my availability to make a ruling, you may refer to the actual definitions of the words you are using.

    371. Re:But does it work? by Ihlosi · · Score: 1
      Dentist's X-ray != code-driven.

      Err, are you sure? (e.g. did you design one?).

      I'd assume there's plenty of firmware (i.e. code) in these things, managing the user interface (even if it's just a handful of buttons), exposure times, etc.

  2. Lint is crap by xenocide2 · · Score: 1, Insightful

    Lint, as a static code analyzer, is bound to have false positives. More so in embedded systems, where you're dealing with registers and occasionally "violating" type safety where no type adequately exists. It's really not super surprising that 60 percent of the code is reported by Lint.

    --
    I Browse at +4 Flamebait

    Open Source Sysadmin

  3. Coding Standard by Jack9 · · Score: 1, Interesting

    nor is it written to any defined coding standard

    Er, why would it need or be expected to be? It's a commercial product. I don't think most bank websites are "coded" to any specific standard either.

    --

    Often wrong but never in doubt.
    I am Jack9.
    Everyone knows me.
    1. Re:Coding Standard by Anonymous Coward · · Score: 0

      To look at a different kind of code, how does US legal code work? It is a patchwork which is only rarely organized into a coherent structure, but it usually gets us through our daily routine. Though I guess we would benefit from open source legal code.

    2. Re:Coding Standard by kailoran · · Score: 4, Insightful

      Because the output is used as evidence in court?

    3. Re:Coding Standard by SirGeek · · Score: 3, Insightful

      Er, why would it need or be expected to be? It's a commercial product. I don't think most bank websites are "coded" to any specific standard either.

      From the article:

      1. The Alcotest Software Would Not Pass U.S. Industry Standards for Software Development and Testing: The program presented shows ample evidence of incomplete design, incomplete verification of design, and incomplete "white box" and "black box" testing. Therefore the software has to be considered unreliable and untested, and in several cases it does not meet stated requirements. The planning and documentation of the design is haphazard. Sections of the original code and modified code show evidence of using an experimental approach to coding, or use what is best described as the "trial and error" method. Several sections are marked as "temporary, for now". Other sections were added to existing modules or inserted in a code stream, leading to a patchwork design and coding style.

      Ok. Would you want to have something that can cause you to get convicted because it wasn't documented or even tested fully - ("Oh, Crap. That constant should have been 0.001, not 0.01. Ooops. Blood Alcohol level was 0.008, not .08. Sorry !")

      Common sense (if it WERE common) should indicate that there should be full tests for a wide range of values performed with the written tests and expected values verified and available to prove that the device/software actually does detect the proper levels of alcohol.

    4. Re:Coding Standard by 0100010001010011 · · Score: 2, Interesting

      Some of this stuff is elementary math.

      2. 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 .... the comments say that the values should be averaged, and they are not.

      It's been a while but didn't the teacher in 5th grade show you why that wouldn't work?

      Or how about this:

      The A/D converters measuring the IR readings and the fuel cell readings can produce values between 0 and 4095. However, the software divides the final average(s) by 256, meaning the final result can only have 16 values to represent the five-volt range (or less), or, represent the range of alcohol readings possible.

      Who the hell didn't pay attention in the A/D quantization error in controls class?

      I don't want to fill my whole comment with copy and paste from TFA, but not only is this a code standard issue. It's just plain stupidity. Error checking, out of range checking all sound like something a first year programmer should have gotten right.

      I can't say all my MATlab and CANape scripts look pretty or are up to any coding standards, but I try to at least get the basic shit right.

    5. Re:Coding Standard by Anonymous Coward · · Score: 0

      I think you are think of trade standards (e.g., Mizra, DO-178B, DEFSTAND, etc.). I took it as they had no standards and conventions they followed. Any piece of code of significant size SHOULD follow some convention for conformity and consistency. That's just good coding practice. Every project or software shop MUST have a standards and conventions document that explains what processes are to be following in developing code. That is software engineering 101.

    6. Re:Coding Standard by Yold · · Score: 1

      Errors crashing a bank website result in loss of dollars, a false negative (drunk but they let you go) reading from a Breathalyzer may result in a drunk driver killing someone.

      U.S. Military, FAA, and other government organizations have coding standards for commercial products, why should a device intended to gather evidence and promote public safety be unregulated? Especially in this case, where the device can unrecoverable fail due to a logic-error, and not report that such an error occurred?

    7. Re:Coding Standard by Anonymous Coward · · Score: 0

      Wow, please tell me the products you work on so I can be sure to avoid them. Not that you're wrong about whether it's expected, but that rather than say something like "The current casualness of the software engineering for systems playing huge roles in our lives - voting, medical software, breathalyzers - is really disturbing." you make it sound like it's okay because most everyone else writes without standards.

      When I hear stuff like this, it makes me more heavily in favor of turning software engineering into a legitimate profession with testing, standards of conduct, and training requirements such as coursework or internships. Unlike with doctors, I think we should allow unlicensed software engineers but all products would need to be clearly labeled whether or not they were made by professionals (which would effectively hold them responsible if standards were not met). I think it would be good for everyone, and it'd help companies make a clear decision about whether they value quality in their software.

    8. Re:Coding Standard by Reece400 · · Score: 1

      Well, depending on whose money is lost with the website problems, I could see a lot of bankers in fear for their lives.

    9. Re:Coding Standard by Fulcrum+of+Evil · · Score: 1

      Errors crashing a bank website result in loss of dollars, a false negative (drunk but they let you go) reading from a Breathalyzer may result in a drunk driver killing someone.

      U.S. Military, FAA, and other government organizations have coding standards for commercial products, why should a device intended to gather evidence and promote public safety be unregulated? Especially in this case, where the device can unrecoverable fail due to a logic-error, and not report that such an error occurred?

      No, a false negative may result in someone blowing a .09 and walking. A real drunk has more against him than a magic box. Meanwhile, a false positive could mean that someone at .05 loses their job without cause.

      --
      "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
    10. Re:Coding Standard by Man+On+Pink+Corner · · Score: 1

      Who the hell didn't pay attention in the A/D quantization error in controls class?

      Oh, I'm sure they paid attention to quantization. Digital readings look more consistent, and hence more trustworthy, when you lop off a few LSBs. Stable and repeatable readings are much more important than accurate ones in the law-enforcement business.

    11. Re:Coding Standard by AK+Marc · · Score: 1

      a false negative (drunk but they let you go) reading from a Breathalyzer may result in a drunk driver killing someone.

      That should never be the case. If the person is drunk, the cop is supposed to be able to tell without the tools, but the tools help to get the conviction. If someone is stumble-down drunk and blows a .05, the cop will hold them anyway, even if they can't be charged with drunk driving. They will either charge them with public drunkenness (which doesn't require a specific BAC in most places) or hold them on suspicion of other drugs and wait for the blood tests to come back. Yes, if someone was .08 exactly and it read .07 and they were let go there may be a problem, but the ability to drive isn't impaired until about .1 to .15 in most people (though judgement does start to go as low as .05, which is why the limit is lower than where it affects them physically).

    12. Re:Coding Standard by 0100010001010011 · · Score: 2, Insightful

      An example of a DUI conviction using 5 numbers (Assuming 0.10 for simplicity):

      Say the breathalyzer gets 5 numbers: [0.0625,0.0625,0.1,0.12,0.15].

      If you average the numbers you get 0.099. However if you do a 'rolling' average, you get 0.13. Quite a bit of difference (not to mention, legal vs not legal).

      Now imagine that last number was a burped packet of gas that had a ton of alcohol in it and was a 0.25.

      Instead of the average being 0.119 (yes still illegal) it's now .18, at which point you hear on the news "he was nearly twice the legal limit!".

      (Although playing with the numbers, it looks like the site is wrong, it incorrectly weights the later numbers because one wild number can instantly pull it up very high, or low.)

    13. Re:Coding Standard by honkycat · · Score: 1

      That raises the question as to why law enforcement organizations are permitted to buy commercial products. The need for traceable, reliable products ought to compel compliance with a serious standard, where designs are adhered to, testing is complete, etc.

    14. Re:Coding Standard by Jack9 · · Score: 2, Interesting

      Lots of evidence in court (like say, testimony) are not held to a documented standard. That isn't a very good argument imo.

      --

      Often wrong but never in doubt.
      I am Jack9.
      Everyone knows me.
    15. Re:Coding Standard by Jaysyn · · Score: 1

      If you can't walk a straight line they aren't going to let you go no matter what the breathalyzer says.

      --
      There is a war going on for your mind.
    16. Re:Coding Standard by 0100010001010011 · · Score: 1

      More maths, sorry to reply to myself.

      So, it is knocked down to 16 states. Say the full scale of the breathalyzer is .40. I bet it's higher because well you don't want to saturate...

      That means each 'bit' is worth .025. "Illegal" is only 4 bits. 4. Not to mention sensor drift, hysteresis, dead band. Say the thing cold cals itself to 1 bit, you now have 3 bits left in which to be legal, and that's assuming that's right.

      The more I read this, the more pissed off I get about this whole situation. I seriously want

    17. Re:Coding Standard by PitaBred · · Score: 1

      I'd bet your MATlab and CANape scripts aren't responsible for ruining people's livelihoods and lives if they're wrong, either.

    18. Re:Coding Standard by kloot · · Score: 1

      Breathalyzer tests are valid evidence in US Courts? This is news to me, afaik here in Germany these tests are just used as an approximation (if you are under the limit on a breathalyzer test they let you drive, if it is close or you are over the limit they have to do a blood test). It's the same with these cheapo drug testers here.

    19. Re:Coding Standard by Anonymous Coward · · Score: 0

      False negatives are not an issue. If you can't pass the field sobriety test, it does not matter what BAC reading you got, you will still be arrested.

      On the other hand, if you only had one beer but the BAC result is too high, you are going to be tried and convicted.

    20. Re:Coding Standard by Anonymous Coward · · Score: 0

      As someone who works for a company that writes software banks use;

      We have pretty strenuous standards. There's a small manual just for code style, and we go through a standardized process for peer review, release management, etc. That's before we have to start including the federal (and international) requirements.

      You know that thing from office space/superman III/elsewhere, where they steal fractions of cents? You could totally do that. The problem is that it would be logged 8 times on every machine/financial network it has to pass through to get there. You can trace every fraction of every cent. People do. Banks get upset about that sort of thing.

      On the downside; all the focus on code quality means that low-priority features (like making the html look pretty, or using css at all) just doesn't happen that often. Don't be surprised if your bank website looks like it was written in 1995. It probably was. Only the backend code gets alot of attention.

      Of course, FI's don't like things to look like they change either - thus the big concrete buildings. The whole semblance of permanency. It's a mindset thing.

    21. Re:Coding Standard by 0100010001010011 · · Score: 1

      Depends if I get a calibration wrong. Your steer by wire could have gains too high and drive you through a wall at highway speeds...

    22. Re:Coding Standard by Alpha830RulZ · · Score: 1

      Playing devil's advocate here, Breathalyzer tests are commonly followed up by blood tests. If the breathalyzer were commonly off by significant, unexplainable magnitudes, there should be abundant data to this effect.

      Not defending the company or the code by any means. But the absence of this data is interesting.

      --
      I was taught to respect my elders. The trouble is, it's getting harder and harder to find some.
    23. Re:Coding Standard by Alpha830RulZ · · Score: 1

      I work with a lot of 20 year programmers that don't get this right. I hate to say it, but this level of quality may be rarely in the business world than you think.

      --
      I was taught to respect my elders. The trouble is, it's getting harder and harder to find some.
    24. Re:Coding Standard by Grishnakh · · Score: 1

      Over there in Germany, you've already been through a period in your history where the government took away all your rights, and disaster ensued. As a result, you probably have some pretty strong protections for many rights.

      Here in the USA, we haven't been through that, so we're having all our rights taken away and no one's noticing yet, except for a few people who are called "militants" because vote for the Libertarian or other non-mainstream parties, don't agree with the Federal Reserve, or other non-politically-correct views. We still have documents, like the Constitution, which guarantee our rights, but the government completely ignores them, and no one holds them accountable for it.

    25. Re:Coding Standard by Anonymous Coward · · Score: 0

      FWIW, 0.40% BAC = likely death. Unlikely you'll be operating a motor vehicle without a heartbeat & brain activity.

    26. Re:Coding Standard by Anonymous Coward · · Score: 0

      sorry to burst your bubble, but matlab could be written in exactly the same way as this POS breathalyzer, lets hope not, also matlab doesnt have dangerous things like malloc or naughty things like dynamic casts does it?

    27. Re:Coding Standard by Jack9 · · Score: 1

      That raises the question as to why law enforcement organizations are permitted to buy commercial products. The need for traceable, reliable products ought to compel compliance with a serious standard, where designs are adhered to, testing is complete, etc.

      THIS THIS THIS

      --

      Often wrong but never in doubt.
      I am Jack9.
      Everyone knows me.
    28. Re:Coding Standard by colinrichardday · · Score: 3, Insightful

      Testimony is subject to cross-examination (at least in the US). Opposing counsel has the opportunity to exploit weaknesses in the witness's testimony. Also, the witness is subject to prosecution for perjury for lying. What penalty does a faulty (if it be faulty) device face?

  4. Ballmer Peak by Anonymous Coward · · Score: 2, Funny

    Clearly their programmers were not drunk enough when making this. Or, they were too drunk.

    1. Re:Ballmer Peak by Anonymous Coward · · Score: 3, Funny

      Clearly their programmers were not drunk enough when making this. Or, they were too drunk.

      How else would you suggest they test whether or not it works? Huh, smartguy?

    2. Re:Ballmer Peak by mkiwi · · Score: 1

      Clearly their programmers were not drunk enough when making this. Or, they were too drunk.

      They've got to test it on someone.

    3. Re:Ballmer Peak by Anonymous Coward · · Score: 0

      Yep, the public

  5. Code by Quiet_Desperation · · Score: 5, Insightful

    not written well, nor is it written to any defined coding standard

    Ah, so it's like most of the code in the world.

    1. Re:Code by Anonymous Coward · · Score: 1, Insightful

      except that this code is used to convict people.

    2. Re:Code by Cajun+Hell · · Score: 1

      Ah, so it's like most of the code in the world used to convict people.

      --
      "Believe me!" -- Donald Trump
    3. Re:Code by Anonymous Coward · · Score: 0

      not written well, nor is it written to any defined coding standard

      Ah, so it's like most of the code in the world.

      If the code can send you to jail (or elect a President, or crash a plane), then you'd want something at a slightly higher standard.

      "Everyone else does it" isn't good enough either.

    4. Re:Code by bill_kress · · Score: 1

      Or vote, or run your pacemaker.

      "Code" is in a pretty frightening state. I've worked on embedded systems and larger systems, and have noticed something kind of interesting.

      Code for embedded systems is often pretty horrific. They get away with it because they have a limited number of inputs and can test pretty much every possible combination. If you test them all and your product can get through without failing, chances are the bugs won't be very visible.

      When the really hard issues are found like memory leaks or threading problems, the manufacturer can take an approach like "Force a reboot" instead of messing with the mess.

      The larger non-embedded systems tend to be a little better written because there are usually too many combinations to test.

      But over all, there are very few people out there producing "Good" code--and if you think about it that makes sense. How many basketball players (out of all the players in the US) play a truly better game? What percentage of painters in history have made truly good paintings?

      Programming is an art, and you can't really expect much better. Every programmer wants to think they are one of the good ones, just like I'm sure every painter aspires to have a permanent place in a world-class museum.

      So I guess this is just another call for getting the code for these important systems out there. Although there aren't many true artists out there, I've seen many cases of iterative improvement as more eyes looked at and revised a routine. If something is critical to the operation of our state, government, health or safety then we should all be able to validate it.

      The best basketball team out there isn't going to do much against a team made up of 5000 average players where each player can contribute only that one perfect lucky shot.

  6. Good! by SanityInAnarchy · · Score: 4, Insightful

    Ok, I'm not happy that some people almost certainly were measured inaccurately by these things. I'm not happy that this company was allowed to pull this kind of shit -- when you do government contracting, the government should own what you do.

    However, I am very glad that the precedent has been set.

    And I am especially glad that not only is there precedent, but there's a real live example of why we need this stuff to be open.

    --
    Don't thank God, thank a doctor!
    1. Re:Good! by Red+Flayer · · Score: 5, Insightful

      when you do government contracting, the government should own what you do

      But they weren't doing government contracting. The produced a good that was purchased by the government. There's a very big difference.

      The key here is not that the government, or anyone, should own what they produced -- it's that when what they produced is used to convict someone, that person has the right to examine the methods used.

      It's not about openness, at all. It's about the right to a fair trial; openness is just a side effect.

      --
      "Trolls they were, but filled with the evil will of their master: a fell race..." -- J.R.R. Tolkien on Olog-hai
    2. Re:Good! by Reality+Master+201 · · Score: 1

      It's not about openness, at all. It's about the right to a fair trial; openness is just a side effect.

      If you're relying on a machine to give evidence that's (for all intents and purposes) sufficient to convict someone of DUI, openness is a pre-requisite for conducting a fair trial.

    3. Re:Good! by Midnight+Thunder · · Score: 3, Insightful

      The key here is not that the government, or anyone, should own what they produced -- it's that when what they produced is used to convict someone, that person has the right to examine the methods used.

      I will call out the company for doing shoddy work. The question is whether the device was ever certified for the purpose, and if it was who did it and what was the process used. If you are going to use something to prosecute, then there needs to be evidence that the device was tested and certified using a publicly documented process. This is black box testing and if the government never did it, then why is it allowed in court?

      --
      Jumpstart the tartan drive.
    4. Re:Good! by NecroPuppy · · Score: 1

      when you do government contracting, the government should own what you do.

      Please don't speak about things you know nothing about, as is obviously the case here.

      Government procurement is a difficult and arduous process (and often quite arcane from the outside). When the government has hardware or software produced (i.e., not COTS items), depending on the nature of the contract, they can acquire various levels of data rights and data access.

      Often, industry will have patents, trade secrets or copyrights involved, and it depends on the needs of the program (and their level of funding) as to how much access (or even ownership) the government will have to that data.

      In this particular case, which government would you suggest purchase the code? Some state level government? The Federal Government? Neither have any need to; this is a service item, which no level of government needs ownership over.

      However, since it is used in law enforcement, I have no issue with independant validation and verification of the code and device.

      --
      I like you, Stuart. You're not like everyone else, here, at Slashdot.
    5. Re:Good! by silas_moeckel · · Score: 1

      For the same reason if they are using some boxed "forensic" software and want to use that in court they should have to provide source or not use the evidence the state wants to have it's "expert" witness without allowing cross examination. I've worked with the FBI and they seem to love the click her forensic software, they were stumped by a .tgz file and a dd of a drive. The secret service on the other hand has it together I guess it takes a bigger brain to finding counter fitters and things the state dept asks them to look into than the FBI has a budget for.

      --
      No sir I dont like it.
    6. Re:Good! by Anonymous Coward · · Score: 0

      Don't worry. Your opinion on this matter has been carefully registered by a Diebold machine.

      Thanks for participating in democracy!

    7. Re:Good! by Just+Some+Guy · · Score: 1

      But they weren't doing government contracting. The produced a good that was purchased by the government. There's a very big difference.

      If you're talking about dress shoes or tires, sure. When the government is your company's sole customer, then you are a de facto government contractor.

      --
      Dewey, what part of this looks like authorities should be involved?
    8. Re:Good! by Americano · · Score: 1

      I think his point was - you have no "right to openness" recognized under the law. You do, however, have the recognized right to a fair trial.

    9. Re:Good! by dissy · · Score: 1

      This is black box testing and if the government never did it, then why is it allowed in court?

      I've always wondered why their 'magical' box could say I was guilty and it be acceptable, yet when my equally magical box says I am not, as well as saying I am not guilty beyond any doubt what so ever, they don't believe it...

      My evidence is as made up as theirs, yet treated different :{

      For the record, I can't drink alcohol due to medical reasons, let alone have been convicted by one of their breathalysers. But I've always been (justifiably) scared one day their 'magic' box will say I am, despite multiple doctors saying that would have killed me...

      Evil govt 1 - Humanity 0

    10. Re:Good! by DarkOx · · Score: 1

      I think when it comes to a trial "what's fair" has openness at its very core. I don't think you can have fairness without openness. How can a trial ever be fair if one side is allowed to manufacture evidence just by buying some little black boxes.

      it's that when what they produced is used to convict someone, that person has the right to examine the methods used.

      The natural corralling would be: That which is not open to the examination of the accused can not be used to convict.

      I think that is totally correct for a justice standpoint. You have the right to cross examine a whiteness that should not be denied you just because the whiteness is a mechanical device.

      --
      Repeal the 17th Amendment TODAY! Also Please Read http://www.gnu.org/philosophy/right-to-read.html
    11. Re:Good! by Bourbonium · · Score: 1

      Ever hear of red light cameras that take a photo of your license plate and send you a ticket in the mail if you run a red light? Ever hear about how many cities calibrate their yellow light timers to 4 seconds instead of the legally required 6 seconds just so that camera will take more photos and generate more ticket revenue for the city? Who certifies these cameras?

      Right. No one does.

    12. Re:Good! by Midnight+Thunder · · Score: 1

      Ever hear of red light cameras that take a photo of your license plate and send you a ticket in the mail if you run a red light? Ever hear about how many cities calibrate their yellow light timers to 4 seconds instead of the legally required 6 seconds just so that camera will take more photos and generate more ticket revenue for the city? Who certifies these cameras?

      IANAL, so I would be curious to know whether the lack of certification could be used as credible doubt? Show me a picture of me going through the red light, rather than something saying I went through the light, and I would have a hard time proving otherwise.

      --
      Jumpstart the tartan drive.
    13. Re:Good! by Dhalka226 · · Score: 1

      The key here is not that the government, or anyone, should own what they produced -- it's that when what they produced is used to convict someone, that person has the right to examine the methods used.

      The real problem is that breathalyzers are allowed to convict anybody to begin with. Even if they have the most beautiful, pristine code in the world and perfectly implement every algorithm they're still prone to inaccuracies, because they assume conditions about the human body necessary to make the algorithms work. While there are "normal" values for these measurements, the very act of calling them "normal" means that there are people out there whose measurements do NOT fall into that range. A breathalyzer is little more than an educated guess as to your Blood Alcohol Content (BAC) based on the amount of alcohol measured in your breath.

      That means that in addition to being inaccurate, it's entirely possible to take two breathalyzer tests from two different devices made by two different companies at (essentially) the same time and get different results. And the closer you are to whatever the state's legal limit is, the more important those differences become.

      By all means, police should carry breathalyzers. They should administer such at the sides of the road if they suspect a driver is DUI. Then they should draw blood. There are portable kits if it's important for the officer to draw blood at exactly that instant (in the rare cases it's an extremely long drive back to the station I guess); you could roll a paramedic to do it; you could bring them back to the station and have a doctor do it. Whatever. The idea that the breathalyzer should be allowed as conclusive evidence when it's demonstrably not is foolhardy, and that's without any of the issues that opening this source code up revealed to us.

      Let's knock this crap off. You want to convict somebody based on their BAC, measure their BAC. I don't think that's unreasonable.

    14. Re:Good! by Anonymous Coward · · Score: 0

      What cause was given for administration of the test? What got you pulled over in the first place?

    15. Re:Good! by Nevyn · · Score: 1

      I would bet that, if it came up, pleading "Your evidence is crap, because if true I would be dead" would get you off.

      --
      ustr: Managed string API with ave. 44% overhead over strdup(), for 0-20B
    16. Re:Good! by Red+Flayer · · Score: 1

      The natural corralling would be: That which is not open to the examination of the accused can not be used to convict.

      That's the entire basis of this appeal... the defendant did not have the opportunity to examine the tools used to convict him. It's a fundamental principle in the US that defendants are given the opportunity to cross-examine witness, examine material evidence, etc.

      --
      "Trolls they were, but filled with the evil will of their master: a fell race..." -- J.R.R. Tolkien on Olog-hai
  7. Watch those comments... by tcopeland · · Score: 2, Funny

    ...from the article:

    Several sections are marked as "temporary, for now".

    So, make sure to strip out those TODOs before checking in the code. Bah!

    1. Re:Watch those comments... by Facegarden · · Score: 1

      ...from the article:

      Several sections are marked as "temporary, for now".

      So, make sure to strip out those TODOs before checking in the code. Bah!

      As opposed to, you know, "temporary, forever." ;)
      -Taylor

      --
      Worldwide Military budgets: $2100 billion. Worldwide Space Exploration budgets: $38 billion. Really, world? Really?
    2. Re:Watch those comments... by orzetto · · Score: 1

      Several sections are marked as "temporary, for now".

      ... As opposed to "we'll make this temporary later"? O_o

      --
      Victims of 9/11: <3000. Traffic in the US: >30,000/y
  8. No surprise by infinite9 · · Score: 4, Insightful

    80% of the code in business fits this description. With 20 year old legacy code written by 50 consultants, then upgraded in India, then ported from one platform to another to another, and a database engine switch or two. Code gets senile. What do they expect? Good thing we're all just commodities... human lego bricks easily replaced with cheaper plastic.

    --
    Disconnect your television. Do your own research. Draw your own conclusions. They're probably lying. Don't be a sheep.
    1. Re:No surprise by gEvil+(beta) · · Score: 1

      Good thing we're all just commodities... human lego bricks easily replaced with cheaper plastic.

      Speak for yourself. I'm a Duplo.

      --
      This guy's the limit!
    2. Re:No surprise by guruevi · · Score: 1

      At some point it's better to just rewrite the thing from the ground up. Especially once you start moving platforms (if your code is architecture specific enough like a kernel) or definitely when you start moving between languages (when you start integrating somebody else C code in what used to be another one's Perl script).

      --
      Custom electronics and digital signage for your business: www.evcircuits.com
    3. Re:No surprise by infinite9 · · Score: 1

      At some point it's better to just rewrite the thing from the ground up. Especially once you start moving platforms (if your code is architecture specific enough like a kernel) or definitely when you start moving between languages (when you start integrating somebody else C code in what used to be another one's Perl script).

      This is obvious to developers, but a completely alien idea to business users or executives. To them, that 20 year old crap application is a valuable asset. And to suggest that they throw it out and replace it is like suggesting that they burn down their office building and buy a new one.

      I'm really getting jaded with this whole IT thing. I'm seriously considering moving to a small town and doing something completely different. Maybe I'll be a mail man, or open my own auto shop.

      --
      Disconnect your television. Do your own research. Draw your own conclusions. They're probably lying. Don't be a sheep.
    4. Re:No surprise by Anonymous Coward · · Score: 0

      80% of the code in business fits this description.

      Yeah, but how much of that code's entire purpose is to decide if someone is a criminal?

      The precedent that needs to be set here is any code used to produce evidence must be open for inspection. This should be a straight corollary of "justice must be seen to be done".

    5. Re:No surprise by Chmcginn · · Score: 1

      I'm really getting jaded with this whole IT thing. I'm seriously considering moving to a small town and doing something completely different. Maybe I'll be a mail man, or open my own auto shop.

      I decided IT was for the birds, and that doing more hands-on electrical work was a much better idea. And then I got picked to troubleshoot PLC systems...

      If you want to see some god-awful code, try working on fifteen year old monitoring system for a thirty year old generator.

      --
      Have you been touched by his noodly appendage?
    6. Re:No surprise by legirons · · Score: 4, Insightful

      80% of the code in business fits this description

      how much of that code is given police powers to arrest someone?

    7. Re:No surprise by rho · · Score: 1

      And to suggest that they throw it out and replace it is like suggesting that they burn down their office building and buy a new one.

      That's because it's practically the same thing. The IT landscape is littered with failed ground-up programming redesigns, many of which killed the company that owned them.

      Which is not to say that it can't or shouldn't be done. But it is hard to do, and extremely hard to do well. Hell, just redesigning a Web site's look and feel can be a real bear. A manager is wise to look askance at any developer who insists that the codebase be rewritten from scratch. And the first thing the manager should look at is the developer's resume to see if he has ever actually rebuilt anything from the ground up.

      --
      Potato chips are a by-yourself food.
    8. Re:No surprise by Anonymous Coward · · Score: 0

      Speaking as someone who's installed network cabling for a living, I can tell you, I wish more office buildings would burn down so new ones could be built. They have many of the same problems, mainly that the architecture and engineering didn't take into account what could come in the future (how could they know?) and so new stuff gets kludged into place where you can make it fit. It doesn't take long for it to turn into an unmaintainable mess.

    9. Re:No surprise by hondo77 · · Score: 2, Funny

      80% of the code in business fits this description. With 20 year old legacy code written by 50 consultants, then upgraded in India, then ported from one platform to another to another, and a database engine switch or two. Code gets senile.

      Ah, a co-worker!

      --
      I live ze unknown. I love ze unknown. I am ze unknown.
    10. Re:No surprise by PPH · · Score: 1

      And how much flys airplanes, switches train tracks, runs air traffic control systems, monitors fuel pipelines, etc.?

      Management won't fund efforts to clean up code. Just patch it one more time and we'll fix it the next time around. We promise.

      --
      Have gnu, will travel.
    11. Re:No surprise by Anonymous Coward · · Score: 0

      Quite a lot actually. I can't explain what I do due to various NDA & security agreements but I've seen mountains of shitty code that could cause some serious legal problems for people and businesses... it also scares that crap out of me that:
      a) Code like this exists in most important finance areas of civic and provincial government
      b) The atomic particles of my tax dollars paid for most of it

      Next time you look at a billing statement or an invoice remember that there is a barely functioning conglomeration of chewing gum and bailing twine holding it together, all built by the lowest bidder.

    12. Re:No surprise by Zero__Kelvin · · Score: 1

      "80% of the code in business fits this description."

      80% of the code "in the business" can erroneously take away a person's freedom? WOW!!!! I have to remember that statistic!

      --
      Guns don't kill people; Physics kills people! - John Lithgow as Dick Solomon on Third Rock From The Sun
    13. Re:No surprise by jyx · · Score: 1

      80% of the code in business fits this description

      how much of that code is given police powers to arrest someone?

      20%

    14. Re:No surprise by Anonymous Coward · · Score: 0

      And how much flys airplanes, switches train tracks, runs air traffic control systems

      These sort of safety critical systems usually
      a) Are coded in some sort of 'provable' language
      b) Are coded to recognized safety standards
      c) Are tested rigourously

      They are *not* produced like other software. This doesn't make them perfect; they are still vunerable to a specification error for example, but airlines, for example, know the massive costs and liabilities resulting from a failure and thus are willing to spend more for high quality software.
      In the breathalyser case, failure is typically not obvious and the company thought that as long as they kept their crappy software secret no-one could ever prove it was faulty.
      Clearly the breathalyser software (since if faulty it can ruin peoples lives) should be held to a similar standard to safety critical systems. But it's a lot easier to be cheapskate about it and cover this up.

    15. Re:No surprise by Ihlosi · · Score: 1

      Clearly the breathalyser software (since if faulty it can ruin peoples lives) should be held to a similar standard to safety critical systems.

      If failure doesn't kill or injure people, it's not safety-critical. Sorry. And a breathalyzer doesn't find people guilty - that's still the job of a judge or jury.

      If you hold any software that could "ruin peoples lives" if faulty to the same standards as software that will kill or maim people if faulty, why don't you start with current operating systems and office software?

    16. Re:No surprise by Anonymous Coward · · Score: 0
      80% of the code in business fits this description.

      Definitely not critical code written by NASA, or by aircraft manufacturers. It does not have to be written that way, it MUST NOT be that way.

    17. Re:No surprise by zen-theorist · · Score: 1

      Go ahead and mod me flamebait, but what does India have to do with this?

      Can you cite some research indicating Americans write far better code than Indians?

  9. asus notebook by Anonymous Coward · · Score: 0

    I don't think most bank websites are "coded" to any specific standard either.

    http://www.myshop.com.tr

  10. not written to a coding standard? by AliasMarlowe · · Score: 2, Insightful

    Just because code is not written to some official standard does not mean it is guaranteed to be buggy. Undisciplined coding is as bad as undisciplined specifications - results can indeed be ugly. It is preferable if the coders follow good practices, and there ideally would be a clear system for specifying program behaviour in testable ways. It is easier to produce good code with robust behaviour if good practices are followed from design through coding to testing and documentation, but it is not impossible to achieve good results in other ways also.
    Did they find any coding bugs, or did they just criticize the approach to coding?

    --
    Those who can make you believe absurdities can make you commit atrocities. - Voltaire
    1. Re:not written to a coding standard? by Anonymous Coward · · Score: 0

      Surprisingly, the lack of standards is just one of several stated criticisms, and if you RTFA you'd see more details.

    2. Re:not written to a coding standard? by SanityInAnarchy · · Score: 5, Insightful

      Did they find any coding bugs,

      Yes. RTFA.

      2. 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.

      There you go. It's also inaccurate:

      The A/D converters measuring the IR readings and the fuel cell readings can produce values between 0 and 4095. However, the software divides the final average(s) by 256... Further, because of an attribute in the IR calculations, the result value is further divided in half. This means that only 8 values are possible for the IR detection...

      And, if there were a catastrophic bug, you wouldn't know it, you'd just keep getting readings:

      An interrupt that detects that the microprocessor is trying to execute an illegal instruction is disabled, meaning that the Alcotest software could appear to run correctly while executing wild branches or invalid code for a period of time. Other interrupts ignored are the Computer Operating Property (a watchdog timer), and the Software Interrupt.

      This belongs on The Daily WTF.

      --
      Don't thank God, thank a doctor!
    3. Re:not written to a coding standard? by Anonymous Coward · · Score: 1, Informative

      If you read the points beyond the first one, they indicate some pretty serious problems: All readings are reported relative to a baseline reading taken when the device first turns on, but there are no sanity checks in place for this reading, nor are there attempts to establish an initial average. The code that's supposed to average the user readings doesn't average, but instead heavily weights the first readings. Error handling is available but disabled; there is no way to determine a malfunctioning device from a functioning one. Known bad values are simply clamped to a valid range.

      Granted, the thousands of "errors" mentioned in the article are probably mostly lint warnings... While worrying, they are not actual coding errors.

      But it stands that this device could report an alcohol level that is higher or lower than detected in various circumstances. And these cases could have been detected or avoided if the software had been written better.

    4. Re:not written to a coding standard? by Todd+Knarr · · Score: 1

      Well, there are two that raise questions with me immediately. First, where the specifications called for 4 readings to be averaged, the code uses an exponential moving average instead. That's bad because the moving average weights the last sample at 50% of the final result, while the purpose of averaging is to give all samples equal weight so the inherent errors in each sample will (usually) cancel each other somewhat out making the error of the average less than the error of each individual sample. At the very least it indicates the programmers didn't understand the problem they were being asked to solve. Second, the reduction of the sample resolution from 12 bits (4096 values) to 3 bits (8 values) is strange. That alone introduces a fairly large error into the results just by squashing 256 distinct sample values into one. That means that a reading of 1 (negligible) on the sensor would yield the same result on the display as a reading of 511 (not negligible anymore), and that the device can only report 8 BAC readings to cover the entire range it purports to measure.

      Combined with the large number of warnings from lint, that kind of thing is exactly what'd make me very cautions about a codebase. Lots of small bad habits in the code combined with obvious indications the programmers either didn't quite understand what they were doing or weren't at all careful about making sure what they did was what they intended spells waist-deep morass of bugs to me.

    5. Re:not written to a coding standard? by Anonymous Coward · · Score: 1, Funny

      Yeah well... that darned Illegal Instruction interrupt kept going off... I couldn't figure out why, so I just disabled it altogether.

  11. Perhaps, but... by 91degrees · · Score: 1

    What is the typical variance of the readings? Does the division use the simple built-in rounding down or have they added rounding? What range of values can the breathalizer represent? Is this device used as the only device to determine intoxication level?

    Ultimately the question boils down to has anyone been convicted directly as a result of one of these when their blood alcohol level was within legal limits?

  12. Windows by Anonymous Coward · · Score: 1, Interesting

    And the kicker? The new version of the breath tester runs Windows:

    While Draeger's counsel claims that the "The Alcotest [7110] is the single best microprocessor-driven evidential breath tester on the market", Draeger has already replaced the antiquated 7110 with a newer Windows® based version, the 9510. The computer code in the 7110 is written on an Atari®-styled chip, utilizing fifteen to twenty year old technology in 1970s coding style.

    Good luck getting the source code for that one, or analyzing it for bugs.

    1. Re:Windows by retchdog · · Score: 1

      Uh, does Windows software magically not have source code or something?

      --
      "They were pure niggers." – Noam Chomsky
    2. Re:Windows by dotgain · · Score: 1

      Good luck getting the source code for that one, or analyzing it for bugs

      Problem solved then!

      But seriously now, WTF is with this craze of using Windows for systems that clearly do not need

      • any form of multitasking
      • process/user account separation
      • graphical widget library routines
      • any more problems than they've already got.

      Anyone who thinks this sort of thing is a great idea should be forced to use a Windows-powered mobile phone so they can see first hand just how much the 'technology' helps there.

    3. Re:Windows by dotgain · · Score: 1

      Actually, the more I think about it, I was probably not entirely joking about the "problem solved" bit. Protection from reverse engineering may well the primary reason for adopting a system as provably shoddy and needlessly complicated as that for such a simple task.

  13. No. by SanityInAnarchy · · Score: 5, Informative

    Just read Schneier's comments. He cites some of the more important things:

    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... 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.

    That alone should be enough -- the readings are not averaged correctly. But it goes on:

    The A/D converters measuring the IR readings and the fuel cell readings can produce values between 0 and 4095. However, the software divides the final average(s) by 256, meaning the final result can only have 16 values to represent the five-volt range (or less), or, represent the range of alcohol readings possible. This is a loss of precision in the data; of a possible twelve bits of information, only four bits are used. Further, because of an attribute in the IR calculations, the result value is further divided in half. This means that only 8 values are possible for the IR detection, and this is compared against the 16 values of the fuel cell.

    So we know it's buggy and inaccurate, to a moronic degree. If that wasn't enough:

    Catastrophic Error Detection Is Disabled: An interrupt that detects that the microprocessor is trying to execute an illegal instruction is disabled, meaning that the Alcotest software could appear to run correctly while executing wild branches or invalid code for a period of time. Other interrupts ignored are the Computer Operating Property (a watchdog timer), and the Software Interrupt.

    So, basically, it's designed to always return some value, even if it's wildly inaccurate, and even if the software is executing garbage at the time.

    In other words: It appears to be a very low-level equivalent of Visual Basic's "on error resume next".

    Whiskey. Tango. Foxtrot.

    So to answer your question: No, it does not work. Even if it did somehow work, there's obviously an unacceptably poor level of quality control here.

    --
    Don't thank God, thank a doctor!
    1. Re:No. by Ohio+Calvinist · · Score: 5, Insightful

      The problem in a lot of states is that .01 can make a huge difference between a DUI, a DUI with a "high BAC kicker", a wet-reckless, or nothing at all. It has to be accurate to at least a few 9's or for those "on the bubble" cases do have a severe level of doubt. Because driving with a .07 is not illegal (for the most part), but .08 is. The question in court is not "were you drinking tonight", but "how much did you drink" which is a very specific very objective, very deturminable piece of information.

      As states lower their legal limits to the point where they intersect with non-impaired drinking drivers, especially with a .01 or more margin of error, you're going to get a lot of overzealous cops in cities with revenue shortfalls taking innocent people in for DUIs and hopefully more and more of these "border cases" will bring these devices into question more than the over-the-top blacking out, pissing his pants multiple-offender does in court.

      --
      Forgive my spelling from time to time. I'm often posting during short breaks.
    2. Re:No. by spun · · Score: 2, Informative

      Sure, one bit would be enough to make a pass/fail decision. But they throw away info BEFORE making that determination. You can make a determination and round it down to one bit, but you can't round down to one bit and then make an accurate determination, this is an analog sensing device we are talking about. Throw away everything but one bit, and you don't have a yes/no on the legal limit, you have 'above 2.5v, or below 2.5v.' What's the legal limit, translated into volts, hmmm?

      --
      - None can love freedom heartily, but good men; the rest love not freedom, but license. -- John Milton
    3. Re:No. by FatAlb3rt · · Score: 2, Insightful

      Do you really think that you should receive the same consideration as a guy that's 3x over the limit? Blowing .08 and .18 are quite different in terms of state of mind.

      Definitely possible that there's no false negatives, but for a device that can have such this level of an impact on someone's life, you'd think it would be held to a higher standard.

    4. Re:No. by Lord+Ender · · Score: 3, Insightful

      In embedded systems programming, it is common practice to disable interrupts if they are not used. It is certainly possible that this app simply does not need to handle these interrupts, whether they are enabled or not.

      It is also possible that the other flaws mentioned, which clearly reduce accuracy, do not do so sufficiently to change the outcome in a meaningful way.

      The problem with drunk driving law is not primarily one of testing. It is that it presumes someone is incapable of driving with even trace amounts of alcohol, while treating other forms of more dangerous driving (such as driving while texting or on the phone) as being OK or far far less severe.

      The way the laws themselves are written is a horrible miscarriage of justice. This is the result of the perverse and hypocritical views of MADD and its ilk, the bastard children of the prohibition movement.

      --
      A slashdotter who didn't build his own computer is like a Jedi who didn't build his own lightsaber.
    5. Re:No. by Bananenrepublik · · Score: 1

      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... 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.

      This is incorrect:
      .5 * (1 + 1) = 1
      .5 * (.5*(1 + 1) + 1) = .5*(1 + 1)= 1
      .5 * (.5*(.5*(1 + 1) + 1) + 1) = 1
      ...
      .5 * (1 + 99) = 50

      no matter how long the ellipsis. IOW the last measurement has the highest weight if indeed the algorithm works as described. Of course that's still wrong.

    6. Re:No. by Anonymous Coward · · Score: 0

      "would cause the first reading to have more weight" Not correct. Later readings would have more weight. For example, after 3 readings (A, B, & C), the result is 0.25A + 0.25B + 0.5C. The last reading always contributes half the value of the average.

    7. Re:No. by Locke2005 · · Score: 1, Funny

      The question in court is not "were you drinking tonight", but "how much did you drink" which is a very specific very objective, very deturminable piece of information.

      You're spelling begs the question -- how much have you had to drink today?

      --
      I've abandoned my search for truth; now I'm just looking for some useful delusions.
    8. Re:No. by paazin · · Score: 1
      Cumulative averages are pretty straightforward, so clearly I'm missing something here:

      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.

      They're a bit ambiguous as to how it's "averaged incorrectly" - I'd imagine it was one of these two ways
      First, the stupid way:

      avg = (avg(x[1]...x[n-1])+x[n])/2 - more weight put to the most recent values, not the first value.

      Now, the correct way:

      avg = (avg(x[1]...x[n-1])*(n-1)+x[n])/n - all values are weighted identically and gives the correct average

      ...maybe it's just "lawyer math"

    9. Re:No. by Lije+Baley · · Score: 1

      Word. Laws are being written that would require new devices with higher precision and yet the agencies are still using the same old equipment. Part of this might also be due to that old phenomena in test equipment where the manufacturer puts a 4-digit display on a meter only capable of measuring to a precision of 3 digits. The legislators say "bust 'em at .08" and the police say "sure why not, it's got two digits".

      --
      Strange things are afoot at the Circle-K.
    10. Re:No. by 91degrees · · Score: 1

      Honestly, if they're using something as unreliable as breathalyzer for a conviction, that's where the problem is. While that's a pretty substantial difference, two people with the same blood alcohol level can have these readings. It's unlikely but not impossible.

    11. Re:No. by 93+Escort+Wagon · · Score: 1

      Another great example of Slashdot moderation - "I disagree with you, so I'm moderating your comment as flamebait".

      I actually do disagree with you; but whoever moderated your comment is an imbecile.

      --
      #DeleteChrome
    12. Re:No. by Anonymous Coward · · Score: 0

      Draeger's primary business is patient monitoring, anesthesia gas delivery and neonatal life support equipment. Hopefully they maintain better software quality control for their Class 2(if you screw up they may die) and Class 3 (if you screw up you might kill them) medical products. The FDA does not look at source code before granting 510k (safe for patients) approval.

    13. Re:No. by johannesg · · Score: 1, Insightful

      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... 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.

      Maybe that is the intention? Just because Schneier *thinks* it is an average, doesn't make it so. Maybe the device becomes more accurate as more samples are taken, and therefore gives more weight to the last (not the first!) sample.

      The A/D converters measuring the IR readings and the fuel cell readings can produce values between 0 and 4095. However, the software divides the final average(s) by 256, meaning the final result can only have 16 values to represent the five-volt range (or less), or, represent the range of alcohol readings possible. This is a loss of precision in the data; of a possible twelve bits of information, only four bits are used. Further, because of an attribute in the IR calculations, the result value is further divided in half. This means that only 8 values are possible for the IR detection, and this is compared against the 16 values of the fuel cell.

      Who cares if there is loss of precision? In the end, it spits out a value that is essentially binary: drunk or not. You are not less drunk if it says so with 9 extra bits of precision, and in fact the extra accuracy could itself be considered an error as it shows a certainty about the result that may not be warranted by the design of the machine.

      Catastrophic Error Detection Is Disabled: An interrupt that detects that the microprocessor is trying to execute an illegal instruction is disabled, meaning that the Alcotest software could appear to run correctly while executing wild branches or invalid code for a period of time. Other interrupts ignored are the Computer Operating Property (a watchdog timer), and the Software Interrupt.

      If the code is tested properly, there is no need to keep the first two interrupts going. As for the "software interrupt", it may sound ominous that it is disabled, but there is absolutely no way to tell if and why it should be enabled, and in fact disabling it is probably correct. There is absolutely nothing in software engineering that says you should always enable all interrupts because otherwise your code would be less reliable.

      Besides, a typical result of executing illegal instructions is that the device hangs or reboots. Since alcohol testing devices don't do that (to the best of my knowledge), it appears that disabling those interrupts does not cause any harm.

      So, basically, it's designed to always return some value, even if it's wildly inaccurate, and even if the software is executing garbage at the time.

      In other words: It appears to be a very low-level equivalent of Visual Basic's "on error resume next".

      That conclusion is entirely unwarranted. It appears to be designed to provide a weighted average, not show undue accuracy, and is sufficiently well-tested that it does not need emergency measures like the illegal instruction interrupt. In other words, even though the software may look messy it is working fine.

    14. Re:No. by darthnoodles · · Score: 1

      The same could be said for electronic voting machines...

    15. Re:No. by Anonymous Coward · · Score: 0

      "As states lower their legal limits to the point where they intersect with non-impaired drinking drivers, "

      Since impairment varies from driver to driver and even for the same driver from day to day depending on a huge number of variables, the simple solution is not drink if you are going to be driving.

      "Don't drink and drive" is pretty straight forward.

    16. Re:No. by Anonymous Coward · · Score: 0

      As does your grammar!

    17. Re:No. by LearnToSpell · · Score: 3, Funny

      You're spelling begs the question -- how much have you had to drink today?

      These threads never fail to please.

    18. Re:No. by adamstew · · Score: 1

      Your example is a unique case where the numbers just so happen to work out:

      A counter example:

      5 readings:

      0.6 0.7 0.5 0.9 1.0

      Proper average:
      (0.6 + 0.7 + 0.5 + 0.9 + 1.0) / 5 = 3.7 / 5 = 0.74

      Average as computed by the machine:
      (0.6 + 0.7) / 2 = 0.65
      (0.65 + 0.5) / 2 = 0.575
      (0.575 + 0.9) / 2 = 0.7375
      (0.7375 + 1) / 2 = 0.86875

      The machine would likely round up that final calculation to 0.87.

      The difference between 0.74 and 0.87, in many cases is "Have a nice day, sir" and "Time for the full body cavity search, sir".

    19. Re:No. by bcrowell · · Score: 1

      As states lower their legal limits to the point where they intersect with non-impaired drinking drivers, especially with a .01 or more margin of error,

      A .08 BAC is nowhere near non-impaired. For instance, this DOT page states that "At a BAC of .10, the probability of a fatal or serious-injury crash was estimated to be 6 to 12 times that of a driver with no alcohol."

    20. Re:No. by Ohio+Calvinist · · Score: 1

      I was refering to the reality that many states are considering lowering it to .04, and in California, it is .04 for anyone driving with a class B (CDL) license even if they are in their personal car in a non-commercial situation.

      However, to address your point, on the surface it makes sense, but how did they come to that number? Is it plausible that poor driving and drink and driving are coorelational regardless of BAC? Is it possible the DOT is not the most unbiased source of information? Annecdotally, I've known people who are hardcore drinkers and can down 6-7 beers and still pass a field sobriety test, their BAC has to be higher. Some people, due to genetic factors feel the effects at lower-or-higher concentrations.

      All that being said, I'm not pro-drunk driving, I'm speaking to the eventuallity that states in order to appear "tough" on DUIs and to raise more money in fines they're going to (I gaurantee) lower the limit into a range where impairment is less likley, particularly in seasoned drinkers.

      --
      Forgive my spelling from time to time. I'm often posting during short breaks.
    21. Re:No. by Bananenrepublik · · Score: 1

      Huh? Exactly my point: the last value dominates the result, not the first. I'm not by any means disputing that it's the wrong thing to do.

      To put it in a mathematically precise statement: if you put in a total of n values, the first is weighed with weight 2^(-n), the second with weight 2^(-n+1) ... the n-th with weight 1/2, whereas for a true average all would be weighted with an equal weight of 1/n.

    22. Re:No. by sifur · · Score: 0

      Maybe that is the intention? Just because Schneier *thinks* it is an average, doesn't make it so. Maybe the device becomes more accurate as more samples are taken, and therefore gives more weight to the last (not the first!) sample.

      Suppose the machine does become more accurate as more samples are taken (like maybe it needs to warm up first or something?), I find it unrealistic that it would become more accurate at the same rate as the ratio implied by the calculations performed in the code. Further, wouldn't it make sense to drop the initial readings anyway until the machine had reached it's 'harmony' with the rest of the universe and was able to measure accurately?

      Who cares if there is loss of precision? In the end, it spits out a value that is essentially binary: drunk or not. You are not less drunk if it says so with 9 extra bits of precision, and in fact the extra accuracy could itself be considered an error as it shows a certainty about the result that may not be warranted by the design of the machine.

      As mentioned elsewhere, the important fact is that the loss of precision is done prior to making the final determination. I have a deal for you: I will start a bank that will ignore all fractions of a dollar for all of your deposits. You deposit $12.45 but your bank account only gets the $12. I will keep the $0.45. Sound good? It doesn't matter right? I will provide it as a free service to you.

      If the code is tested properly, there is no need to keep the first two interrupts going. As for the "software interrupt", it may sound ominous that it is disabled, but there is absolutely no way to tell if and why it should be enabled, and in fact disabling it is probably correct. There is absolutely nothing in software engineering that says you should always enable all interrupts because otherwise your code would be less reliable.

      Besides, a typical result of executing illegal instructions is that the device hangs or reboots. Since alcohol testing devices don't do that (to the best of my knowledge), it appears that disabling those interrupts does not cause any harm.

      There IS something in software engineering that says you should take every precaution to avoid introducing errors into your code and that you should validate all inputs into your process. A computer (device) rebooting due to illegal instructions is really some low level validation code that forces a shutdown to avoid nasty things like corrupting your data or reformatting your hard drive. What these people have done is to remove this level of validation. If they left this error-checking in place, the unit would probably 'reboot' every five minutes and they would never gotten through the marketing demo.

      That conclusion is entirely unwarranted. It appears to be designed to provide a weighted average, not show undue accuracy, and is sufficiently well-tested that it does not need emergency measures like the illegal instruction interrupt. In other words, even though the software may look messy it is working fine.

      The interrupts are not emergency measures. If anything, they are safety measures. They were probably taken so that the device would appear to pass any 'testing' that had been performed. I have another deal for you. It's called a sub-prime mortgage ...

    23. Re:No. by syousef · · Score: 1

      Whiskey. Tango. Foxtrot.

      Alcohol detected! Go directly to jail. Do not pass go.

      (Actually I liked your post, just couldn't resist going for the cheap joke)

      --
      These posts express my own personal views, not those of my employer
    24. Re:No. by Chris+Burke · · Score: 1

      Who cares if there is loss of precision? In the end, it spits out a value that is essentially binary: drunk or not. You are not less drunk if it says so with 9 extra bits of precision, and in fact the extra accuracy could itself be considered an error as it shows a certainty about the result that may not be warranted by the design of the machine. /facepalm

      When flipping the LSB can change the calculated BAC value from well below to well above the legal limit, then anyone with a brain should care.

      Do you understand that calculating a BAC from the sensor readings is what it's doing?

      And if the 4 bits of precision are used because that's all the precision the sensor has (despite returning a 12 bit value), then you should REALLY care because the device is fucked from the get-go!

      --

      The enemies of Democracy are
    25. Re:No. by MadShark · · Score: 2, Insightful

      > In embedded systems programming, it is common practice to disable interrupts if they are not used. It is certainly possible that this app simply does not need to handle these interrupts, whether they are enabled or not.

      There is rarely a good reason to shut off the interrupt for an illegal instruction if it exists on your micro. It is entirely possible for a stray bit of electromagnetic radiation(cosmic ray, electric motors turning on or off, etc) to flip a bit in the micro, causing an illegal instruction. The illegal instruction interrupt exists for situations like this. It should be caught and handled in an appropriate manner, ESPECIALLY in safety critical or (as in this case) legal evidence gathering applications. I've seen it happen at work when we do our electromagnetic interference testing.

    26. Re:No. by Anonymous Coward · · Score: 0

      we need a fuzzy logic based court system, ie there could be fuzzy set to determine how drunk you are: .07 straight 0.1 lightly toasted 0.29 pissed 0.4 dead.

      then each set has a multiplier attached to it and that determines your fine or sentence, ie the lightly toasted set is worth $1000 bucks, so if your halfway between that and straight you are 0.5 in that set, and as a consequence owe $500. If your halfway between lightly toasted and pissed (worth five years prison) you get a $500 fine and 2.5 years prison time.

    27. Re:No. by osu-neko · · Score: 2, Insightful

      Maybe that is the intention? Just because Schneier *thinks* it is an average, doesn't make it so. Maybe the device becomes more accurate as more samples are taken, and therefore gives more weight to the last (not the first!) sample.

      It damn well better be an average -- having worked with cheap, 12-bit ADC chips before, I know you're getting trash for data if you aren't taking multiple readings and averaging. You must average the readings because the readings are noisy, particularly "in the field". The point of the averaging is to get rid of the noise. The noise doesn't go away as more samples are taken. The average needs to be done properly across the range because if you're giving greater weight to the last reading, your failing entirely to eliminate the noise.

      I'm certain it's throwing away that least-significant bits from the 12-bit ADC precisely because they're effectively RNG output. The problem is, that's the wrong way to do it. Keeping the entire value and then averaging properly gives a reasonably accurate value, even from a noisy ADC. You can discard the lower bits after the averaging (it's false precision anyhow), but not before, and you do it by rounding, not truncation. Doing what is described in the article gives you trash.

      --
      "Convictions are more dangerous enemies of truth than lies."
    28. Re:No. by 91degrees · · Score: 1

      Yeah. It's kinda irritating. The replies are interesting, and sure as hell not "flames".
      But hey it's Slashdot. You get used to it.

    29. Re:No. by LackThereof · · Score: 1

      The problem with drunk driving law is not primarily one of testing. It is that it presumes someone is incapable of driving with even trace amounts of alcohol,

      Actually, it takes 2 to 4 drinks to put a person over .08 BAC, depending on a number of factors.

      I can chug a tallboy and hit the road legally.

      My heavyset boss could knock back 4 shots of whiskey and still be under the legal limit.

      other forms of more dangerous driving (such as driving while texting or on the phone) as being OK or far far less severe.

      Drunk driving is really low hanging fruit. Easy to spot, easy to prosecute. Driving while texting or not using a handsfree device is also illegal in my state, and is also low hanging fruit.

      Laws that are easy to enforce are always written first. Laws that require superhuman cops either aren't written, or aren't enforced, even if they would have a beneficial impact..

      --
      Legalize recreational marijuana. Seriously.
    30. Re:No. by zoips · · Score: 1

      This is the part where you curse Muphry.

    31. Re:No. by zippthorne · · Score: 1

      Not true. It needs to tell the level, because you can't tell from one sample 20 minutes later whether someone was over the limit in their car and slowly sobering up, or they were actually completely legal in the car and have been slowly absorbing the alcohol remaining in their stomachs. For instance if they followed the standard lame-brain advice of always eating while drinking.

      So, following the chemist's rule, they need to take more than one sample, because they need to fit those samples to a standard model curve in order to estimate what the alcohol concentration was at the time the driver was actually operating a vehicle, since it's not actually illegal to be drunk at a police station.

      --
      Can you be Even More Awesome?!
    32. Re:No. by Anonymous Coward · · Score: 0

      error as it shows a certainty about the result that may not be warranted by the design of the machine.

      It contradicts the comment given in the source code. That alone shows that there is an error, either in the comments or the code. In safety critical software any error in the code, comments, documentation or specification is equally critical.

    33. Re:No. by WCguru42 · · Score: 1

      The difference between 0.74 and 0.87, in many cases is "Have a nice day, sir" and "Time for the full body cavity search, sir".

      Actually the difference between 0.74 and 0.87 is the severity of the coma that you're in.

      --
      "Educate the mind but never at the expense of the soul."~Blessed Basil Moreau
    34. Re:No. by Lord+Ender · · Score: 1

      Giving them the benefit of the doubt that their code doesn't go off executing random data, what is the probability that a "cosmic ray" will send a modern micro into crazy mode?

      --
      A slashdotter who didn't build his own computer is like a Jedi who didn't build his own lightsaber.
    35. Re:No. by Lord+Ender · · Score: 1

      How could you know this? Every BAC tester I've seen says right on the label that it's not accurate except to detect whether or not there is any alcohol present.

      Two drinks isn't much, either. That's one martini.

      Bad driving should be penalized no matter what the reason. We should not have outrageous, life ending consequences for going safely home from the bar after two martinis.

      --
      A slashdotter who didn't build his own computer is like a Jedi who didn't build his own lightsaber.
    36. Re:No. by MadShark · · Score: 2, Informative

      Cosmic rays can cause bit flips, but in my experience it is more likely to happen to electrostatic discharge or other electromagnetic interference of terrestrial origin. The odds of cosmic rays hitting your device is partially dependent on altitude.

      There was a study done by IBM that indicated that a semiconductor based device could expect one such event every year. Other studies have shown that as the number of transistors in a device goes up, the chances increase. Just because an event occurs does not mean it will be visible. It could happen in unused memory, not affect a calculation significantly, etc.

      I dug up an article written by some guys at Cyprus Semiconductor(complete article at http://www.edn.com/article/CA454636.html);

      The interesting bit is this: "The potential impact on typical memory applications illustrates the importance of considering soft errors. A cell phone with one 4-Mbit, low-power memory with an SER of 1000 FITs per megabit will likely have a soft error every 28 years. A high-end router with 10 Gbits of SRAM and an SER of 600 FITs per megabit can experience an error every 170 hours. For a router farm that uses 100 Gbits of memory, a potential networking error interrupting its proper operation could occur every 17 hours. Finally, consider a person on an airplane over the Atlantic at 35,000 ft working on a laptop with 256 Mbytes (2 Gbits) of memory. At this altitude, the SER of 600 FITs per megabit becomes 100,000 FITs per megabit, resulting in a potential error every five hours. The FIT rate of soft errors is more than 10 times the typical FIT rate for a hard reliability failure. Soft errors are not the same concern for cell phones as they can be for systems using a large amount of memory."

    37. Re:No. by GryMor · · Score: 1

      .04? Putting a few bits of information together (measured at 4 times the legal limit in a state with a limit of .08), that seems to be within the noise bounds for actually having a BAC of 0 (even disregarding catastrophic error), having had nothing to drink.

      --
      Realities just a bunch of bits.
    38. Re:No. by Anonymous Coward · · Score: 0

      This brings up a valid point: for Commercial Licensed Drivers in my state(I haz cdl) ANY amount is illegal. Therefore if a reading of .0000001 comes up, I'm boned. More accuracy incurs more doubt towards guilt on the low side and more towards innocence on the high side.

      A very good thing.

    39. Re:No. by sjames · · Score: 1

      In SOME embedded programming situations, it is common (and quite appropriate) to disable interrupts and even exceptions you don't need. That's perfectly valid for an mp3 player and such, nobody's life gets screwed up if they have to power cycle the mp3 player or if it introduces excessive quantization noise.

      In some cases, ignoring errors is the best policy. For the most part, I'd rather have a core router corrupt every billionth packet than have it crash or shut itself down.

      That is NOT ACCEPTABLE when a malfunction has life changing consequences.

    40. Re:No. by johannesg · · Score: 1

      Suppose the machine does become more accurate as more samples are taken (like maybe it needs to warm up first or something?), I find it unrealistic that it would become more accurate at the same rate as the ratio implied by the calculations performed in the code. Further, wouldn't it make sense to drop the initial readings anyway until the machine had reached it's 'harmony' with the rest of the universe and was able to measure accurately?

      True, and there is a pretty good chance they really did mean a normal average and not a weighted average. But all this bitching from people who haven't even seen the source code and have no clue what it is attempting to achieve, is just bothering me. Especially since the overal result will be that people will now believe that breath testers are unusable as evidence, and treat it as a "good out of jail free" card. We can only hope they will only kill themselves while doing so...

      I'm actually a little bit surprised that no further testing is done on drunk drivers. Here in the Netherlands I believe the police will always do a blood test if the breath test comes up positive, so the device is only used to separate non-drinkers from *potential* drinkers, i.e. the breath test is itself not treated as proof, just as an indicator that further testing is necessary.

      But I could be wrong. I have zero experience with drunk driving ;-)

      I have a deal for you: I will start a bank that will ignore all fractions of a dollar for all of your deposits. You deposit $12.45 but your bank account only gets the $12. I will keep the $0.45. Sound good? It doesn't matter right? I will provide it as a free service to you.

      And yet, after a lifetime of using this account, you would still have stolen less money from me than my bank already did. So tell you what, give me a good interest rate and I may just take you up on it...

      The interrupts are not emergency measures. If anything, they are safety measures. They were probably taken so that the device would appear to pass any 'testing' that had been performed.

      Interrupts are categorically not safety measures, and static analysis can, in many programs, quite easily prove that you will never be executing illegal instructions (if every jump goes to a legal instruction you will never reach an illegal one!).

    41. Re:No. by j_sp_r · · Score: 1

      I always thought the reason for the non-zero max was that it is always possible to have some alcohol content in you even if you haven't been drinking. And measurement errors. The rule should be: Not drinking before driving. The upper limit is only to weed out measurement errors and other reasons you might have a higher BAC.

    42. Re:No. by sifur · · Score: 0

      And yet, after a lifetime of using this account, you would still have stolen less money from me than my bank already did. So tell you what, give me a good interest rate and I may just take you up on it...

      LOL - nice one. Thanks for the reply. :-)

    43. Re:No. by Altus · · Score: 1

      How long before driving? If I go out and have a beer with my lunch at 1pm can I drive home at 5?

      --

      "In America, first you get the sugar, then you get the power, then you get the women..." -H. Simpson

  14. And does it work? by SterlingSylver · · Score: 1

    So I can't tell if this analysis of the code indicates that the breathalizers in question are somehow flawed. Perhaps they're coded inelegantly or poorly, but do they actually spit out inaccurate numbers?

    1. Re:And does it work? by legirons · · Score: 3, Insightful

      Perhaps they're coded inelegantly or poorly, but do they actually spit out inaccurate numbers?

      Irrelevant - the test is: do they always spit-out provably correct numbers?

    2. Re:And does it work? by Vellmont · · Score: 1


      Irrelevant - the test is: do they always spit-out provably correct numbers?

      Completely wrong. The law isn't mathematics, and doesn't need to be 100% provably correct. To be admissible the device only has to be accurate to within a set of standards. (Whatever that is, and I don't care to speculate about it). Do you really think all the evidence provided in a court of law is provably correct? Of course not. This is no exception.

      --
      AccountKiller
    3. Re:And does it work? by legirons · · Score: 1

      Completely wrong. The law isn't mathematics, and doesn't need to be 100% provably correct. To be admissible the device only has to be accurate to within a set of standards

      So according to your theory, witness statements are unchallengeable if the witness meets a certain set of minimum requirements?

      sorry, but I think that theory is rubbish. Witnesses can be cross-examined and if their testimony is found to contain any errors then they're considered tainted.

      Why should cross-examination be any less stringent when the witnesses code their opinions as embedded C++ within a breathalyser?

  15. Just remember by captnbmoore · · Score: 5, Insightful

    This will not stop the state from using this to make a felon of you.

    --
    The Navy Motto "IF it ain't broke Fix It" "A day is wasted if you don't learn something new"
    1. Re:Just remember by Anonymous Coward · · Score: 0

      This will not stop the state from using this to make a felon of you.

      Depending on the outcome of this case, anyone convicted of DUI based solely one of these devices (and officer testimony of course) might at least be able to get a new appeal. More interesting would be an actual real-world test of persons having a broad range of physical conditions - not just alcohol consumption, but physical fitness, age, diet (vegan or Taco Bell enthusiast), level of physical activity near the time of the test, mental condition (nervous, angry, relaxed), etc. I suspect we'd find that the devices are no better than experienced cops guessing based on casual observation. It would also be interesting to see all convictions based on the device to be overturned, leading pretty much to the company's well-deserved demise.

      - T

    2. Re:Just remember by teg · · Score: 1

      This will not stop the state from using this to make a felon of you.

      Good. The best tests for these are black box tests. Very little real world code is correct, clean and 100% code standard compliant - with no error conditions and additions added afterwards. Fishing expeditions shouldn't stop these drunken drivers from getting there well deserved punishment. I doubt that these devices - having passed empirical tests and in many other cases being controlled against blood samples - have bugs that affect the ones on this fishing expedition. Potential error conditions leading to alcohol in the breath wouldn't show up in a code review either...

    3. Re:Just remember by DarkOx · · Score: 1

      Our justice system is based on protection of the innocent not punishment of the guilty. We placed the burdon of evidence on the state when we wrote our constitution because we as a society felt it was more important the innocent be protected then the guilty be punished. So frankly I would rather all the drunk drivers not be convicted then one single person be found guilty after a miss-ready.

      You say these things have been tested empirically ok then the jury better be correctly informed as to the answers to the following:

      By whom?
      Where the testing methods sound?
      What exactly was the error rate?
      Within the error rate what was the ratio of false positives to false negatives?
      How big a sample?
      How granular was the test?
      Was the sample big enough to be statistically sound?
      Was the data independently verified?

      Blackbox testing might be adequate as a method of demonstrating the utility of this things as evidence, but as a juror I would need to the answers to at least those questions, and have them be good ones before I would even start to consider the "testimony" of any machine as remotely adequate satisfaction of "beyond a reasonable doubt".

      --
      Repeal the 17th Amendment TODAY! Also Please Read http://www.gnu.org/philosophy/right-to-read.html
    4. Re:Just remember by Anonymous Coward · · Score: 0

      There is clear evidence in the code that the device can and does produce incorrect readings (for example, their weighted average can produce an over the limit result when the 'normal' average is below the limit).
      Black box tests are no subsitute for code reviews. They should be in addition to code reviews. In this case clearly the testing was inadequete.
      If you knew anything at all, you should know that black box tests for non-trivial devices cannot be comprehensive.

      What you appear to be saying is 'these people are clearly guilty so we don't need to examine the evidence too closely (even though that evidence might turn out to be a crock of shit)'.
      It's about as good as 'the police say he's guilty to he probably is, let's just lock him up and spare the expense of a trial and the possibility he might get off'.

      You win the idiot of the day prize. Well done.

  16. DUH.... by Lumpy · · Score: 4, Interesting

    If you got your hands on and analyzed the sourcecode to most DVD' players, TV's (Panasonic runs linux!) and other devices that are complex you will discover that in order to ship it earlier the code is an utter mess.

    Programmers are not joking when we complain about the "It compiles? Ship it!" statement.

    the fault is the Executive staff that refuse to listen to their experts (programmers) and do what they recommend. Instead we get morons that know nothing about programming making unrealistic deadlines and forcing death march coding marathons to give up the mess we have today.

    --
    Do not look at laser with remaining good eye.
    1. Re:DUH.... by shutdown+-p+now · · Score: 2, Insightful

      The fault is the State using output of a device which is an undocumented, unverified black box in legal proceedings.

      Yes, of course, most of code out there is a similar mess. But if it fails, the worst that can happen is that your desktop crashes, or your iPod hangs... which is bad, of course, but not as bad as getting a criminal conviction for drunk driving.

      These things should be held to the same standards as code in military equipment or nuclear reactors - mistakes are inexcusable.

    2. Re:DUH.... by Anonymous Coward · · Score: 0

      Very true, and it's not just programmers. I'm an engineer and it doesn't matter if I write 50 memos, stamp my feet, or run to the VP. Until a machine is lying in pieces on the production floor, nothing will stop the PHBs from shipping something if they've set their minds to it. Their collective asses are covered because they can just blame the engineers.

      It's the same old story. The ones with the most ambition (and often little actual ability) are the ones that are promoted fastest/most often because they spend their 40+ hours making themselves look good rather than actually working. Those of us that actually give a damn about good engineering bail them out to save the day for the project/company. There's no way around it. I just pray for the day when I can find a company that realizes that good engineering actually saves money and time over the 'SHIP IT' mentality.

      I hate being an AC, but I really wanted to post and I've already modded here.

      socrplayr813

    3. Re:DUH.... by cdrguru · · Score: 1

      There is also a general philosophy about embedded code that is it will never, ever have to be debugged, maintained or even looked at again. It is going into ROM.

      I recall a guy that absolutely believed in that. His code was utterly unreadable but he could supposedly write it faster that way. And, it took less space without comments. After all, comments were useless. By over and over he was shown to be spending the same number of 14 hour days to complete a game (cartridge) that other people would spend 8 hour days on. No, that didn't convince him of anything.

      Certainly there are really, really strong deadlines for any sort of consumer electronic device. And the software part of it is considered a really high one-time expense. So it makes sense to try to limit it as much as possible. Which gives us things like this. No, I don't see a good solution for it - the deadlines are set by people well outside of software or hardware development. And nobody familiar with the real business requirements is going to argue about that.

    4. Re:DUH.... by AeroIllini · · Score: 1

      The output of DVD player code does not determine whether or not you go to jail.

      --
      For security, the MD5 hash of this message and sig is 09f911029d74e35bd84156c5635688c0.
    5. Re:DUH.... by Anonymous Coward · · Score: 0

      The other end of that is if it does not ship you will be out of a job next week...

      Dont work there...

    6. Re:DUH.... by Tablizer · · Score: 2, Insightful

      the fault is the Executive staff that refuse to listen to their experts (programmers) and do what they recommend. Instead we get morons that know nothing about programming making unrealistic deadlines and forcing death march coding marathons to give up the mess we have today.

      The US's comparative advantage is speed-to-market, for good or bad. Any service or product that becomes a stable commodity flows to lower-wage countries. Thus, churn-and-burn is the order of the day in the 'merica's.

      Now if you could show through some kind of statistical analysis that companies that spend more time planning are more profitable, you may get more listen. I've worked with some crappy code for big, well-known companies that otherwise are financially successful. Thus, bad code and practices are not dooming them (although it would give a sense of satisfaction if it did).

      One required 12 programmers because it was a combinatorial mess of factors being reported. They said they tried to use a meta-programming approach once before, but the programmer, who was otherwise well-regarded, got confused. They just instead switched to an army to produce the copy-and-paste combinations. They should have perhaps recruited somebody better at meta-techniques, but that was outside of their familiarity zone. Rather than experiment in their unfamiliar meta-land, they decided to byte the bullet and hire the army. I almost felt like building a demo at home and then showing them. Sometimes that's what it takes to break thru the status-quo.
           

    7. Re:DUH.... by D+Ninja · · Score: 2, Insightful

      the fault is the Executive staff that refuse to listen to their experts (programmers) and do what they recommend. Instead we get morons that know nothing about programming making unrealistic deadlines and forcing death march coding marathons to give up the mess we have today.

      To some extent, you are correct. However, I also blame the developers. There are many "software engineers" and "computer scientists" I have worked with who didn't understand the basics of algorithms, design, testing, and other topics that are necessary to our field.

    8. Re:DUH.... by Bert64 · · Score: 1

      But a DVD player or TV failing is not going to result in anyone being sent to jail...
      Something that's intended to be used as evidence in a trial where someone losing will face serious penalties should be thoroughly audited and tested...
      Buggy software is not only unfair to the accused, who may be falsely convicted, but also could result in people who genuinely are guilty being let off.

      --
      http://spamdecoy.net - free throwaway anonymous email - avoid spam!
    9. Re:DUH.... by Anonymous Coward · · Score: 0

      And if the company is relying on that type of coder, isn't that state of affairs also the fault of the higher ups? Corners were cut in the hiring/pay decision process...

    10. Re:DUH.... by brusk · · Score: 1

      Sure it does--what about security camera footage, which might depend on timestamps and whether they are verifiable?

      --
      .sig withheld by request
    11. Re:DUH.... by AK+Marc · · Score: 1

      Those aren't on commercial DVD playback machines. And if you are caught on camera killing someone, you should be let free if the timestamp is off by 5 minutes? The time of such things are checked against multiple sources, not taken as a holy grail where the prosecution points and says "look timestamp, it had to be him and couldn't have been anyone else." However, that is done with breathalizers.

    12. Re:DUH.... by sjames · · Score: 1

      As bad as that is, there's a BIG difference between missing an episode of my favorite show or having to try several times before I get to watch a movie and getting wrongly convicted of a DUI!

    13. Re:DUH.... by PhilHibbs · · Score: 1

      If you got your hands on and analyzed the sourcecode to most DVD' players, TV's (Panasonic runs linux!) and other devices that are complex you will discover that in order to ship it earlier the code is an utter mess.

      It's entirely reasonable that code used in devices like this should be to a higher standard than most other code.

      Programmers are not joking when we complain about the "It compiles? Ship it!" statement.

      I've been under the same kinds of pressure, I've cranked out sloppy code with poor standards and documentation, I've said "It compiles? Ship it!", but I never really meant it, it seldom gets that bad.

  17. Here's a little jem. by needs2bfree · · Score: 2, Funny

    I thought it was funny.
    12. Defects In Three Out Of Five Lines Of Code: A universal tool in the open-source community, called Lint, was used to analyze the source code written in C. This program uncovers a range of problems from minor to serious problems that can halt or cripple the program operation. This Lint program has been used for many years. It uncovered that there are 3 error lines for every 5 lines of source code in C.

    While Draeger's counsel claims that the "The Alcotest [7110] is the single best microprocessor-driven evidential breath tester on the market", Draeger has already replaced the antiquated 7110 with a newer Windows® based version, the 9510.

  18. It has to be proven to work by Chmcginn · · Score: 1

    If a breathalyzer was a person, it would be required to be schooled and licensed in the appropriate field of study to be used as evidence at a trial. I might have an amateur interest in ballistics, but I'm not qualified to testify about it at a trial, regardless of the fact that I'm possibly more familiar with my particular firearm than the expert witness hired.

    --
    Have you been touched by his noodly appendage?
    1. Re:It has to be proven to work by djupedal · · Score: 2, Funny

      If a breathalyzer was a person, it would be bent over a bar stool, pants down, with the impression of a bullet-proof chest-buckle somewhere in the vicinity of a very reddened butt-crack.

  19. Cyclomatic by jkbull · · Score: 1
  20. Atari styled chip? by Anonymous Coward · · Score: 0

    What the heck does that mean? A 6502?

    1. Re:Atari styled chip? by sentientbeing · · Score: 1

      No. it means the drunk being tested gets to enter his test result into a high score table

      --

      ------
      beware he who would deny you access to information, for in his mind he dreams himself your master
    2. Re:Atari styled chip? by Cajun+Hell · · Score: 1

      It means the display uses player/missile graphics (Atari terminology for sprites).

      --
      "Believe me!" -- Donald Trump
    3. Re:Atari styled chip? by brusk · · Score: 1

      Actually if you just stuck to sprites you wouldn't have to worry about failing a breathalyzer test.

      --
      .sig withheld by request
  21. About time by hesaigo999ca · · Score: 1

    About freakin time someone put that stupid test to the test, I always knew them to be sometimes buggy, especially when I know some people to have passed that test, when they could have not even stood up on their own, and yet someone who has no discernable symptoms of being drunk, was blowing way over the limit...for sure there were bugs in their system, all systems have bugs...
    if M$ cant program without bugs, why do they think they could?

    1. Re:About time by Dan+Ost · · Score: 1

      for sure there were bugs in their system

      This appears to be true

      all systems have bugs

      This is certainly not true (or at least not necessarily true).

      --

      *sigh* back to work...
    2. Re:About time by Alpha830RulZ · · Score: 1

      In most states, you can request that a blood test be done. If you think you're being screwed, ask for this to be done. If you think you're on the edge, ask to have it done. It will take time to get you to the police station/hospital to have it done, during which time, your body will metabolize alcohol. Or, if you just guzzled three shots, time for it to get INTO your blood. And it will definitely piss off the cop. But it's your legal right most places.

      --
      I was taught to respect my elders. The trouble is, it's getting harder and harder to find some.
    3. Re:About time by hesaigo999ca · · Score: 1

      You definitely are NOT a programmer....name me one system or application that has to this day never had a bug.....

    4. Re:About time by Dan+Ost · · Score: 1

      I am a programmer.

      I was taking exception to your absolute statement that all systems have bugs.

      Trivial programs can be bug free. Similarly, non-trivial, but low-complexity programs can be bug free. By extension, it's possible that a program of any arbitrary complexity can be bug free, however unlikely experience suggests that must be.

      Also, since "all systems have bugs" is a statement about the present state of systems, not their histories, it doesn't matter if a system has previously had bugs in it as long as they are no longer present.

      --

      *sigh* back to work...
    5. Re:About time by hesaigo999ca · · Score: 1

      Sorry ...something as simple as a program that runs only to calculate the sum of a & b to = c, can be buggy... say let's say that you used unsigned integers...on a 16bit architecture, (although you are not aware that this program of yours would be used on windows3.1....you just assumed it was going to be windowsxp...so a bug per say, even though most would fix this bug by stating the obvious, "we do not support anything less then windowsxp" ...voila problem solved, for your shoddy code.

  22. Cyclomatic Complexity? by Anonymous Coward · · Score: 0

    SysTest said, 'The Alcotest NJ3.11 source code appears to have evolved over numerous transitions and versioning, which is responsible for cyclomatic complexity

    I'm pretty sure the paths through the program measure the cyclomatic complexity. Not that fact that it has numerous 'transitions' or versioning.

    1. Re:Cyclomatic Complexity? by treeves · · Score: 1

      I think that it's being claimed that the numerous transitions and versions are responsible for the number of paths being added over time. It's a reasonable thing to say.

      --
      ...the future crusty old bastards are already drinking the Kool-Aid.
  23. Source Code by Niris · · Score: 1

    Looked through TFA but don't see the actual code. Just curious if that was released to the public, or if only the reports on it were.

  24. Re:Lint is crap by TigerNut · · Score: 4, Interesting
    The thing is that probably 95% of the Lint reports could have been fixed by the code designers, just by making appropriate declarations or a bit of type casting. The fact that 60% of the source is reported by Lint, indicates that the designers never bothered to do any kind of static code checking or to clean up warnings, and that points to a lack of care during development and testing.

    At a previous job we had to buy a third-party driver for an embedded PCMCIA controller. The software vendor delivered code that (the first time around) produced about 1200 lines of warnings when we compiled it. We queried them about it and they responded that "we don't compile with warning output enabled". Our reply to them was that our coding standard was that the compile would fail on warnings, and we wouldn't accept their code unless they fixed all the warnings... they cleaned up their act, and fixed a couple of previously unresolved problems in the process.

    --

    Less is more.

  25. the issue is not just how bad the code looked by Cyrus20 · · Score: 1

    the issue is not just how bad the code looked it was the crap that was in the code. for something that like what the article is talking about it needs to be accurate. as my programing professor used to say. "crap in crap out"

  26. "Reveals Mess" by Anita+Coney · · Score: 1

    Seriously, is anyone actually shocked by this? Their code is protected by copyright, so it's not like anyone can simply take the source code and use it. And it's not like there's some sort of secret in the medical proven fact that, generally speaking, a certain percentage of alcohol in a person's breath indicates a corresponding percentage of alcohol in the same person's blood supply. So the only basis the company had to refuse to release the code was because they knew it was a mess.

    --
    If someone says he and his monkey have nothing to hide, they almost certainly do.
    1. Re:"Reveals Mess" by cdrguru · · Score: 2, Insightful

      The code is protected in the US by copyright. It is not protected anywhere else, especially in countries where it is cheap to reproduce the hardware. US Customs has proven over and over they will not block the import of infringing devices.

      This means that once the software gets out - and it is - look for cheap copies that will put the original manufacturer out of business. Because law enforcement and just about everyone else in the market for such devices is going to jump on the price difference. Same functionality for 1/10th the price.

      Do not believe for a second that there are any safeguards left for this sort of thing. There are not.

    2. Re:"Reveals Mess" by Anonymous Coward · · Score: 0

      And it's not like there's some sort of secret in the medical proven fact that, generally speaking, a certain percentage of alcohol in a person's breath indicates a corresponding percentage of alcohol in the same person's blood supply.

      The secret is that it's not a medically proven fact.

  27. Re:Lint is crap by Trahald · · Score: 2, Informative

    Which is why things like this http://en.wikipedia.org/wiki/MISRA_C exist.

  28. Re:But does it work? No. by Bellegante · · Score: 1

    It would have to be written correctly to work, wouldn't it? even if the code runs flawlessly: It doesn't average correctly. It tries several times to analyze a sample, but then averages them incorrectly, point 2 FTFA. They can program, but failed basic math.

  29. Don't forget the false positives by Chmcginn · · Score: 2, Insightful

    In general, I was under the impression that the standard for criminal cases were weighted heavily to reject any technique, evidence, or device that had any appreciable chance of a false positive.

    --
    Have you been touched by his noodly appendage?
    1. Re:Don't forget the false positives by cc_pirate · · Score: 1

      Ha ha ha ha ha ha!!! Nice one...

      Not even close.

      --

      "There are laws that enslave men, and laws that set them free. " - Sean Connery as King Arthur

    2. Re:Don't forget the false positives by Chmcginn · · Score: 1

      Polygraphs have been disallowed for this exact reason, while fingerprints are allowed, and DNA markers above a certain statistical threshold (one in one hundred thousand, IIRC). Any counterexamples?

      --
      Have you been touched by his noodly appendage?
    3. Re:Don't forget the false positives by cc_pirate · · Score: 1

      Radar guns, speed cameras and of course clearly BAC testers. Radar guns are routinely allowed to be out of calibration but the results still used. Speed cameras are a black box just like these BAC testers. Judges clearly don't care when the result is merely a fine to the defendant. Apparently in NJ they don't care when the result is a criminal conviction either since the court upheld the use of these breathalyzers even though they have only 8 discreet levels of BAC measurement!! No engineer or scientist would ever use these things for anything other than a gross reality check at best.

      But clearly the US court system has nothing to do with 'justice', only law... and they are NOT the same.

      --

      "There are laws that enslave men, and laws that set them free. " - Sean Connery as King Arthur

    4. Re:Don't forget the false positives by Chmcginn · · Score: 1

      A lawyer that specializes in traffic law will get a miscalibrated radar gun thrown out of court without breaking a sweat. If somebody didn't getting a lawyer... well, you know what they say about people who represent themselves in court.

      --
      Have you been touched by his noodly appendage?
    5. Re:Don't forget the false positives by Chmcginn · · Score: 1

      Oh, and remember that speed cameras don't go to criminal court (nor do normal speeding tickets, it's only if you're going fast enough to get a criminal reckless driving charge). There is a pretty noticeable difference in the standards for parking tickets, camera-issued tickets, traffic tickets, and criminal charges.

      --
      Have you been touched by his noodly appendage?
  30. Looks like the NJ Supreme Court doesn't care by kelnos · · Score: 4, Informative

    It appears that the NJ Supreme Court wasn't swayed too much by the source code evaluation. They're planning on reinstating the device with only minor modifications.

    --
    Xfce: Lighter than some, heavier than others. Just right.
  31. Was It Wrong, Though? by darkmeridian · · Score: 1

    The source code was a miserable mess. But I didn't see anywhere that the source code caused the machine to give spurious or inaccurate results. Much ado about nothing?

    --
    A NYC lawyer blogs. http://www.chuangblog.com/
    1. Re:Was It Wrong, Though? by kelnos · · Score: 1

      This comment to Schneier's blog post might shed some light on the biggest bug in the code. If a user of the device is in one of the only *eight* ranges that the device recognises, there's a 60% chance they're below the legal limit when it will register as above the limit.

      (Of course, that analysis relies on a couple [reasonable] assumptions about the range of the device that may or may not be true.)

      --
      Xfce: Lighter than some, heavier than others. Just right.
    2. Re:Was It Wrong, Though? by xenocide2 · · Score: 1

      You can't tell with just the source code. To say the average is wrong, you'd need to have some idea of what the inputs are, and how they vary over time. For that you'd ideally want the actual device, which is was not made available. It's a bit like being asked to demonstrate if a car works, given only the steering wheel.

      --
      I Browse at +4 Flamebait

      Open Source Sysadmin

  32. The code in question by Linker3000 · · Score: 3, Funny

    10 REM Alky 0.1 A. Coder 2001
    20 REM Turn off lights and buzzer
    24 POKE 201,0
    26 POKE 202,0
    28 POKE 53280,0
    29 REM Any Breath?
    30 IF PEEK(200) = 0 THEN GOTO 30
    32 REM Buzzer
    33 POKE 53280,1
    34 PAUSE(2)
    35 POKE 53280,0
    36 REM Lights...
    40 A = 10 * RND(1)
    50 IF A > 5 GOTO 80
    60 REM Red light
    70 POKE 201,1
    75 GOTO 100
    76 REM Green Light
    80 POKE 202,1
    100 PAUSE(3)
    120 GOTO 20

    --
    AT&ROFLMAO
    1. Re:The code in question by Anonymous Coward · · Score: 0

      40 A = 10 * RND(1)
      50 IF A > 5 GOTO 80

      "60 ELSEIF GOTO Jail"?

  33. What is code? by Sybert42 · · Score: 0

    Is that like the recipe to the Big Mac? That should be a secret, or we won't get innovation in taste.

  34. Re:Lint is crap by Anonymous Coward · · Score: 0

    Any static analysis is going to have false positives. There are better tools available than Lint, but even those tend to have enough false positives to make the percentage look fairly horrible.

    Just because it cries wolf a lot doesn't mean that it's not occasionally correct.

  35. stop paying lawyers, pay a programmer by bcrowell · · Score: 3, Interesting

    If I were the manufacturer, at this point I'd say: (1) lawyers are expensive; (2) competent programmers are expensive, but less expensive than lawyers; (3) our business is selling the beathalyzer, not the software, so we gain nothing by keeping the source secret; (4) this publicity is hurting us; (5) let's hire some more competent programmers to clean up the code, and then we can make it public; (6) profit!

    This is different from the case of the voting machines. In the case of a voting machine, there are lots of people who might be motivated to hack it, lots of people have access to the machines, and it only takes one compromised machine to throw a close election. If you believe in security by obscurity, then there is at least some logical argument for keeping the voting machine code secret. In the case of the breathalyzer, there's not even that lame argument.

    1. Re:stop paying lawyers, pay a programmer by cdrguru · · Score: 1

      Wrong. All they are selling is the software in the hardware - the hardware can be easily copied by any Chinese company and sold for 1/10th the price they are charging - whatever that is.

      It is the software that is the only thing that differentiates the product, and would cost a Chinese company far more to duplicate. It is possible (but unlikely) that they further protected the software through the use of absolutely proprietary hardware that can't easily be duplicated. But the key is that for nearly all electronic devices today it is the software that is worth something and the hardware is meaningless.

      As for the company having some sort of "look and feel" patent for their device, US Customs have pretty much proven they will not block the import of infringing products. This means that once the software gets out, if there is any sort of market at all for the devices they will be immediately replaced in the market by cheap Chinese copies. Law enforcement is under the same budget constraints as the rest of the country, so they aren't going to look too carefully at who is manufacturing a device, assuming they would care if it were known. They are interested in the overall cost of the device, and that's about it. So if you offer them a cheap copy at 1/10th the price, they are going to leap on it.

      US manufacturer then leaves the market because they can't compete. The Chinese folks can take the code, however bad it might be, and just use it. Oh they might have a programmer make a couple of changes so it doesn't have the original manufacturer's name embedded in it - but I have seen cases where that hasn't even been done. It is probably easier to just avoid the programmer altogether.

      Hardware is easily duplicated. Software, once it gets out in the world, is easily stolen. And in any sort of embedded system application there are no protections for the original manufacturer. So they are going to lose.

    2. Re:stop paying lawyers, pay a programmer by DarkOx · · Score: 1

      Programmer make a couple of changes so it doesn't have the original manufacturer's name embedded in it

      You say the software is the only thing the makes one product different from the knock off and then prove that the software is in fact the easiest part to knock off. If you copy the hardware you can just borrow the software entirely.

      I have seen lots of fake Cisco routers and phones. Honestly the fakes are manufactured to better standards then the real mccoy in many many cases. Its easy to copy a PCB and assemble it. Once you do that you have something that can run the same binaries and stealing the software is easy too closed source of not.

      --
      Repeal the 17th Amendment TODAY! Also Please Read http://www.gnu.org/philosophy/right-to-read.html
    3. Re:stop paying lawyers, pay a programmer by Anonymous Coward · · Score: 0

      If I were the manufacturer, at this point I'd say: (1) lawyers are expensive; (2) competent programmers are expensive, but less expensive than lawyers; (3) our business is selling the beathalyzer, not the software, so we gain nothing by keeping the source secret; (4) this publicity is hurting us; (5) let's hire some more competent programmers to clean up the code, and then we can make it public; (6) profit!

      This is different from the case of the voting machines. In the case of a voting machine, there are lots of people who might be motivated to hack it, lots of people have access to the machines, and it only takes one compromised machine to throw a close election. If you believe in security by obscurity, then there is at least some logical argument for keeping the voting machine code secret. In the case of the breathalyzer, there's not even that lame argument.

      I cost more than most lawyers. Your definition of "competent" is somewhat lacking.

  36. it just occured to me ... by jsnipy · · Score: 1

    Do they keep booze on hand for unit testing?

    --
    -- if you mod me down, I will become more powerful than you can possibly imagine
  37. Past cases by Kokuyo · · Score: 1

    So... what about all those people who have been found guilty after being tested with those devices? What happens to them?

    1. Re:Past cases by geekgirlandrea · · Score: 1

      They spend years trying to rebuild their lives after the State destroyed them. Isn't justice wonderful?

  38. A pyhrric victory for open source and code review. by Darth_brooks · · Score: 4, Insightful

    The good: This particular breathalyzer has been proven to be the unreliable POS that it apparently is. This unit, and others like it, will finally start being held to a stronger coding standard.

    The bad: every sleezeball, ambulance chasing, "call lee free", douchebag of a lawyer will use this case to attack the credibility of any and all breathalyzers made in the past, present, or future, spreading enough FUD to juries everywhere that an unacceptable number of drunken idiots get the God given right to keep their license until they finally end up killing someone.

    As a person, I think groups like MADD spend most of their time trying to scare monger politicians into pushing us as close to prohibition as possible. I believe that alcohol can be used responsibly. But I also know that this case is going to result in DUI's getting overturned for people that damn sure don't deserve it. Borderline cases will get knocked down, cases will get thrown out, and the people that broke the law, that did something wrong, will walk out of a court room 'vindicated.' They didn't do anything wrong when they had six beers and drove home, it was that confounded *machine* that *said* they broke the law. The *machine* was busted, ergo they didn't break the law. In short, this case is going to make a lot of O.J. Simpson's. The jury said they didn't commit a crime, so they didn't. No harm no foul. Technicality? Bah! They're as innocent as the sweet baby Jesus.

    I'd like to think things will wash out in the end. This case will probably end up making it harder to get off on this particular technicality in the long term. In the short term? Here come the appeals. Maybe the state is partially at fault for buying shoddy equipment. (Or maybe not. Did they do a code review? Do they have the resources to one? Probably not. Did you do a code review of the 3com switch in your server room? Their selection criteria can certainly be questioned, but it probably doesn't change the fact that someone drank enough to blow a .22 then decided to drive home.)

    But in the end, the drunks are still going to be drunks. And tomorrow some of them will probably get to file appeals, and some of the ones that shouldn't be on the road, or even in public, will get to slip out of this brand new loophole. I'm not sure that that deserves a cork-popping celebration.

    (and yes: We all handle our booze differently. Arbitrary limits that determine "drunk" may or may not be the answer. Hardcore drunks will keep driving even after losing their license. DUI's are as much moneymakers for the States as speeding tickets. Yadda yadda yadda.)

    --
    There are some people that if they don't know, you can't tell 'em.
  39. The best news: by internerdj · · Score: 1

    "While Draeger's counsel claims that the 'The Alcotest [7110] is the single best microprocessor-driven evidential breath tester on the market', Draeger has already replaced the antiquated 7110 with a newer Windows® based version, the 9510."
    The new improved version is Windows based...

  40. Bruce Schneier needs a math refresher by serutan · · Score: 0

    From his report:

    "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."

    Wrong, Bruce. The first two readings have the least weight, and each subsequent reading has the same weight as all the previous readings combined.

    Average after two readings = (r1 + r2) / 2.
    Average after the third = ((r1 + r2) / 2) + r3) / 2.
    Average after the fourth = (((r1 + r2) / 2) + r3) / 2) + r4) / 2.

    The last average boils down to r1/8 + r2/8 + r3/4 + r4/2.

    Makin' good money selling your books, are ya Bruce?

    1. Re:Bruce Schneier needs a math refresher by Etrias · · Score: 1

      Good God, man! Haven't you heard about the facts!

    2. Re:Bruce Schneier needs a math refresher by Anonymous Coward · · Score: 1, Informative

      Yeah the math's not right but it's not Schneier's fault. He was quoting the summary.

    3. Re:Bruce Schneier needs a math refresher by robot_love · · Score: 1

      Thank God serutan is here to catch this tiny error and throw it back in Bruce's face.

      I used to like Bruce's work, but now I realize it's all rubbish. Not like my new hero serutan! Such class! Such grace! Not even a hint of being childish. If only all the world would react in such a petty way to what is probably a typo. What heights we could reach!

      --
      .there is enough of everything for everyone.
  41. Isn't the average just a running average by Jeff1946 · · Score: 1

    My quick read of the averaging method implies that the average is one half the last reading plus one half the previous average. Just a simple way to do a running average. More importantly what are the error limits using the device. If the limit is 0.08 % and it reads 0.09 what is the +/- bounds? How is it zeroed and spanned will of course be important as well.

    1. Re:Isn't the average just a running average by sexconker · · Score: 1

      "My quick read..."

      In my day, we had a different word for "reading" for an assignment / a test / recreation / a post.

      That word was "cheating".
      You sir, will accept the FUD, bullshit, and factual errors you are fed, and you will LIKE IT.

    2. Re:Isn't the average just a running average by digitig · · Score: 1

      My quick read of the averaging method implies that the average is one half the last reading plus one half the previous average. Just a simple way to do a running average.

      A weighted running average. Great for monitoring the performance of a process, where you're more interested in what the process is doing now than in what it was doing a while ago (although you'd probably want to put a bit more thought into the actual weightings used). Complete nonsense when you're supposed to be doing a uniform aveage. The use of this type of average in some process monitoring is probably how they made the blunder. Sometimes you do want to discount old data. Alternatively, maybe they were trying to avoid the total exceeding the number of bits available -- in which case they should have done better to divide each number by four before they added it in. There's a loss of accuracy that way, but they don't seem to have cared much about that.

      --
      Quidnam Latine loqui modo coepi?
    3. Re:Isn't the average just a running average by Americano · · Score: 1

      Complete nonsense when you're supposed to be doing a uniform aveage.

      Agreed - if a uniform average is *what the device is supposed to compute*, then yes, it's wrong. If a weighted running average is known to produce more accurate results in this type of device, then it's far from being complete nonsense.

      Discrepancy between comments & code functionality is certainly annoying when you're reading someone's code, but the comments are usually the part that's wrong in my experience - the comment gets inserted at the top of a block, and the code it comments is then revised to the point that the comment appears to bear absolutely no relation to the functionality of the code block beneath it.

      Unless you're familiar with the sensor & device design, you cannot say for certain whether or not "weighted running average" or "simple average" is the correct behavior. All that can be said is that the code does not match the comment, and so ONE or the OTHER is incorrect.

  42. Re:But does it work? A bigger question is: by davidsyes · · Score: 1

    What does this imply for the commercial software development world? Can THEY be held to produce code and be punished for sloppy code, even if their code is used in medical areas, nuclear power plants and other places?

    Imagine if FINALLY people trying to sue msoft and other can have their winning day in court. What this could mean is that WE, the consumer, stop or reduce getting dragged through upgrade cycles of crap code, paying for code that was released on a marketing schedule rather than a "85%-95%ready" benchmark.

    --
    Previously: "Linux... Toward the Sunrise..." Now: "Linux... Toward the-- No, now, part of Every Sunrise"
  43. Nitpick: 1st reading actually has the least weight by crescente · · Score: 1

    If I'm reading this right, the most recent reading is given a 50% weight: new_average = (latest_reading + previous_average)/2. That would actually give readings in the past less weight, in some convoluted way. This is better than giving the first reading the most weight, but yes, the "average" is still not an arithmetic average.

  44. Re:Lint is crap by MadShark · · Score: 5, Interesting

    I work on embedded system stuff every day. At the end of the day, there are NO lint warnings in my code. First, I tend to avoid coding practices and designs that generate lint warnings. By and large, lint warns for a good reason most of the time. Second, in the limited number of situations where lint flags something incorrectly, there are methods for silencing the warnings via special comments. I'm currently working on a 50000 line project, and there are about 70 places in the entire code base were we had to tell lint to ignore a warning. Each warning suppression is documented as to why lint is incorrect.

    Lint isn't a perfect tool by any means but in my opinion, anyone developing C code without it is not acting in a professional manner.

  45. Looks like standard engineeering code to me. by Carbaholic · · Score: 1

    With something like the breathalyze, it probably involves complex engineering calculations, so the code is probably written by an engineer with limited programming ability. I would expect trial and error, patchy code to come form calculations based on empirical data.

    it's probably just like all the other FORTRAN codes out there written by engineers that are ugly, but give us right answers day in and day out.

    1. Re:Looks like standard engineeering code to me. by Anonymous Coward · · Score: 0

      RTFA! The code does not work correctly, the average of several readings gives an incorrect value and also errors are not reported until multiple consecutive errors occur.

  46. Sure... by Anonymous Coward · · Score: 0

    Sure the code is bad, buggy and looks like spaghetti. The only thing a judge is going to care about is the results. If you can test a bunch of different samples and get consistent results it passes and works who cares what the code looks like. But if it returns inconsistent results, then there is a problem.

  47. So Why Not Just Test The Device? by Anonymous Coward · · Score: 0

    Get a person drunk, measure their blood alcohol level with some known good method, measure it with a few of these devices, and see how close they all are. How is a doomed-to-not-convince-judges approach of analyzing the device's inner workings to describe how they could fail better than simply demonstrating that the devices fail? Do the devices not fail?

  48. So it is ugly and complex by DaveV1.0 · · Score: 1

    The real question is "Does it work repeatedly, reliably, and accurately?"

    It doesn't matter how complex and/or ugly the code is if the code works beautifully.

    --
    There is no "-1 offended" or "-1 you don't agree with me" mod options for a reason.
  49. Meh by Anonymous Coward · · Score: 0

    Typical "enterprise-ready" "industrial grade" code.

  50. who tested and approved the things? by zmollusc · · Score: 1

    Before these things came into service, who approved them and what was their test procedure? Did they just look at the brochure?
    'Oooh, this magical box is super accurate, lasts 18 hours on a single set of batteries and is available in a variety of exciting colours! Let's buy a thousand, hell it is taxpayer's money, let's buy a hundred thousand!'

    --
    They whose government reduces their essential liberties for temporary security, receive neither liberty nor security.
    1. Re:who tested and approved the things? by DaveV1.0 · · Score: 1

      If it is super accurate and reliable and last a long time on a set of batteries, what other tests are needed?

      --
      There is no "-1 offended" or "-1 you don't agree with me" mod options for a reason.
    2. Re:who tested and approved the things? by myowntrueself · · Score: 1

      If its marketting pamphlets say that it is super accurate and reliable and last a long time on a set of batteries, what other tests are needed?

      Fixed that for you...

      --
      In the free world the media isn't government run; the government is media run.
    3. Re:who tested and approved the things? by John+Hasler · · Score: 2, Funny

      > Before these things came into service, who approved them and what was their test
      > procedure? Did they just look at the brochure?

      No. They also went out to lunch with the salesman.

      --
      Warning: this article may contain humor, sarcasm, parody, and perhaps even irony. Read at your own risk.
    4. Re:who tested and approved the things? by DaveV1.0 · · Score: 1

      No, you didn't fix anything. The original poster didn't say anything about marketing pamphlets. The op said "this magical box is super accurate...".

      Therefore, you are a shithead. Thanks for playing, go set yourself on fire.

      --
      There is no "-1 offended" or "-1 you don't agree with me" mod options for a reason.
    5. Re:who tested and approved the things? by Americano · · Score: 1

      And what if the marketing pamphlets reflect the results of rigorous testing?

      Throwing in the word "marketing" does not guarantee an automatic conviction of crimes against IT.

    6. Re:who tested and approved the things? by zmollusc · · Score: 1

      Well, I actually said 'Did they just look at the brochure?
      'Oooh, this magical box is super accurate...'

      --
      They whose government reduces their essential liberties for temporary security, receive neither liberty nor security.
    7. Re:who tested and approved the things? by zmollusc · · Score: 1

      I don't need the results of rigorous testing, I need the test procedures and the data.

      A bit like when you are doing your taxes. The Government won't take "well, I have gone over my figures really rigorously, and I only owe 3 bucks tax", they want receipts, bank details and all kinds of data.

      --
      They whose government reduces their essential liberties for temporary security, receive neither liberty nor security.
  51. who cares by mattwarden · · Score: 1

    > not written well, nor is it written to any defined coding standard

    Sorry, what relevance does this have? He's not going to be let off the hook because the company has nigh maintenance and churn costs.

    Where is the report on whether this actually measures what it's supposed to measure and is valid from a functional perspective?

    1. Re:who cares by SuiteSisterMary · · Score: 1

      Given that it's being used for medical and legal purposes, you could very easily argue that without rigerous development and testing practices, it's worse than useless.

      --
      Vintage computer games and RPG books available. Email me if you're interested.
    2. Re:who cares by mattwarden · · Score: 1

      Well, that argument doesn't hold. Poor processes don't cause issues. They make them more likely to end up in production products. But just because they have poor processes and no standards doesn't mean the thing doesn't work.

      However, in TFA there is discussion of functional issues. I just don't know why slashdot is focusing on the non-functional issues.

  52. Accuracy, not code quality is relevant to the case by Thaelon · · Score: 1

    Accuracy, not code quality is relevant to the case.

    Most production code is crap.

    Most - if not all - developers know it.

    What matters is, are the results accurate?

    --

    Question everything

  53. But ... by Midnight+Thunder · · Score: 1

    Er, why would it need or be expected to be? It's a commercial product. I don't think most bank websites are "coded" to any specific standard either.

    No, but their bank machines probably are. On one side they don't want to lose money and the other they don't want to be sued for losing customer money. Code is held to a higher standard when something critical is at play, or at least should be. The vast majority of web sites (all?) wouldn't even enter that category, so if there is an odd bug no one is going to care.

    --
    Jumpstart the tartan drive.
  54. Obviously.... by Tablizer · · Score: 1

    ...teh programmr had ot get drnuk to tesst iit *hic*

  55. Is the report and/or code available? by belmolis · · Score: 1

    Is the report or the source code available? I don't see any links to them.

  56. Poor Design, But Is It Accurate by fluffy99 · · Score: 1

    It can't be that bad. Poor coding and bad design aside, it obviously passes some standard test and periodically get recalibrated. There's no mention of whether the errors such as incorrect flow measurements would cause low or high results.

    Besides, the breathalyzer is usually only used to prove your drunk after its obvious by your mannerisms. Its a bit rare to test sober people ya know.

    1. Re:Poor Design, But Is It Accurate by PhxBlue · · Score: 1

      Besides, the breathalyzer is usually only used to prove your drunk after its obvious by your mannerisms. Its a bit rare to test sober people ya know.

      Let's say you're driving a bit over the speed limit on a Saturday night, or maybe one of your brake lights is out. You see the red and blue and pull over. The police officer says he smells alcohol on you and asks you to submit to a breathalyzer.

      In the state of Colorado, even if you are stone-cold sober, you can have your driver's license suspended for up to six months for refusing to take a breathalyzer test, and your refusal to take the test can be used against you in court.

      So how important do you think it is for a breathalyzer to record a 99.9-plus-percent accurate result every time? And tangentially, is anyone else in the slightest bit annoyed that the system can do an end-run around the Fifth Amendment so easily?

      --
      !#@%*)anks for hanging up the phone, dear.
    2. Re:Poor Design, But Is It Accurate by shentino · · Score: 1

      In my state, it's implied consent. Which, for the privilege of using the state road system, I consider reasonable, especially when I am going to be in control of a dangerous piece of equipment...namely, my car.

      This is also why liability insurance is mandatory.

      Now, if they tried to pull this on me if I was riding a bicycle...in theory I could refuse the test, but in practice it would be more trouble than it's worth and I'd have to pray that an organization like the ACLU would have the time to help me.

      And we also have laws against public intoxication.

    3. Re:Poor Design, But Is It Accurate by fluffy99 · · Score: 1

      They don't carry the breathalyzer with them. Certainly not that one, anyway. They give you a standard field sobriety test. If you fail that you go downtown and blow in the little tube. Note that falling down drunk is failing the field test which requires you be be able to stand up.

  57. FARK was right on point by tjonnyc999 · · Score: 3, Funny

    "DUI defendant finally gets access to breathalyzer code, ironically finds developers were probably drunk when they wrote it". http://www.fark.com/cgi/comments.pl?IDLink=4387892

  58. Really...? by Facegarden · · Score: 1

    How about:

    int main (void)
    {
    if(BAC>0.0008)
    {
    sprintf("Jail");
    }else
    {
    sprintf("Home");
    }

    }

    How hard can that be!?

    --
    Worldwide Military budgets: $2100 billion. Worldwide Space Exploration budgets: $38 billion. Really, world? Really?
    1. Re:Really...? by DaveV1.0 · · Score: 1

      Ok, so where do you calculate BAC?
      Where is the polling of the sensors?

      Where is the rest of the code for the device?

      --
      There is no "-1 offended" or "-1 you don't agree with me" mod options for a reason.
    2. Re:Really...? by Facegarden · · Score: 1

      Ok, so where do you calculate BAC?
      Where is the polling of the sensors?

      Where is the rest of the code for the device?

      Wait, you mean my 3 line program isn't all that is needed? That won't compile and run on it's own?

      *gasp*

      It was a joke, relax. I know embedded stuff, I know there is more work than that.

      I still know that is should not be that hard to take a sensor reading and display it to the user.
      -Taylor

      --
      Worldwide Military budgets: $2100 billion. Worldwide Space Exploration budgets: $38 billion. Really, world? Really?
    3. Re:Really...? by The+Moof · · Score: 1

      I know, seriously. It's missing the mandatory
      if(driver.type == POLITICIAN){
      printf("Look Other Way");
      }

    4. Re:Really...? by Anonymous Coward · · Score: 0

      if(driver.type == POLITICIAN || driver.type == COP){ printf("Look Other Way"); } There, fixed that for you.

    5. Re:Really...? by PPH · · Score: 1

      Ok, so where do you calculate BAC?
      Where is the polling of the sensors?

      Where is the rest of the code for the device?

      We just call the Windows API and hope the correct h/w driver has been installed.

      --
      Have gnu, will travel.
    6. Re:Really...? by Jedi+Alec · · Score: 1

      I know, seriously. It's missing the mandatory
      if(driver.type == POLITICIAN){
      printf("Look Other Way");
      }

      Nah, that's not how it works....

      if(driver.type == POLITICIAN){
      scratch(driver.back);
      present_for_scratching(user.back);
      }

      --

      People replying to my sig annoy me. That's why I change it all the time.
  59. Re:A pyhrric victory for open source and code revi by DaveV1.0 · · Score: 1

    This particular breathalyzer has been proven to be the unreliable POS that it apparently is.

    Please indicate where it is proven to be unreliable. What I see in the report is a lot of criticism of the design and implementation of the code. I see the design of the code would not be acceptable to the U.S. military or the U.S. government and that it would not pass an unnamed standard. I see many "should"s and "can"s and "might"s.

    What I don't see is anything that proves the device itself is unreliable.

    Did they test the code, and if so what were the results of the test? Were they able to show the device does not work accurately and reliably? I see nothing of that in the report.

    --
    There is no "-1 offended" or "-1 you don't agree with me" mod options for a reason.
  60. What is that? by Sybert42 · · Score: 0

    Are you one of those Twitter users? Is that the latest way of speaking on that?

  61. The correct answer by Capt.DrumkenBum · · Score: 1

    The only correct answer to the question, "Have you had anything to drink tonight sir?" is "No."
    Anything else you say can cause you problems.

    --
    If I were God, wouldn't I protect my churches from acts of me?
    1. Re:The correct answer by Leebert · · Score: 1

      The only correct answer to the question, "Have you had anything to drink tonight sir?" is "No."
      Anything else you say can cause you problems.

      Incorrect. Lying will not fix problems, only make them worse. And not only that, you're sacrificing your integrity.

      The only correct response is to not answer, either cleverly redirecting the question: "Do you have reason to think I have?" or flatly refusing to answer the question based on your fifth amendment right to refuse to answer questions whose answers may incriminate you.

  62. The Purpose Of This Code Is An Infinity Loop by Anonymous Coward · · Score: 0

    10 GOTO 10

    1. Re:The Purpose Of This Code Is An Infinity Loop by Anonymous Coward · · Score: 0

      It failed, it creates an infinite loop in most of the cases if you ignore some keyboard input. If you would allow any keyboard input, like ctrl-c, you will need more than that.

      And to get an Infinity Loop, you gotta do much much more.

    2. Re:The Purpose Of This Code Is An Infinity Loop by pnewhook · · Score: 1

      It failed, it creates an infinite loop in most of the cases if you ignore some keyboard input. If you would allow any keyboard input, like ctrl-c, you will need more than that. And to get an Infinity Loop, you gotta do much much more.

      You made an assumption that there's actually an operating system running in the background. If this was an embedded device with no OS this is a perfect infinite loop.

      --
      Tesla was a genius. Edison however was a overrated hack who liked to torture puppies.
    3. Re:The Purpose Of This Code Is An Infinity Loop by Thinboy00 · · Score: 1

      *Pulls plu-(*&*%[NO CARRIER]

      --
      $ make available
  63. Is this 1968? by raehl · · Score: 1

    A moving average is useful if you don't have a large enough data type to store the sum of all the values.

    No, it's not. It's 2009, and bits are cheap.

    1. Re:Is this 1968? by Anonymous Coward · · Score: 0

      To give them the benefit of the doubt, virtually all technology for niche applications contains at least one horribly outdated component.

    2. Re:Is this 1968? by DeadCatX2 · · Score: 5, Insightful

      With an attitude like that, it's obvious that you have little experience with embedded systems...

      --
      :(){ :|:& };:
    3. Re:Is this 1968? by fliptout · · Score: 1

      Who knows. Are we talking, say, 8051 or ARM11 here?

      --
      A witty saying proves you are wittier than the next guy.
    4. Re:Is this 1968? by Reece400 · · Score: 1

      TFA mentions something about 'Atari' hardware from the 70's at the bottom.

    5. Re:Is this 1968? by home-electro.com · · Score: 1

      I do have experience, and bits are really cheap. Look up pricing for PIC12F683, which has 128 bytes of RAM, enough to store 64 of 16 bit values.

    6. Re:Is this 1968? by SnowZero · · Score: 3, Insightful

      Assuming the microcontroller has a 10-bit A/D converter to get the reading, I'm pretty sure such a chip could add 32 numbers together. With the speed of 8-bit microcontrollers these days exceeding 1MHz even at ~$1 price points, emulating 16 bit numbers to get your sum is not a problem. Take a power-of-two number of readings and your average can be a simple bit shift. It will take more horsepower to convert to base-10 on the display than to take the average.

      This is not a cheap child's toy or a toaster, it's a law-enforcment grade breathalyzer going for above $100; there is no excuse for being so lazy. Code that runs on small systems should be *clean* because bugs are harder to find without easy I/O, and the efficiency of it needs to be obvious. Also, code that can put someone in jail should not be spaghetti, regardless of the scale of the system running it.

    7. Re:Is this 1968? by Teancum · · Score: 1

      While I would have to agree that for a device of this nature you would like to see high standards being applied, I think you need to take this into the real world for a minute.

      Not trying to put a stereotype into this, but just imagine a software/electrical engineer with an H1-B visa who can barely read or speak English, is trying to read the specification document (if it exists at all in the first place) for a project like this that has a development budget of say $100,000 (rather typical for niche devices like this... or even on the high side). The total number of units sold is going to be on the order of about 1000 or so (if the device is popular in police departments), keeping in mind that this R&D budget has to be made up somehow.

      Even if you are lucky to have a competent engineer actually working on this rather than whatever donkey had this project piled on their plate, the money is being used to simply get the product out the door. As long as it sort of works at all, that is good enough and most managers don't care about how neat and tidy the code might be.

      BTW, don't get me started on electrical engineers who have had a few software courses thinking that they have the same skills as a formally trained CS graduate. Some of the worst coding practices (and in fairness, some of the best too) I've ever seen have come from electrical engineers. They know the circuitry rather well, but often their coding skills are sufficient only up to a couple thousand lines of code.

      The worst coding example I've seen? How about a global variable named "temp", used in about 50 places (including a recursive subroutine) in the software. It shocked me that the software ran at all.

    8. Re:Is this 1968? by Ihlosi · · Score: 1
      The worst coding example I've seen? How about a global variable named "temp", used in about 50 places (including a recursive subroutine) in the software. It shocked me that the software ran at all.

      Hey, at least the variable name was four characters long, so you could actually search for it.

      Now imagine that global variable being named "i", and occasionally being hidden by definition of a local variable "i", which once in a while also has a different type.

  64. No doubt it does... by msauve · · Score: 1

    most of the time. The real question is, does it work all of the time, every time?

    --
    "National Security is the chief cause of national insecurity." - Celine's First Law
  65. Breathalyzer? by Anonymous Coward · · Score: 0

    Here's a novel idea. When traffic police arrest dangerous drivers, whether sober or drunk, they use the in-car camera to record the driver's dangerous behavior. You could be completely sober, wearing a seat belt, and have all lights and safety equipment on your car in perfect condition--but the dash-cam video will show your unwillingness to drive safely.

    Instead of tackling drunk driving specifically, how about just tackling dangerous driving? There are plenty of drivers who are extremely dangerous while sober, yet nothing is done about them.

  66. Re:Lint is crap by Anonymous Coward · · Score: 0

    Lint isn't a perfect tool by any means but in my opinion, anyone developing C code without it is not acting in a professional manner.

    Corrected to read "Anyone developing C code is not acting in a professional manner"

  67. Re:A pyhrric victory for open source and code revi by ColdWetDog · · Score: 1

    You know, this would be pretty easy to do:

    Get about 100 people, men, woman, kids (oops, not that).

    Give them measured amounts of alcohol in beverage of choice. Have some designated fruit juice drinkers. Draw blood for blood alcohol (reference test), do breathalyzer test simultaneously. Record results.

    Give to statistician. Analyze results.

    Shouldn't be too hard. Where do we sign up?

    --
    Faster! Faster! Faster would be better!
  68. Re:A pyhrric victory for open source and code revi by Uksi · · Score: 1

    I think that cases where .22s are blown are not going to be thrown out just on a faulty breathalyzer argument. Those people are usually detained and then have their blood tested at the police station. Anyone who is that drunk (and is clearly very dangerous) is going to have a way high reading even two hours later. So, in those cases, there should be a mountain of evidence.

    Breathalyzers reasonably have a 30% margin of error, sometimes even more, depending on physiological differences between people. People get DUI tickets at a sobriety checkpoint for drinking two glasses of wine with dinner and registering enough to be over a 0.08, or worse in some states, a 0.06 BAC limit. That's ridiculous.

  69. you can, but it may have consequences.. by Anonymous Coward · · Score: 0

    That may be legal, but the DMV has its own set of rules. Merely refusing a roadside breathalyzer can automatically result in a suspension of your driver's license, regardless of what a blood sample later shows.

  70. But is it broken? HELL YES!!! by swordgeek · · Score: 5, Informative

    OK, LOTS of strange posts from people who claim to have read the article but only see that it's bad code, not actually broken.

    Read it again. It's broken from a legal liability and trustworthiness standpoint. It's broken from a precision standpoint. It's broken from an algorithm standpoint. It is not trusworthy, precise, accurate, or correct.

    "It is clear that, as submitted, the Alcotest software would not pass development standards and testing for the U.S. Government or Military. It would fail software standards for the Federal Aviation Administration (FAA) and Federal Drug Administration (FDA), as well as commercial standards used in devices for public safety. This means the Alcotest would not be considered for military applications such as analyzing breath alcohol for fighter pilots. If the FAA imposed mandatory alcohol testing for all commercial pilots, the Alcotest would be rejected based upon the FAA safety and software standards."

    Nobody in the government or military would be allowed to trust this, if it weren't already in use.

    "Results Limited to Small, Discrete Values"

    Sixteen values is all it displays! It throws away almost all of the precision of the 12-bit ADC, and reduces it to 4 bits! This is NOT precise enough!

    "Catastrophic Error Detection Is Disabled"
    "Diagnostics Adjust/Substitute Data Readings"
    "Range Limits Are Substituted for Incorrect Average Measurements"
    "The software design detects measurement errors, but ignores these errors unless they occur a consecutive total number of times."

    It's not correct. It's not accurate. It's not good enough. The odds are VERY good that some people over the limit have gotten off lucky, and also that some people below the limit now have criminal records.

    --

    "People who do stupid things with hazardous materials often die." -- Jim Davidson on alt.folklore.urban
    1. Re:But is it broken? HELL YES!!! by cc_pirate · · Score: 1

      The hilariously sad part is that NJ decided to still allow the results because some retired ex-judge decided it still 'mostly worked'.

      http://www.thenewspaper.com/news/22/2280.asp

      --

      "There are laws that enslave men, and laws that set them free. " - Sean Connery as King Arthur

  71. Re:But does it work? No. by Americano · · Score: 1

    It doesn't average correctly.

    You don't know that. It doesn't compute a simple arithmetic mean for the set of samples, but rather computes a weighted average where the final reading taken is given emphasis.

    Whether or not that behavior is "correct" in the sense that it gives an accurate number is impossible to say unless you're a subject matter expert.

    All you can say with any certainty is "The comment says it should calculate an average, but it does not calculate an average." It's possible the code is incorrect, and it's also possible that the comment is incorrect, and that when the developer wrote "compute an average," he meant to say "compute the weighted average giving emphasis to more recent values for reasons X, Y, and Z."

  72. Not quite. by PhxBlue · · Score: 1

    The real question is "Does it work repeatedly, reliably, and accurately?" It doesn't matter how complex and/or ugly the code is if the code works beautifully.

    Actually, the question is, "Can an expert prove that the code worked reliably and accurately in one particular case?" The uglier and more complex the code is, the harder a time a prosecutor will have establishing proof beyond reasonable doubt.

    --
    !#@%*)anks for hanging up the phone, dear.
  73. Messy code by DarkIye · · Score: 1

    Messy code is nothing to get worked up about. As long as this code has been proven to work, preferably mathematically (seeing as the results can have a bearing in court), what's the hubbub? Unless it's news to you that the government doesn't care about the tools given to law enforcement as long as they result in more arrests and fines.

    1. Re:Messy code by PPH · · Score: 1

      Messy code is nothing to get worked up about. As long as this code has been proven to work, preferably mathematically

      Just how does one 'prove' that the code works, mathematically or otherwise if it can't be read?

      It might have worked, once upon a time. But as various developers have modified the code over time, how does each one know that they haven't broken something with their mods?

      --
      Have gnu, will travel.
  74. I blame software engineers by Anonymous Coward · · Score: 0

    Companies hire software engineers to do the work of embedded systems developers all the time... they really should stick to desktop code :>

  75. Re:A pyhrric victory for open source and code revi by Anonymous Coward · · Score: 0

    I dont like what you're suggesting; the judical process is bad because it defaults in favor of the defendant. I disagree, I believe it was designed this way on purpose to limit the number of innocent people convicted. Freedom is not a loophole.

  76. Re:Lint is crap by MadShark · · Score: 1

    *laugh* What do you suggest replacing C with? For many of the microcontrollers I've worked on my alternative is assembly language. Ada is better in many respects, but is hard to find developers for, if you can even get a compiler for your architecture. Things like Java or C# are too damn big to fit in the microcontrollers I usually see. Auto generated code from a model has potential, but the tools are EXPENSIVE and have a steep learning curve.

  77. Re:A pyhrric victory for open source and code revi by Henry+Pate · · Score: 1

    We're probably screwed in the appeals but there is a fairly simple solution for new arrests which I think is already in place in some jurisdictions.

    Get a court order to make them take a blood BAC test when they get to the station.

    --
    Si Hoc Legere Scis Nimium Eruditionis Habes
  78. I see the problem... by Anonymous Coward · · Score: 0

    Dev was probably being asked to test his own code. I can see it now... write code, take a shot, test; repeat until code works or dev passes out.

    Actually, sounds like a great deal... I wonder if they're hiring?

  79. come on you all by anonymousNR · · Score: 0

    This is not a robot who stopped the driver and took a breathalyzer and shoved it down the driver's throat. This would have been a trained officer, who would have suspected the driver's behavior and did a test on him right.

    My point is why base judgment on a fucking gadget.

    Wasn't there sobriety tests or something

    --
    -- It is the mark of an educated mind to be able to entertain a thought without accepting it. -- Aristotle
  80. Re:A pyhrric victory for open source and code revi by Anonymous Coward · · Score: 0

    Did you read the Comment There?
    The Text is a defense opinion.
    My LINTed code has errors. I disage with LINT.
    while(1) is an Error LINT wants for(;;)
    even the real hit (No default in a switch()) may not be an error. They did not find any errors the found things that could be errors. Math my not be check if the addition can get that high.
    The Filter is valid, it just did not match the comments.
    The fact that the code was reuse from generation to generation so what.
    The watchdog is not the Computer Operating Properly interrupt. And is not required ( Your PC does not have one).

    When the Code is read and review AND is shown to have a logic flaw, that is news.

    The code could be text book perfect and the defence would hate it.
    Next time the Police should follow up with a blood test and be sure, But the DUI would then complain the hospital equipment had bad code too.

  81. Define "work" by tkrotchko · · Score: 1

    To ask whether it "works", one first have to define what "works" means.

    That means you'd have to compare it against the requirements it was coded against. My read of Bruce Schneier's blog leads me to believe a certain amount of requirements exist (http://www.schneier.com/blog/archives/2009/05/software_proble.html) but the code does not match the requirements. For example, the requirements apparently want multiple readings taken and averaged with each other. However, the code was not written to match the requirement. That hints to me that not only were requirements likely incomplete, but that insufficient test cases were generated. And it is likely that if this test case is missing, probably many more are missing as well.

    It's also interesting that the interrupt to catch illegal instructions was disabled; it's easy to speculate this was done to hide a code crashing issue they couldn't fix before it was shipped. It wouldn't really do for a police officer in the field to be given an "illegal operation please reset" error while trying to check if somebody is alcohol impaired.

    So we already know that it doesn't "work" as defined in it's requirements. What it apparently does is to produce some sort of reading indicating some level of alcohol which may or may not be accurate and it might crash all the time except for some electronic duct tape. While that's a pretty neat trick for a prototype, it's hardly what I'd call production level code, and I can't imagine that acceptable in a court of law. But of course, I know nothing about what's "okay" for a court to accept, so that's an uninformed opinion.

    That's a long way of saying, "No. No it doesn't work.".

    --
    You were mistaken. Which is odd, since memory shouldn't be a problem for you
  82. No 5. by SlashDev · · Score: 1

    No 5 - Lacks positive feedback. That in itself is sufficient to render this equipment useless. I also wonder what would happen if the same instruction was issued multiple times, since it doesn't check to see if the process is running.

    --

    TOP DSLR Cameras Reviews of the top DSLRs
  83. BAC levels aren't black and white! by jtownatpunk.net · · Score: 1

    I'm totally floored that so many people here seem to think that .08 is some magic number that decides the ultimate fate of the world. Do you really think if you blow a .07 that the cop is going to say, "Oh, I'm sorry sir! Please accept my apology and here's a complimentary ticket to the policeman's ball. You have a nice day." DUI/DWI/etc. charges are about impairment. You can be considered impaired at 0.00 if you're unable to safely operate the vehicle. 0.06, 0.07, 0.08, 0.09 is all pretty much the same thing if you're staggering around and unable to function. The number on that unit is just one piece of evidence.

    I agree wholeheartedly that the code on these devices (and radar guns and any other device used to collect evidence) must be subject to public scrutiny and should meet strict specifications and requirements. But this decision doesn't mean it's open season on drunk driving. The cops can still arrest you and they can still use proven methods like blood analysis to support their case. Just means they'll have to take you to the station and they won't have the results right away. Which is totally irrelevant because, once they tell you to step out of the car to evaluate your sobriety, you're almost certainly going to jail. And, if you refuse the blood test, you still get a year of bussing it around town.

    1. Re:BAC levels aren't black and white! by colinrichardday · · Score: 1

      DUI/DWI/etc. charges are about impairment. You can be considered impaired at 0.00 if you're unable to safely operate the vehicle. 0.06, 0.07, 0.08, 0.09 is all pretty much the same thing if you're staggering around and unable to function. The number on that unit is just one piece of evidence.

      The "I" in DUI stands for influence (of alcohol or some other substance). It should not apply if the impairment is due to something else. There is also reckless driving which presumes no impairment at all.

  84. Tunnel vision by NemoinSpace · · Score: 1
    No one seems to realize that accuracy, precision and reproducibility are very different things. All these post's are arguing sophomoric bullshit. It's fairly obvious that anyone arrested for DUI has a second test at the station and certainly has the right to submit to a blood test at a lab of their choice.

    Can anyone show _1_ case where 2 independent tests contradicted each other?

    move along please

  85. Ok but by Sycraft-fu · · Score: 1

    I don't care how big a mess my DVD player is, so long as it works. The code can be as confusing as they like, if the thing plays DVDs, then I'm happy.

    Well that isn't good enough for a critical system. You'll discover that devices used for things like, say, a bio monitor in a hospital are done to a higher standard. This of course increases cost, but that is worth it because failure is not acceptable and could result in large lawsuit.

    Breathalyzers are in a similar situation. Since they can result in serious criminal charges for people, they are a critical system. Thus their code needs to be held to the highest standard.

    So I'm ok if my $50 DVD player has messy code, and if that means that maybe I have to reboot it sometimes. Their goal was to give me DVD playback for cheap, not perfection. However I'm not ok if I go to jail because a breathalyzer screwed up its analysis.

  86. Re:A pyhrric victory for open source and code revi by Anonymous Coward · · Score: 0

    The thing is this: Your not required by any law, due to the bill of rights, to give up anything when your pulled over. Part of the whole problem with the breathalyser is not only has it been suspected as being buggy as hell but your waiving your 5th amendment in the process. It's only by virtue that when you sign for your drivers licence that you will face very stiff penalties if you fail to give a breathalyser that it happens at all.

    So the idea that a blood test is a given is a bit off. Of course the police are going to ask for one but only a fool, and of course most people are foolish by default never mind with a few drinks in them, would consent to adding to the evidence against them.

  87. Re:Lint is crap by Anonymous Coward · · Score: 0

    Just pointing out that you should not rely on tools to get it right for you (worked with too many auto generated code systems which fail), but you have to accept responsibility for your own actions.

  88. I think you're wrong about MADD by Anonymous Coward · · Score: 0

    "I think groups like MADD spend most of their time trying to scare monger politicians into pushing us as close to prohibition as possible "

    Actually I don't believe so. I think what has happened is that there are enough people working for MADD that make a good living at it, and enjoy the publicity, so a rational organization would simply disband, since they achieved their goals about 10 years ago and do something else productive with their lives and time.

    Instead they're basically saying "Oh shit...I don't want to give up this job, I love it", so they're basically scare-mongering to try to convince people to give them more money.

    Kinda like the James Brady organization. The poor guy has half his head blown away, so now he's like a turnip, and his wife found a way to wheel the guy around looking for ways to make money off the poor guy's disability. So Sarah Brady makes a good living while parading her poor shell of a husband is left a circus act.

    I'm only waiting for people to tell me how much they admire the courage of people like that. Chumps.

  89. Re:A pyhrric victory for open source and code revi by DaveV1.0 · · Score: 1

    Have some designated fruit juice drinkers

    This is not necessary.

    --
    There is no "-1 offended" or "-1 you don't agree with me" mod options for a reason.
  90. Re:A pyhrric victory for open source and code revi by AK+Marc · · Score: 1

    The bad: every sleezeball, ambulance chasing, "call lee free", douchebag of a lawyer will use this case to attack the credibility of any and all breathalyzers made in the past, present, or future, spreading enough FUD to juries everywhere that an unacceptable number of drunken idiots get the God given right to keep their license until they finally end up killing someone.

    Good. Breathalizers are crap. Even when they work right, they are crap. They are an ok measure of whether to hold someone for a blood test, but shouldn't be admitted in court. Give the FSB. Take blood. But leave the breathalizer out of it. Oh, and get blood kits that can be administered on scene. Waiting 4 hours to get someone back to the station and have their blood taken by a doctor there won't give good results. Roll EMTs if you have to for every DUI stop, but if you are going to arrest someone for DUI, get their blood at the time of arrest.

  91. Illegal traffic stop? by Anonymous Coward · · Score: 0

    Hell, even I got pulled over once for simply driving at 2am, but my breathalyzer revealed a stunning 0.00% BAC. After chatting with the cop for a bit, turns out they were just looking for easy DUI targets, and I happened to be driving on the same road as them.

    So... the officer admitted to you that he pulled you over without proper reasonable cause? As in he was just conducting a "fishing expedition"? That's wrong, and should not be tolerated in this country. In fact when people (sheeple) start considering themselves "lucky" to not get busted or issued any citation when they were doing nothing wrong in the first place, and they're willing to let the cops get away with this behavior, then this nation is truly a fucked up police state.

    1. Re:Illegal traffic stop? by Bourbonium · · Score: 1

      Bingo! Of course we live in a police state! That's why we have red light cameras that cheat (and the companies that make these cameras sell them to cities with promises of enormous revenue generated through increased traffic tickets) and breathalyzer machines that cheat because DUI convictions are a huge source of revenue, so politicians don't have to raise taxes to pay their own salaries and fund the government.

      But they raise your taxes anyway.

  92. Re:A pyhrric victory for open source and code revi by Anonymous Coward · · Score: 0

    the bad? that's not bad at all. if the state cannot prove beyond any reasonable doubt that the machine measures accurately every time, then they cannot prove beyond a reasonable doubt that you have commited any crime.

    what do you do if you have 1 beer at dinner, drop your cigarette and swerve a little on the way home, get pulled over and the machine reads your .07 BAC as .09?

    remember the law not only states that being over .08 BAC is illegal and bad, it also means that being .08 or under is perfectly fine.

    think about that. the law says you can drive around all you want with alcohol in your system!! because the people have decided that .08 mark your are too unlikely to cause any real damage to anyone else for them to worry about you as a threat...as long as you drive safely.

    if you are driving unsafely you can be removed from the road anyways.

    as far as convictions being over turned for people who don't deserve it: if the methods used to obtain that conviction are not reliable or are downright underhanded, then EVERYBODY convicted deserves to be let off. every last one. if someone is driving erratically and dangerously and you can smell alcohol on his breath, why do you need a number on an LED screen to arrest him?

    machines like this make lazy cops, lazy cops are bad for society, far worse than drunk drivers.

    yes this is a cork popping situation, if the cops have to actually work to take someone off the streets, then perhaps they will make sure their efforts are focussed correctly.

    the police aren't there to protect you, not from theives or from drunks, you are the only person with that responsibility.

  93. The code shouldn't matter here by Invicta{HOG} · · Score: 1

    Why does the code even matter? Even if the code contains errors, the fact of the matter is that the machine itself should be held to the gold standard of the blood test. That should be the only metric (as well as one that lets you know when the machine is malfunctioning, I'll give you that). If it reproduces the blood tests, then it can be used as a reliable proxy. Now, obviously you'd want to hold the manufacturers and end-users to quality control measures which consistently reproduce the correlation and testing should be done under a variety of different conditions to identify any measureable failure rate. But whether the code is or isn't beautiful or does or does not make math errors is inconsequential if it is able to reproduce the blood test. That is, assuming the blood test equipment doesn't share the same errors!

  94. Re:A pyhrric victory for open source and code revi by Anonymous Coward · · Score: 0

    and yes: We all handle our booze differently. Arbitrary limits that determine "drunk" may or may not be the answer. Hardcore drunks will keep driving even after losing their license. DUI's are as much moneymakers for the States as speeding tickets. Yadda yadda yadda.

    And where do you actually refute these statements, which you want to pass off as "yadda yadda yadda"?

    The whole reason behind "reasonable doubt" is that its (far) more important not to convict an innocent person than not to let a guilty person go. If the breathalyzer used to "prove" someone was driving drunk is flawed, there is reasonable doubt to the proof, ergo this doesnt fly. period.

    The argument that police could catch more offenders if they didnt actually have to provide solid proof, can always be applied, and it is always wrong.

  95. In my state (NJ) by way2trivial · · Score: 1

    you can choose to take an alternative test, blood draw or urine sample.

    --
    every day http://en.wikipedia.org/wiki/Special:Random
  96. Any cop worth his donut... by gillbates · · Score: 1

    Could get a drunk convicted without even using a breathalyzer. Things like field sobriety tests, walking a straight line, etc... go a long way. Believe me, in most cases, juries believe whatever an officer says. Take those guys in NY who shot Shawn Bell, on the eve of his wedding: multiple police officers shoot an unarmed man, and no one goes to jail. The cops don't need a breathalyzer. Heck, they don't even need a blood test.

    Sure, there are probably marginal cases, but who cares if someone is 0.01 over the limit? The majority of drunken driving accidents involve people *WELL* over the limit - .15, .28, etc... I'm not so much concerned about the guy who's had a little too much and is just driving back from the bar as the guy who's bombed out of his mind joy riding at 95 miles an hour.

    The problem here is that this device could have sent innocent people to jail, ruined their career prospects, etc... Think about that: simple carelessness on the part of an engineer (really, a programmer, and lousy one at that!), or greed on part of the company that made this device, ("I don't care if it works, we're losing money by the day. Ship it!") sent honest people to jail.

    But, of course, even in the worst case, the only thing which happens to the company is they lose a little income. If any. The cost of their malfeasance is borne by those wrongly convicted, by the taxpayers who must now fund the appeals process, by those whose lives were altered by the drunk drivers this device *didn't* catch.

    The executives of the company should have their licenses revoked, and a felony DUI attached to their record. Only when executives are held (personally) accountable for the actions of their companies will we see the situation improve.

    --
    The society for a thought-free internet welcomes you.
  97. Error(s) in the analysis by Ungrounded+Lightning · · Score: 1

    The first is that in incorrectly averages readings taken, assigning more weight to the first reading than the subsequent ones.

    That is what the analysis claims. In fact the algorithm described assigns higher weight to the later, not the earlier readings - and is an (abrupt) approximation to a low-pass noise filter in the analog world. Weighting later values higher in an average is the appropriate sort of filter for a signal that's converging on a correct measurement but contains noise.

    Similarly the thing with the "delays" being timed against a running periodic-interrupt clock. Maybe that's the RIGHT thing to do. (I know I'm working with a system RIGHT NOW where it is - and code that returned at a "correct" amount of time from the CALL to the delay routine rather than at the appropriate later clock tick would corrupt the measurement - stretching intervals by the time used in processing the previous tick.) To know if it's inducing errors or avoiding them you have to develop an understanding what the code is up to. If the coders picked the wrong sort of timing the "experts" should have been able to tell us why, and how it corrupted the data. They didn't do that.

    There were several other items I take issue with in the analysis - like demanding a recognized programming methodology or claiming that it doesn't pass lint is necessarily bad.

    Yes the code MAY be bad. (Those issues with the resolution an handling of out-of-limit values might be a problem. Pity they weren't described well enough to determine if they were.) And "bad" programming style is LIKELY to produce errors. But the issue here is whether the code gets the answer right enough to be used as evidence in a prosecution, not whether it meets an academic or industry programming fad or a style guideline. (Lint, for instance, gripes about a lot of "nits" that are not errors, merely coding issues that are often associated with errors. Nitpicking is why it's called "lint".)

    This is not to say that other gripes in the report aren't real problems with the code examined. But those first items rang my bullshit detector. They make the rest of the "expert analysis" suspect. For something like this the experts' reports should focus on JUST things that they can SHOW corrupt the result and describe how. Waving their hands at everything that looks bad and might be a sign of error doesn't cut it.

    This jeopardizes future attempts to knock down black box code that really DOES give bad evidence. And it provides a template for knocking down code that gives GOOD evidence that otherwise might be used by an innocent in his defense.

    If you're going to do it in a court of law, do it RIGHT!

    --
    Bantam Dominique roosters crow a four-note song. Once you've heard it as "Happy BIRTHday" you can't NOT hear it that way
    1. Re:Error(s) in the analysis by DarkOx · · Score: 1

      At issue here is if it is reasonable to doubt the validity of the results the machine produces. I would point out all the red flags. Just as you say bad codeing is likely to produce errors. Just like that rusted out junker is more likely to break down on a cross country trip then a better maintained or better build vehicle.

      It is a perfectly valid argument in this case to say that the istrament is more likely to be fault because of the obviously poor craftsmanship that went into it.

      They don't need to show the thing IS WRONG just that its reasonable to think it could be. Its the states job to show that its not reasonable to think it could be wrong, or to have case based on more than the machine. If they had testimony form people who were with the person before the started driving that said "yup we saw him consume several drinks right before he got in the car." and Officer that says "he was all over the road which is why I stopped him in the first place." then the readings of the machine are just more confirmation in the face of other evidence.

      --
      Repeal the 17th Amendment TODAY! Also Please Read http://www.gnu.org/philosophy/right-to-read.html
  98. Last statement is buggy. by Ungrounded+Lightning · · Score: 1

    Verification can prove that your code is correct but for most programs it is unfeasible.

    Verification can prove two EXPRESSIONS of your intent MATCH. It can't prove they're CORRECT. A perfect implementation of "grep" is horribly buggy if what you wanted was "find".

    Creating the second expression of your intent (counting the program as the first - though they usually are in the other order), in a form that can be used as an input to a piece of "correctness proof" software, is itself an act of programming, which may introduce errors.

    Which is not to say that such tools aren't useful: The more divergent the two representations of intent are, the less likely they'll have identical errors. But it DOES say that they don't PROVE the program is CORRECT.

    --
    Bantam Dominique roosters crow a four-note song. Once you've heard it as "Happy BIRTHday" you can't NOT hear it that way
    1. Re:Last statement is buggy. by wfstanle · · Score: 1

      Do you know what you are talking about? I never said that all of big programs can be verified but critical parts of them can. Moreover, if a program is suitably small enough (the software that runs the firmware of a breathalyzer for example) the entire program can be verified. Your statements about only expressions being verifiable is just wrong. Where are you getting your information? Citation would be appreciated. Verification is a very time consuming and costly endeavor and not something you would do unless it is very important to do. Some reasons to verify is safety critical, life support where a persons future is at risk. Sounds like breathalyzer firmware is an example of the last item.

    2. Re:Last statement is buggy. by Ungrounded+Lightning · · Score: 1

      Your statements about only expressions being verifiable is just wrong.

      I see where the confusion lies.

      I'm not talking about only the expression part of a program being "provable".

      I'm talking about an ENTIRE PROGRAM being an EXPRESSION OF THE INTENT of the designer.

      I'm also talking about other expressions of this intent. Examples:
        1) A specification document.
        2) The input to software that attempts to do formal proofs of correctness.

      What I'm saying about formal proof tools is that they requires both the program and item 2). But going from the internal intent of the designer to item 2) is also a job of programming, which can also introduce bugs. The formal proof tool can't tell you that the program did what the designer wanted. It can only tell you that the program code and item 2) matched.

      Similarly a verification effort, human, automated, or a mix, can only tell you that the program matched item 1). It can't tell you if both the program and item 1) diverged from what the designer really wanted because the same mistake was made in both.

      The same logic applies to any other "verification" / "proof of correctness" methodology you can apply to a program.
        - All it can do is prove a match, not correctness.
        - If both of the things being matched have the same error you get a false pass.

      Does that make sense now?

      --
      Bantam Dominique roosters crow a four-note song. Once you've heard it as "Happy BIRTHday" you can't NOT hear it that way
    3. Re:Last statement is buggy. by wfstanle · · Score: 1

      This I can agree with. A program must be in agreement with its specification. Moreover, the specification must also be correct. Often there is a poorly written (or not any) specification.

    4. Re:Last statement is buggy. by Ungrounded+Lightning · · Score: 1

      Great.

      Interestingly: The more divergent the two (or more) expressions of the intent, the less likely it is that identical errors are made in both. Even if it's the same person creating both versions, working in the different languages (i.e. program vs. spec vs. comments vs. formal proof intput vs. constraint definition vs. etc.) provokes a different mindset. By thinking about each part of the program from different angles you have a good chance of getting at least one of the representations right. Once the tool rubs your nose in the problem it's easy to figure out which representation is the one you wanted.

      So even though the formal tools can't prove CORRECTNESS but only MISMATCH, by pointing out the mismatch among the diverse expressions of the designers' intent they drastically reduce the bugs in the final product and increase the chances that it is either bug-free or significant-bug-free.

      --
      Bantam Dominique roosters crow a four-note song. Once you've heard it as "Happy BIRTHday" you can't NOT hear it that way
  99. Re:Lint is crap by Anonymous Coward · · Score: 0

    There are methods for silencing the warnings via special comments
    Did they use them?
    I doubt it. The Bigger Number help their case.

  100. Re:Lint is crap by gknoy · · Score: 1

    Lint doesn't fix the problems, just helps you find problems you have overlooked. It's like an editor or proofreader. No professional author is expected to be perfect, they have people whose job it is to proof writings to ensure they are correct -- Lint does the same thing for code. There's no weakness implied by using it.

    I would surmise that anyone not using lint is either writing something trivial, or is unwilling to find out that their code is imperfect.

  101. traffic light conflict monitor by Joe+The+Dragon · · Score: 3, Interesting

    Equipment can break down and programming errors do occur. Because of the safety issues involved, signals are equipped with a "conflict monitor." A conflict monitor is a simple device, completely independent of the controller, that watches the signal operate. It does this by monitoring a number of conditions, including the voltage to the individual bulbs in the heads.

    If a condition occurs which is not normal (for example opposing greens) the conflict monitor detects the condition and shuts down the intersection. Normally, it places the signal on "flash mode." The main street is given a flashing yellow, to indicate that the situation is not normal and caution is needed. The secondary street is given a flashing red light that should be treated like a stop sign. For safety reasons, the signal will not normally reset itself. A technician must visit the intersection, determine the problem and reset the controller.

    1. Re:traffic light conflict monitor by spud603 · · Score: 1

      Thanks! I was just watching "Live Free or Die Hard" in which all the lights turn green and accidents ensue. I was thinking to myself that there must be some sort of hardware failsafe in traffic lights to prevent this sort of thing.

    2. Re:traffic light conflict monitor by Frank+T.+Lofaro+Jr. · · Score: 1

      I've never seen flashing yellow on one direction and flashing red on the other.

      When lights fail over here (if they aren't dark) it is flashing red in both directions.

      --
      Just because it CAN be done, doesn't mean it should!
    3. Re:traffic light conflict monitor by Joe+The+Dragon · · Score: 1

      some light do have a over night / off peak blinking mode but that is being replaced with one that work based on traffic demand.

  102. Evidence by p51d007 · · Score: 1

    Everyone seems to forget, that the "breath test" is just one piece of the puzzle. You also have the probable cause for the traffic stop (weaving, speeding, improper lane change etc), the gaze nystagmus test, other field sobriety tests (alphabet, heel to toe, hold one foot up). Yes, the breath test is a good indicator, but, even without it, you can still get a conviction "beyond a reasonable doubt"

  103. Why are you suprised by Anonymous Coward · · Score: 0

    You Drove Behind a Cop with Your Brights on and Got pulled Over? Did you lose the Bet? Try it at 20 and 30 Years Old. They will pull you Over every time.

  104. Write Clean Code by greenlead · · Score: 1

    This should serve as a reminder to programmers everywhere to take pride in their work, and tidy up their code before declaring it finished. You never know who is going to read it later.

  105. What U.S. Industry Standards? by ClosedSource · · Score: 1

    There is no such thing as U.S. Industry Standards for software development.

  106. Another way to put this by symbolset · · Score: 1

    The rod you use to measure whether an action is legal or not legal should be a public record. So if this device employs software to perform its function, the software must be in the public record or it should not be used. Noone would stand for secret units to measure the setback for homes, the width of pipes, the diameter of wires required to carry a particular amperage in your home. And nobody should stand for laws or courts that allow for a determination of guilt based on a scale that's not certified by NIST.

    If they want to make the law such that aspirated alcohol be no more than x picograms per Liter measured on a scale with no more than +/- 5%, they can do that and get a certified measuring device that works in one pass. Absent that, if the measure is blood alcohol content they should measure the alcohol content of actual blood in a device certified to measure that unit.

    --
    Help stamp out iliturcy.
  107. Re:A pyhrric victory for open source and code revi by Anonymous Coward · · Score: 0

    You are completely ignoring the case where an innocent person blows "a .22"... which is the whole point to this appeal and the code audit! I'd rather let a million criminals go free than to lock up one innocent person. You seem to go the other route... lock up anyone, anywhere, for any reason, or no reason. That's what I got out of your post.

  108. Simple test by SmallFurryCreature · · Score: 2, Interesting

    Get a driving game or any other skill/reaction based game. I used Grand Prix Legends. Start driving, give yourself time to adjust to get into a grove. Note your average time and accidents. Don't worry to much about speeding, just about making incident free rounds at the maximum of your capibilty BUT in a race so there is traffic.

    Then start drinking. Slowly, alcohol doesn't work instantly. EVEN half a beer will impact your performance.

    Anyone with any brains can reason this out. We drink alcohol because it affects our brain. To say alcohol does not affect you is just silly. It would be like saying being dipped into icy cold water does not affect you.

    When I see people denying alcohol affects them, even to the extent that 0.8 don't means they are drunk, I see someone who is debating with basic chemistry. What would they argue next, that if their blood has no oxygen they ain't dead?

    Really, test it with a game. An objective game in which you can measure a simple statistic but one that reflects the task of driving. Doing something repetitive that you think you can do on auto-pilot but still requires split second reactions when you least expect it. GTA4 come to think of it might be better. Oh and if you hit anything, anything at all, well. Hand in your drivers license.

    --

    MMO Quests are like orgasms:

    You may solo them, I prefer them in a group.

    1. Re:Simple test by Anonymous Coward · · Score: 0

      I did that test last year, after some beers. I was using Rfactor with a wheel and pedals, so a pretty "realistic" experience. The result was that my lap times were slower but no accidents or offroad driving.

  109. Re:A pyhrric victory for open source and code revi by Anonymous Coward · · Score: 0

    You seem to be forgetting, sir, that USA's justice system is built on the premise that it is better that 10 criminals go free,than that one innocent man is punished. Does this mean that sometimes lawbreakers have to be let go because the evidence against them is insufficient? Yes. It also means that spurious evidence ought not convict an innocent .

  110. Re:A pyhrric victory for open source and code revi by Ihlosi · · Score: 1

    You seem to be forgetting, sir, that USA's justice system is built on the premise that it is better that 10 criminals go free,than that one innocent man is punished. Judging from the size of the prison propulation, I'd argue that in practice, it works exactly the opposite way.

  111. Dirty Code != Malfunctioning Code by EmagGeek · · Score: 1

    Just because the code isn't elegantly written doesn't mean that it doesn't work or that it gives inaccurate results.

  112. Re: by blanck · · Score: 1

    Just drink until the code looks pretty.

  113. Re:A pyhrric victory for open source and code revi by Anonymous Coward · · Score: 0

    Please indicate where it is proven to be unreliable.

    Ho hum. So you didn't read the article or the relevant comments.

    1/ The weighted average method (to combine multiple readings) it uses can and will give a positive result in a situation where the normal result would be negative. The reverse situation is also possible. There is no indication that they are doing this for a good reason; they may be using this method purely to simplify the code and reduce storage requirements in this ancient embedded device.

    2/ They apparently reduce all inputs to 3 bits, again for no visible reason.

    3/ The device has various types of error handling turned off so the code will still produce a result even in error situations where it will be meaningless.

    Basically 1/ ensures that *every single reading it produces is wrong* (except in some very special cases like the readings all being identical.
    Buggy enough for you?

  114. Re:A pyhrric victory for open source and code revi by Ihlosi · · Score: 1
    Basically 1/ ensures that *every single reading it produces is wrong* (except in some very special cases like the readings all being identical. Buggy enough for you?

    No. Whether there's a significant difference depends on the analog hardware (i.e. the noise characteristics of the A/D converter and the analog circuitry surrounding it) of the device.

  115. Yesh shonny boy by omuls+are+tasty · · Score: 1

    I knew zhish breshal... zhing doeshn't work!

  116. Re:A pyhrric victory for open source and code revi by Darth_brooks · · Score: 1

    The thing is this: Your not required by any law, due to the bill of rights, to give up anything when your pulled over.

    Look up the definition of "implied consent." By driving a car, which is a privilege granted by the state rather than a fundamental right, your consent to giving a breathalyzer test upon request is implied. Failure to do so, for any reason, will result in the automatic suspension of your drivers license for six months (in Michigan at least.)

    --
    There are some people that if they don't know, you can't tell 'em.
  117. Re:A pyhrric victory for open source and code revi by Anonymous Coward · · Score: 0

    Maybe the state is partially at fault for buying shoddy equipment. (Or maybe not. Did they do a code review? Do they have the resources to one? Probably not. Did you do a code review of the 3com switch in your server room? Their selection criteria can certainly be questioned, but it probably doesn't change the fact that someone drank enough to blow a .22 then decided to drive home.)

    Did the blow a .22, a .01 or did he just eat a kit-kat bar? Thats really the issue that this case is dealing with - given the code review, the machine doesn't know the answer any better than you do.

  118. Re:A pyhrric victory for open source and code revi by Anonymous Coward · · Score: 0

    Yes, but this is why they also drawl blood and analyze the BAC that way. I know around this area they use PBTs (Pre-Breath Tests) to get an idea of what your BAC is, and if close enough (in PA .08 is the "legal limit", but it's a soft limit and they can nail you for any BAC, even .04) they will measure the BAC of the blood its self.

  119. Re:Lint is crap by xenocide2 · · Score: 1

    I've worked with microcontrollers with a language called nesC; it's a C-like language that is translated to C in the end, but heavily relies on gcc directives and ASM to offer concepts the C standard cannot support. Things like interrupts and atomic operations. In fact, it should be possible to implement this without needing C or GCC, but it's just the path to least resistance.

    There's also Wiring, which borrows not from C, but from Processing. I think it too depends on gcc on the end, but again, means to an end. And of course, there's always BASIC stamps ;)

    --
    I Browse at +4 Flamebait

    Open Source Sysadmin