RubyGems code_swarm

drbrain | Wed, 28 Jan 2009 00:59:32 GMT

Posted in ,

I built a code_swarm visualization of the RubyGems repository history:


RubyGems code_swarm (HD) from Eric Hodel on Vimeo.

Coincidentally, you can find a code_swarm visualization for Rails and other projects by Ilya Grigorik. He points to Peter Burns’ fork on GitHub which has a much improved toolset for generating these types of visualizations.

I used the original repository which involves a lot more work. For RubyGems I did roughly the following:

  1. Get a log: svn log v > rubygems.log
  2. Convert the log: python convert_logs.py -s rubygems.log -o rubygems.xml
  3. Munge the XML to remove the CVS conversion commits and hide the renames from trunk/rubygems/ to trunk/
  4. Run code_swarm: code_swarm rubygems.config
  5. Encode PNGs to an MP4: ffmpeg -f image2 -b 1500 -r 24 -i frames/rubygems%05d.png -sameq rubygems.mp4
  6. Upload to Vimeo

I played around with the code_swarm configuration a bit and ended up with this config for code_swarm. My changes give a larger video with more lingering of files as they float around and bumps up font sizes for readability. For more active projects you may need to decrease FileLife and PersonLife. (Really, I’m not sure how they affect things.)

comments

Comments RSS FEED

Great stuff… this reminds me I need to make a new code_swarm visualization of our project.

I find a lot of value from code_swarm visualizations—an intuitive, analog kind of understanding of the life of a coded entity. Thanks for the post!

Mark Coates said about 21 hours later

Do you know if there’s a help file or anything that shows all the available options in the config file and what they do (for instance, the two colors for the ColorAssign options)? Or did you just experiment with stuff?

Elliot Winkler said 3 days later

I just experimented with stuff. Since code_swarm runs the visualization live (but slower than video) it was good enough for me to watch for a minute to see if it looked better or worse.

Eric Hodel said 4 days later

Comments are disabled