Open the Gate!

The last three places we've lived in South Florida were "gated communities" which is supposed to make you feel exclusive and special.  They provide zero additional security (had a car stolen from one of them in the middle of the night) are often broken, and even when they work they're a pain.  All of our gated communities would link your personal code to a phone number of yours, and when visitors keyed in "112" it would ring your phone. This causes problems:
  • The gate dialer can only link to one phone.  If your wife is traveling and you want some pizza to be delivered, the wife may not be able to pickup the phone and press 6 to let the pizza in.
  • Most can only link to one or two area codes.  One of the systems could only link to a 954 area code number.
  • If you're riding with someone else and don't have your remote with you, you can't get in if your wife isn't with you, or has the cell phone in a bag in your trunk.
The Wife has been out of town for a few days and this finally irritated me to the point where I headed over to Tropo.com and provisioned a simple phone application.  Now when you dial the phone number of my Tropo app, it answers, says "Opening the Gate!" and plays a number 6 key press which tells the gate to open.  Perfect. I heard about Tropo out at CodeConf in San Francisco and have wanted to play with it but didn't have a problem to solve until now.  The entire thing took about 10 minutes to setup with the only really painful thing being the hunting down of a key press sound from http://www.freesound.org/ and the subsequent conversion to a GSM format.  I ended up using the excellent Sox command line sound converter to make the conversion, and then we're in business.  Total cost for the whole thing was zero dollars. The Tropo service is really nice and their documentation is good too.  Their UI for their website is a little clunky in spots.  For example, picking an area code for your number is really painful with about 50 city suggestions and no way to search for an area code or specific city.  They're not alphabetized as far as I can tell either and the city names are super specific so it just makes it hard.  Also, I couldn't find a way in their API to generate a key press tone which meant I had to mess with my own sound files.  That should be built right in or they should provision a directory of key press sounds with your default files. All in all a fun little project to get done while on Amtrak bound for Orlando, and now I can open my gate whenever I want.  Tropo has done a great job with their platform and I'd highly recommend it for these types of tools or any kind of telephony or communications application.

ProTip for Setting Up Django on OSX

Just got around to provisioning Django and Python on my (relatively) new MacBook Air for a project I'm working on in my spare time.  The fact that it's months since I got this machine shows you just how much spare time I have.  That said, I have a confession: I completely suck at deploying things on OS X.  Particularly development things.  I can do this well on Linux environments, but for some reason I just have a really hard time getting Django running on a clean OS X environment. Generally speaking, here's how it goes:
  1. Install the latest Django.
  2. Clone my project from Github.  Follow their excellent documentation to get my keys setup, etc.
  3. Run "python manage.py runserver".
  4. Remember my project requires the Python Imaging Library (PIL).
  5. Download and start the install of the PIL.  Am told it requires Python 2.5 or greater by the OS X installer.
  6. Download Python 3.2, this doesn't work.
  7. Download Python 2.7, this doesn't work.
  8. Download Python 2.6, this doesn't work.
  9. Download Python 2.5, this works.
  10. Now try to run Django and spend 45 minutes in PYTHONPATH hell.
  11. Give up and just re-run the Django installer, this fixes all my environment and pathing problems, and now it works.
  12. Want to kill everyone because this should be easier.
PROTIP for myself: install Django last. If anyone out there has any other tips for how to make this process easier, I'd love to hear them.

Jeopardy and Watson

We had a great time last night watching Watson take on two humans in a round of Jeopardy.  Or at least, I had a great time.  The wife and her sister weren't quite as into it as I was, but they watched it just the same. Here's a recap:
  • The show did a great job explaining what was happening (they burned half the episode on explanations).
  • It's interesting how most people don't understand what the true challenge of this event is (even techies) - Watson has huge volumes of information (he knows a lot of stuff), but the real challenge is understanding the meaning behind a question.  In other words, it's an understanding/comprehension challenge, not a fact challenge.
  • IBM came up with a really neat tool that showed the audience how Watson was playing the game.  They would show the top three answers he came up with and a confidence interval.  Watson would buzz in with the highest rated answer that crossed the confidence interval.  If none of the answers made it across the threshold, he wouldn't buzz in.
  • Alex Trebek gave a tour of the datacenter which had ten-ish racks of IBM servers.  The size of the install was very surprising to our non-technical viewers.
  • Watson glows green when he's confident in his answers, and when he gets one wrong, he glows orange.  This feature was a big hit at our house.
  • Two perfect examples came to light exposing the difficulty of this challenge.  One question made references to the Harry Potter world and a dark lord who challenged him.  It was clearly a Harry Potter question due to the contextual clues, but the answer was "Lord Voldemort".  Watson answered "Harry Potter", but his second choice answer was "Lord Voldemort".  A human who understood the meaning of the question would never have answered in that way.  The second occasion involved Jennings answering "the twenties" to a question, which was wrong.  Watson buzzed in right after him and answered, "the twenties," which no human would ever do.
One question I had was if the text transfer of the questions happens in step with Alex Trebek's reading of them.  Does it happen character by character or does Watson get a few precious seconds while humans are reading the screens?  Conspiracy theorists would probably ask how Watson's first choice was an 800 dollar question (unusual) and he hit the daily double immediately, but it could be part of the IBM team's strategy. All in all, that was probably the most fun I've had watching a TV game show.  Looking forward to the next two episodes.

Post Restore Problems with a MacBook

The Wife's machine was running out of hard disk space, so I decided to to buy her a new 500GB drive and swap it out this weekend.  The words I used to describe the process were "Easy Peasy".  Well, this was the first restore from a Time Machine backup that didn't go perfectly.  Go figure.  The Wife is incredibly fond of her MacBook as well, and she was very concerned that I'd somehow "killed him." The machine couldn't seem to boot.  Gray screen on booth with a spinner.  Boot from the OS X DVD, and run Repair on the disk, doesn't work.  Boot into safe mode.  THAT doesn't work.  Boot with verbose mode, and that seems to be hanging on the wireless driver startup.  Nothing.  Seems. To. Work. Then, I just decided to reinstall Snow Leopard, and it works.  Install the updates, and everything's back to normal.  Weird. Now the MacBook, The Wife, and myself are all happy.