Monday, June 22, 2009

The FAIL MACHINE.

What do you do with an outdated Internet Appliance (the 3-Com Audrey) that no longer has purpose? You turn it into a "fail machine", of course.

We had tossed this idea around the office of having some sort of machine with big buttons on it that we could press any time someone makes a costly or stupid mistake. The buttons would trigger sound effects. Basically, we wanted a public soundboard. But making a soundboard in Flash and emailing it around the office is just not acceptable. We needed a geekier solution.

Here is what I ended up with:


The Audrey has a pretty lousy looking display, but it is a touch screen. So I created the application with four great big pushable buttons.

1) Keyboard Cat - This plays the world renowned "play him off, keyboard cat" jingle. This may be used either when someone leaves our department, or is asked to leave.

2) The Price is Right - This is the losing trumpet sound that the show is famous for. We play this sound quite a bit to signify a minor failure. Now it's always at arms reach.

3) We'll do it live! - Any large project project involves a test system. Then you end up with a test server (or test database) and a production server (or production database). We found that any time we are referring to making changes to the live production stuff, we couldn't resist saying "WE'LL DO IT LIVE!". Now, there's a button for that.

4) EPIC FAIL! - When someone screws up so very, very, badly (never me)... it can only be described as an "EPIC FAIL". This was a tough sound clip to find, but it's totally worth it.

The hardest thing about this project was learning how to build applications in "PhAb", aka the Photon Application Builder for the QNX Operating System. For that matter - finding a really old version of the QNX Operating System (version 6.0) would be difficult too ... but I happened to have it in my collection of obsolete operating systems. I had planned on installing this to a virtual machine only to find that the old OS didn't support modern processors. Yes, it's *that* old. I ended up borrowing an old P3 Dell that was on death row to use as my platform.



I had built a similar application for my Audrey many years ago that just launched a few commonly used applications so that I could use it as a simple jukebox in my kitchen. But that was at least 5 years ago, and my memory went blank when I start up the PhAb program.

There were other complications too, such as the lack of a "play sound" ability within the code. I ended up using the native media player for QNX, called "phplay". But then phplay would stay running after it's done playing a music file. In the end, each button triggers a shell execution of something like "phplay -Si failbutton1.mp3 & sleep 31 && slay phplay". This says "play a sound clip" and simultaneously "wait until it's done (30+ seconds)", then "find and kill the phplay application". The "-Si" switch tells phplay to play from the system tray and not pop up in it's application window form.

What I ended up with ... is an over-complicated soundboard. But if you should ever want your own fail machine, and you happen to own a 3-Com Audrey, I am sharing my code with you. You can download this mess from here.

Happy hacking. Now, play me off Keyboard Cat.

No comments:

Post a Comment