Skip to main content


Showing posts from October, 2010

Telephony: Blatantly Open Source Phone Trees

As I mentioned in my last post , I just launched Teladventure, a phone based adventure game. (The phone number is (888) 877-7418.) Anyway, I added a "learn more" menu option to the phone tree. It says: Teladventure was created by Shannon -jj Behrens using Ruby on Rails and Twilio. Please feel free to submit feedback to the author by emailing him at j,j,i,n,u,x,at,g,mail,dot,com. Teladventure is open source. You can get the source code from git,hub,dot,com,slash,j,j,i,n,u,x,slash,t,e,l,adventure. (The commas are there to help the text to speech engine.) Why am I bringing this up? When was the last time you called a phone number and got a phone tree that told you that it was open source and gave you the URL to download it? ;)

Teladventure: A Phone-based Adventure Game

I just finished building a phone-based adventure game. The number is (888) 877-7418 (which is a toll free number). The code is here: . Give it a shot! I used Ruby on Rails, behavioral-driven development (with Cucumber), and Twilio. However, these same tricks work in Python too since Twilio is language agnostic. Check out my previous post about using behavior-driven development to build phone trees .

Ruby: Phone Trees

I just finished building my first, fully-functional, non-trivial phone tree. This is exciting because it only took me two days. It has a bunch of submenus, it records and plays back content from the user, and it's even pretty friendly about confirmations. I built it using Ruby on Rails and Twilio which is where I just started working. Building a telephone app using web technologies is very comfortable. What's most amazing is that I used behavioral driven development using Cucumber in order to develop the app. In fact, I didn't even call my app until I had finished building it. It was mostly correct the first time I called it. Using Cucumber to walk through all the user-flows in the phone tree was a big win! Note, I didn't use one assertion per test as I warned against here , but rather wrote very full integration tests that walked around the phone tree quite a bit. Here's an example test that actually interacts with the phone tree: Scenario: delete a frie

Rails: Fat Tests Considered Unharmful

How many assertions should a test have? For instance, how many times should you use ".should" in an RSpec test? How many times should you use "Then" in a Cucumber test? I have seen some developers work very hard to never have more than 1-2 assertions per test. They consider tests that are more than 3 lines long to be a code smell, and they tend to break up tests so that there is one assertion per test. I'd like to suggest that this conventional approach has some downsides that are too often overlooked. First of all, what are the upsides of super skinny tests? If you put 10 assertions each into their own test, then you can get very fine-grained results concerning which tests pass and which tests fail. That's useful. However, fine-grained results aren't all that crucial. I actually don't care all that much whether one test fails or ten tests fail. It doesn't really tell me how many bugs there are. Either way, it could be a single misspe

Personal: Fandor is Launching

The site I've been working on for the last year, Fandor, is finally ready! If you like independent and international films, you might want to check it out. Fandor is a subscription service for streaming independent films on demand. As we move into a new phase, we are inviting our friends and family to sign up for a one-month free trial. To sign up, go here and fill out the quick subscription form: This is the first version of the site, so we anticipate many changes to come. Please don't hesitate to give feedback. Your comments and questions will be very helpful as we shape the service. By the way, no it wasn't my idea to require a credit card before you can look around on the site ;) Have fun!