Code Swarm
Visualizes code collaboration from git repositories

Dec 7, 2012

See It In Action


Code Swarm - Rails

Apparently, in 2008 Rails switched to github. I see that pretty clearly :)


Code Swarm - STC Shifts

Code Swarm - STC Reservations

STC usually only works in the summer. Sometimes Adam tweaks things during the year. Some people import more libraries than others.

Getting it working

I have a full gist that describes how I set it up; just a quick summary here.

I cloned this, and set up the prerequisites according to the README:

This commit broke everything for me, so reverted it. I don’t know enough python to come up with a better solution, but I put a note on their wiki page

Then I ran the command code_swarm in the directory of my project.

Beautiful video appeared!

Getting Video Out

Then I edited the .config file (after running it once) so that it would record frames

# Save each frame to an image? TakeSnapshots=true

Then I followed these instructions to create the video (using ffmpeg, because that’s what I had already):

ffmpeg -f image2 -r 24 -i %05d.png -sameq ./ -pass 2

Built-in command for video

It looks like there’s a command code_swarm_video that would generate a video more easily, but it requires mencoder which I never got working.

Would this be easier if I just got mencoder working? Or would it be better to write-in a ffmpeg alternative?

Casey's headshot

Hi, I'm Casey!

I'm all about helping people be
happy and effective.

Casey has dual backgrounds in psychology and software development. He is the author of Debugging Your Brain, an applied psychology and self-help book. He has worked in tech for 10+ years in many roles: Product Manager, Engineering Manager, and UX Developer.

Want your team to be the happiest, most effective team around? Casey is uniquely capable of helping transform the culture of your tech team. Your company deserves Casey's support: keynote presentations, workshops, and coaching.