August 16, 2013

Gratuitous Shiny: code_swam

Traceability

Image: A moment from the Eclipse project via http://www.michaelogawa.com/code_swarm/

 

You're probably familiar with the very useful data visualization tools Perforce provides to mine your file history and relationships such as revision graph, time-lapse view, and folder diff. They are all great tools, but I dare say they are too useful and too pragmatic. Some days you need something useless and fun, and in my next couple blog posts I'm going to talk about a couple applications that make version control fun.

If you were fortunate enough to attend the Perforce User's conference in 2010 you may have seen the two cocktail tables in the demo lounge. Both of the tables were running a code_swarm visualization of 14 years of Perforce software development. I put the tables together just to add a bit of color to the lounge, but they turned out to be major focal points in the room. For those of us who believe in the Version Everything mantra, being able to look at 14 years of development is a wonderful way to reminisce about days gone by, and at the very least it made for a very pretty picture.

code_swarm came out of the VIDI group at UC Davis as an attempt to organically visualize how software developers collaborate. As developers create and work on files they pull the files into orbits around them. Developers that share files tend to cluster together as they each pull the same files back and forth. The effect is mesmerizing to say the least. I'm personally not sure I've learned anything valuable from looking at a code_swarm of our source, but it is a lot of fun.

The Perforce data generator that we used to generate our video takes advantage of some Perforce data to make the graph a bit more interesting. If developers work in dev branches using just the depot paths will make it appear that each developer is working on files unrelated to anybody else, when in fact they are just using branched variants. The script uses filelog -i to glue branched variants together so that you can properly visualize people working together. It also cuts down on the number of file objects that poor code_swarm has to track which is a big performance win.

To generate your own code_swam graph today grab the software from here and the data generation script from here. code_swarm does take a lot horsepower to run; our 14 year video tools a little over a week for me to render in the background on my box at work. The results were definitely worth it though!