How We saved the TSA $185,200. I mean 185,200 Bytes.

Photo courtesy of the Transportation Security Administration.

Yesterday afternoon it came to our attention that the TSA paid $1.4 million for a Randomizer app that chooses left or right. Based on several news stories, and the YouTube video of the app in action we thought this was ridiculous. A few other people did too, as a few different variations popped up. Fortunately one was on Github so we forked it. We liked it, but thought it could be lighter, so we cut out a bunch of underused code (e.g. jQuery, Bootstrap) and saved the TSA 80% of their bytes.

Before and After
Before and After

Assuming the Randomizer only needs to run on iOS (or at least a modern browser), we can eliminate a few CSS rules, use transforms, and cut our arrow sprite in half.

If we get rid of the social icons at the bottom (like the TSA would probably do in production, that’s another 16%, and we’re in well under 10Kb of data, and well under a day of development time.

And of course, we have submitted a pull request to Arik in hopes of making things even better.

Photo of Matt Slack

Long a secret weapon at Collective Idea, Matt has been involved with Collective Idea projects since the beginning. He’s our resident web front-end master (webmaster?) who can knock out CSS and HTML faster than you can think.