Archive for the 'tools' Category

Sketching in VOIP with Tropo

Tropo

At eComm Jeevan and I heard some intriguing stuff about a service called Tropo, a cloud-based scriptable VOIP system designed to let web hackers start working in the voice and telephony world.

The app provides a pretty damn slick interface to quickly set up a real phone number (plus SIP plus Skype, all in one place), then assign it to a script written in javascript, groovy, python, ruby, or probably whatever other BSF language they support.

Here’s one I wrote and deployed in about 20 minutes to read off all the Miniature Monster descriptions from the RSS feed (Tropo calls highlighted). You can test it out by calling (650) 273-5382 (or +99000936 9991428654 on Skype, though I haven’t tried that):


require 'net/http'
require 'rexml/document'

answer
wait(3000)
say "hello, welcome to professor engd's miniature monster hotline. here are your monster updates."
wait(1000)

url = "http://feedproxy.google.com/miniaturemonsters"
xml_data = Net::HTTP.get_response(URI.parse(url)).body
xml_doc = REXML::Document.new(xml_data)

xml_doc.elements.to_a( "//description" ).reverse.each do |desc|
  if (m = (/\<div id=\"description\">\s*\<em\>(.*?)\<\/em\>\<\/div\>/i).match(desc.text))
    say m[1]
    wait(1000)
  end
end

hangup

I’ve worked on some projects recently involving Asterisk-to-web-to-hardware style hacking, typically using something like Gizmo to register a regular phone number assigned to a SIP number, then setting up asterisk as the SIP softphone and messing around with a retarded dialplan syntax to get things going. Tropo seems to simplify all that… substantially.

The documentation is solid if a little thin, but it’s so new, and the app is so slick and well done, so I’m sure there’s more coming. It’s unclear at this point which Ruby libraries and gems they support, if any. And it all feels a little like a toy, but no more than, say, Google App Engine, and for me it’s actually more potentially useful. What I can say at this point is that it’s a solid way to sketch your telelphony ideas quickly and with zero setup time, which is very cool. Are you listening ITP?

Anyway, happy voip hacking.

Is it safe to visit…?

Is it safe to visit China?

This week Andy Volk and I put the finishing touches on the first version of isitsafetovisit.com, a simple tool that lets people check safety ratings and advisories for any country in the world.

From our about page: “Every night our trusty scripts head out and find data about the safety rating of each country from the U.S. Department of State, Canadian Foreign Affairs Department, Australia Smart Traveler, and New Zealand Safe Travel. We then compare the ratings and average them together to give our best estimate as to the current safety rating for that country. We’re also tracking the data over time to enable some exciting new features in the future.”

Always dreamed of the beaches in Thailand? Thinking about moving down to Mexico? Or maybe you prefer the safety of Ireland? A big part of what’s interesting about this service is seeing how the various advisories offer alerts and warnings differently. Andy and I are both passionate travelers. We don’t want these advisories to necessarily prevent people from traveling; we’re just trying to make the government recommendations more available and understandable.

Anyway, check out some random countries, and if you have any feedback, leave a comment here or in our forum on GetSatisfaction. Thanks!

Vote for Gentrify!

Vote for Gentrify!

Please please: Vote for Gentrify! (quick signup with OpenID) Support 734m by casting your vote. And tell your friends! Voters even may get prizes!

In case you missed the last post, Gentrify is our Rails Rumble 2008 entry. We pull in data from Google, Craigslist, and Yelp, offering a better way to find desirable locations in San Francisco. See also Huned’s post. It’s a little rough around the edges, but given our 48 hour limit we pulled off a lot of useful and entertaining functionality. In fact I think our usefulness to bug ratio is pretty damn good. Vote now!

I like paper prototyping

The past couple weeks I’ve had a few nice paper prototyping sessions. It’s fun to create little modular UI components and then rearrange them, almost like a game.

I’m drawing inspiration from a couple nice references people have shown me. Jess pointed me to this Vimeo design (which I would include here, except it’s all rights reserved). It’s a really nice, clean style, and I know I like Vimeo’s feel, so I’ve been looking through this whole series.

And then I really like the mock interaction approach in this one (via Deeplinking):

We’re now making some screencasts of clickthroughs on top of the paper. Hopefully we’ll get a few up online soon. They’re a lot rougher/messier than these, but watching the mouse click and interact with the paper UI is really satisfying. It’s a fast process to create this stuff, and users pretty much get it right away, so it seems like a nice way to get feedback quickly.

Watching the internet be slow

Just learned about the Internet Health Report, which sort of helps me understand why everything is so slow today. It is like the knowledge worker equivalent of watching a storm on doppler radar.

If the internet went away, what would happen? I need to start learning some other skills.

Quick batch rename in bash

Visnu showed me a nice, fast way to batch rename a bunch of files in bash. For example, to quickly replace xxx with yyy in all filenames:

for f in *; do mv $f ${f/xxx/yyy}; done

You may want to test it first:

for f in *; do echo $f ${f/xxx/yyy}; done

Data immediacy, publicness, protocols

Lately a few of my social circles seem to be hitting a critical Twitter point, with more people on talking about what they ate for lunch or having weird little conversations or whatever. I’m using it over IM, and it’s fun, definitely distracting, and I think I finally get the hype a little more. It probably won’t be the crazily addictive service for me that I’ve heard it is for others, especially since I refuse to turn it on for my phone. Still, the combination of immediacy with publicness makes it very intriguing.

It’s also not hard to imagine scoping Twitter to selected teams and companies, so the communication is open and archived only within that context. Perhaps this is in Twitter’s business plan, or in someone else’s.

More than anything, whenever I use Twitter I often recall a meme I picked up from Burak’s delicious a while back, that XMPP (Jabber) may be the future of internet services. It’s actually a very simple premise: compared to HTTP polling, XMPP is much better suited to 2-way, stateful, immediate communication. The post comes from an interesting company, Jive Software, that focuses on collaborative systems for business. They clearly have been thinking about XMPP a lot.

Consider a hypothetical platform for public and private data to flow in continually as time-series streams. In almost all cases, the way new data is collected and pushed to this service would be by polling the original source to retrieve the latest update, maybe massaging the data into the right format, then POSTing/PUTting to our service. But rather than this automatic checking and reposting, what we really want is for the data source to just tell us when there is new data, and to either push it to us, or give us a url to retrieve it at. We’d like to register with that source, and from then on continually receive updates as they happen.

Or, since we’re working with data over time, perhaps we’d like our service to nudge data stream providers for the latest data when it’s time to provide it. “OK, it’s been an hour, give me your latest.” If the data script doesn’t provide anything, then we can stick null values in there and just say there is a gap in the data stream.

XMPP makes it easy for either side to initiate the request, and for exchanges to happen as soon as they need to. It’s also been proven to scale well, and there are a ton of clients and libraries out there already. It’s definitely going to play an increasingly important role in services talking to other services, and I’m fairly certain it is the right way to approach data streams. But until then, I’ll just be twittering.