TSA Paid $1.4 Million For Randomizer App That Chooses Left Or Right (geek.com)
An anonymous reader writes: For those of you who have traveled through U.S. airports in recent years, you may have noticed the Transport Security Administration (TSA) use a Randomizer app to randomly search travelers in the Pre-Check lane. The app randomly chooses whether travelers go left or right in the Pre-Check lane so they can't predict which lane each person is assigned to and can't figure out how to avoid the random checks. Developer Kevin Burke submitted a Freedom of Information Act request asking for details about the app. The documents he received reveals the TSA purchased the Randomizer iPad app for $336,413.59. That's $336,413.59 for an app, which is incredibly simple to make as most programming languages of choice have a randomizing function available to use. What may be even more intriguing is that the contract for the TSA Randomizer app was won by IBM. The total amount paid for the project is actually $1.4 million, but the cost is not broken down in Burke's documents. It's possible IBM supplied all the iPads and training in addition to the app itself.
The TSA's employees need training on an app that randomly tells people to go left or right?
He means precisely instances like that. One needs to find a more idiotic view: the app tells TSA person which way to show the finger. If anybody wants an example of fraud, waste and abuse: this is it. We could listen ad nauseum to TSA explanations, saying that app needs to be secure, or that they have to follow the procedures, or they needed many licenses.... blah blah blah
The point is that if airport security would be private that kind of nonsense would not exist by definition. Now it is public money that were spent.
This is not the only software that uses random function. There is another software that randomly selects passengers for additional screening. Here is how Israel does it, does it for free and very effectively: they let the screening agents to pick and choose any passenger that they want or have a hunch. So fare they are very effective in preventing bad dudes in boarding their planes.
If you use something as simple as microseconds on a clock as the seed for your "random" number generation, there's "pretty much" no way you can exploit that short of hacking the device itself.
You would be surprised in just how many ways random numbers can be screwed up.
First "simple as microseconds on a clock" is good, I have seen quite a bit of "randomized" code seeded with the system time. 15 milisecond resolution is the normal case and often leads to duplicated random sequences. High resolution timers exist and are widely available today, however they have to be actually used to help. Alternatively why use a random number generator if you could just request the microsecond time for each request - the low bits should be rather random.
Second mapping the range of the random number generator to your target range without killing the distribution is often non trivial. C++11 came with a whole library to replace rand() and several presentations on the topic, including how rand() % 2 isn't a 50:50 split when the original range has an uneven amount of values.
Third you often don't want a random selection - a fully random sequence can contain long stretches of only left or only right, which can overburden the affected lane while the other remains empty. Which means you somehow have to enforce the wanted distribution over shorter sequences. A simple solution can be implemented by shuffling a list with the wanted ratio of left/right values and a reshuffle each time the list is used up, games sometimes use this to avoid long loose streaks and prevent long win streaks.
I recently read "Lauren Ipsum: A Story About Computer Science and Other Improbable Things" to my eight year old. One of the (many) interesting substories involved "fair coins." Lauren's money isn't taken in Userland because her quarters can't be guaranteed as fair. However, someone points out that you can make any coin a fair coin by flipping it twice. If both flips result in the same side, you ignore it and flip two more times. If the two flips have differing sides, you take the first side.
In other words:
Heads-Heads or Tails-Tails = Flip again.
Heads-Tails = Heads
Tails-Heads = Tails
Even if there's a bias towards one side, it will be cancelled out and the flip would be fair.
My sci-fi novel, Ghost Thief, is now available from Amazon.com.
Seriously, 80%-85% of the bid covers dealing with the US government. Multiple thousand-documents over the course of years, flying back and forth for pointless meetings, and maybe you eventually get paid.
Here are my rates as a developer , for similar software delivered:
Order online, by submitting my order form: $159
Email me and discuss: $500
Meetings to discuss, demo (local businesses): $1,500
Local government bureaucracy: $8,000
Federal government: $400,000