20141208

How to Get a Restaurant Reservation with only 57 lines of Code

The restaurant I wanted takes reservations six weeks in advance, every Monday at 10:30am.  So every Monday I would call a few times, and then give up. I don't have time for this nonsense!

Then I got mad and realized I could use Twilio.  Twilio is a neat system that provides programmatic access to the phone system — making calls, receiving calls, conference calls, recording calls and sending/receiving text messages.

Twilio was fun to learn. Once you get it working, you can make phone calls from the command line! I wrote a little script that would call any number, and if it was busy, hang up and try again right away. Once it gets through, then it adds them to a conference call, which I'm already in.

So this morning, the moment of truth came and we started dialing away.  Six minutes and seventy call attempts later, I was in!

Easy :)