Tuesday, June 23, 2009

Open Source Client Simulator

In these days of web 2.0, it's quite common to build clients and servers that communicate with each other. Debugging the communication can be a pain, especially if you're not in control of one end of the connection. This is particularly the case with a service like Twilio, one of a bunch of telephony providers that you can connect your server to. With Twilio, every live test you do requires making or receiving a phone call. This is arduous, takes time, and costs money in phone charges.


So, I wrote a simple simulator to simulate the Twilio server contacting my server, which I released today as open source.

Chlorine is a simple, small (400 lines of JavaScript), and easy-to-use client simulator. It doesn't do much but it does the essentials to allow you to debug a protocol:
  • Submits requests to your server via GET or POST.
  • Displays the results back in a readable fashion, minus the contents of comments and CDATA blocks.
  • Supplies a link you can use to GET the raw response from the server if you need to inspect it (for example, when the server doesn't actually return XML, so it can't be parsed)..
  • Turns any attribute or text value in the result that looks like a URL into a form which will submit that URL back to the server, along with any parameter values you specify.
  • Allows you to configure it to add additional parameter fields to each form that is created.
Chlorine itself is generic, but I've included a version which is configured for use with Twilio. 

Chlorine is available at http://chlorine.googlecode.com

Tuesday, June 2, 2009

Twitter Puzzles on Puzzazz

I launched a new class of puzzles on Puzzazz today -- Twitter Puzzles. Unlike the Daily Puzzles, which will continue to run every day, Puzzazz Twitter puzzles run continuously. Just follow @Puzzazz on Twitter to get them. In addition to the delivery system, they're different in another way. Each puzzle is a "successive reveal" puzzle in which you get a series of clues. The more clues you have, the easier the puzzle is. But, once you know the answer, you'll want to tweet it, since the first person to tweet an answer is designated the winner and immortalized forever on the puzzle's page on Puzzazz.com. If you weren't first, you can visit the puzzle's page to verify your answer (or get additional clues). And don't worry -- the solution is hidden unless you choose to reveal it to preserve the fun.

The puzzles are a mix of different puzzles, ranging from Hangman Trivia to What Goes With? puzzles. You can always see the current puzzle on the site at http://www.puzzazz.com/s and get more information in the FAQ.


These puzzles are part of the broader strategy of extending the Puzzazz brand. I'm interested in what you think.