Why Rails?

13 March, 2006

While in a less than fully sober state after the Less Distracted Party last night, Chirs made a disturbingly sound suggestion: now that I'm posting Rails tutorials with some regularity, it might be a good idea to write something about why I find Rails so exciting in the first place and, more specifically, how it fits in with the kinds of things I've always posted about here in the past.

Anyway, what's my answer to Why Rails?. My answer doesn't involve any technical mumbo-jumbo about it being a "fully-integrated web mammy-jammy that requires less XML flim-flam"[*], my answer is simple: Rails lets me make my ideas real. Let me give you an example.

For the past week, I've had a couple of ideas cooking for posts. They're both in the classic IDFDZ style: ideas for ways that common technical experiences could be improved or that technology could be made more useful in everyday life. They would fit comfortably amongst posts like: Bloggable Public Space, Hyperlinks for iTunes, and Use Automator to Append from Anywhere -- things I tend put into the category of Useful Web. The thing is, I haven't posted them because, now that I know Rails, writing them up seems like almost as much work as actually executing them myself.

Here are the ideas:

(1) Mp3 Blog-o-Sphere Influence Map - As part of my preparation for the coming At Dusk New Album Promotion Whirlwind and Clambaketm, I spent a big part of a recent evening making a mental map of the mp3 blogosphere. Now, if you're interested in mp3 blogs, but don't have the thousands of hours it would take to even glance briefly at, say, the two hundred most interesting ones, there's a variety of search engines, indexes, and compendia like elbo.ws, Web Nymph and, of course, Hype Machine (which is easily the best of them) to help you out. They're all great for finding a few of the best blogs or some that might happen to cater to your particular taste. But what they won't give you is a sense of the overall geography of the mp3 blogosphere itself: who listens to whom, which are influential but more obscure, who gets the hot leaked tracks first, who sets opinion in each genre, etc. While staring at my text file with more than 250 urls for mp3 blogs, I had an idea for an app that might be able to start to answer some of these questions. It would begin with a database containing those blogs names and their urls. Then, it would include a script that would, periodically, look at each of the blogs to see which ones linked to which others, to start a map of the social connections. Next, you could start to track songs as they appeared on each blog (by looking at the text of links and even the names of the files that get linked to) and tracking their progress as the got picked up by more blogs and moved through the chain of influence. To put a cherry on top, you could even use the Technorati API to find out which blogs talk about which other blogs and which posts shared common tags. With the data I'd already collected and just the tiniest bit of programming elbow grease, you could start to put together a pretty good picture of how the mp3 blogosphere worked, a picture that might be of interest to quite a few people: aspiring bands, recruiting labels, music pr and marketing muscle, etc.

(2) The Useless Flickr Historical Weather Search - The last week, we've been having incredibly bizarre weather in Portland. It even snowed heavily late one night, enough to stick if only for a few hours. Being a night owl, I caught a picture:



While I was uploading it, the thought crossed my mind that the snow's appearance was so brief that, for plenty of Portlanders waking up the next morning, the presence of my picture in their RSS inbox might be their only direct evidence of it having snowed at all. Also, I realized that, in the metadata to my photo (and I'm sure plenty of other people's), there was as cogent a weather report as I'd ever seen. Tags: "portland oregon night snow storm" and Date: "Taken on March 9, 2006". Pretty soon I was clicking around the tag cloud and realizing that you could, with erratic success, use Flickr to tell you what the weather had been like in a particular city on a particular day. I could see an app: type in a city, state, or country and a date in the past, and find out the weather, with pictures. Did it snow in New York on your grandmother's birthday last year? Was it a White Christmas in Chicago? Once you'd correlated the weather, location, and date together, you could show pictures of what it looked like. Graphs! A widget! You get the point: useless, somewhat playful, kind of surprising use of a photo sharing site to reverse-predict the weather.

Now neither of these ideas are particularly technically challenging or all that innovative or exciting. There's probably no money in either of them. What they are, basically is frivolous. The thing is, now, I'm almost sure that I've spent longer writing them up than it would have taken me to build Rails-based sites that would constitute at least basic 0.1 alpha versions of them. Since Rails handles all of the things that get repeated across each new web application project now matter how big or how small (and handles them with a great deal of grace and ease) it makes the small ones almost too easy. Without the overhead, all you're left with is the idea. And if it's modest enough, as these certainly are, and you've articulated it clearly enough to yourself, there's really very little work involved in making it real. Rails makes building frivolous applications practicable.

For example, the biggest single chunk of time on the mp3 blog app would be taken typing in the names and urls of the blogs themselves (in fact, it would almost definitely be faster, at this point, to write a script that would import them wholesale from my text file). On the Flickr app, the big technical challenge is actually talking to the Flickr API (I've been glossing over this: API stands for "application programming interface". With web apps like Amazon, Blogger, and, especially, Google the companies behind them make their data and functionality publicly available for use by other people over the web. That's how you see Google maps on every new website and blogging software than can send your posts directly to your Blogger blog.). But there are such great tools for talking to the Flickr API in Ruby, that doing so has been compared to writing florid love poetry.

Rails development is so easy and quick that there really doesn't have to be a practical motive (let alone a financial one) for taking on small projects like these. Put another way, Rails makes it possible for web development to become art: an expressive medium whose practice is an end in itself.

[*]Some technical jargon may have been removed from this sentence for your protection -- ed.

Tagged: , , , , , , ,