Ruby Swarms: Visualizing Rails & Git

Let's face it, few can resist a well done data visualization, and I'm certainly not an exception to the rule. For this reason, I've had my eye on the Processing language for quiet some time, and in case you're not convinced, take a look at some of the demos. Initially started by Ben Fry and Casey Reas from the MIT Media Lab, the project has gathered a nice momentum, and a large number of third party libraries, one of which finally put me over the top: code swarm (demos)!

Getting started with code_swarm

The best description of code swarm is ' organic software visualization': find a repo, run code swarm and watch the project come alive as the entire commit history is replayed for you a day at a time. To get started, I would recommend checking out Peter Burns' fork on GitHub, as it contains a number of fixes and a simple executable which you can add to your path to easily visualize your SVN, Git, or Mercurial project.

Rendering 'Gitter' swarms

Inspired by Jamie Wilkinson recent visualization of Obama's wikipedia page I wanted to create a visualization of individual contributors on GitHub, and hence gitter was born: a simple script which uses the GitHub API to lookup all of the authors repos, find his/her commits and generates a timestamped history log (xml), which in turn, can be fed into code_swarm. The results are intriguing: Scott Chacon has an understandable but borderline unhealthy obsession with Git, Yehuda Katz obviously has some skin in the game for Merb, and Dr. Nic really likes TextMate (you'll have to go to Vimeo to view it in HD, which I recommend):

gitter - Visualizing Git History

Rails '08: Better, Faster, Stronger

Ah, but what about Rails? Turns out, all the hearsay evidence about Rails not being so hot anymore is a wild understatement. In fact, 2008 has been by far the most exciting year for the project. Take a look at the video, it's about 6 minutes long and starts in the distant '04, but then skip to April '08, and you'll see something amazing (you'll have to go to Vimeo to view it in HD, which I recommend):

You guessed it, in April '08 Rails officially migrated to GitHub and the floodgates haven't closed since. My prediction for '09: Merb plus Rails means I'll need a much bigger screen just to render all the contributor icons.


Ilya Grigorik

Ilya Grigorik is a web performance engineer and developer advocate at Google, where his focus is on making the web fast and driving adoption of performance best practices at Google and beyond.