Sunday, February 7, 2010

Source code evolution visualization: the moving picture metaphor

Just to share with you a visualization from the development history of my relatively recent OSGi based project at Certum.



It's not Star Wars! I'd rather call it "Code Wars" =)

It was created with Andrew Caudwell's gource and it's based on our project's 2nd repository (we moved from CVS without preserving full history), but you can quickly get a feeling of these points:
  1. Developer participation was very intermittent (due to customer and management decisions).
  2. We lacked (and it was impossible to set) a clear responsibility demarcation for each developer and module (a developer should touch only upon a restricted set of modules).
  3. Developers had very different involvement and working patterns.
I think the most important thing about gource is that it enables and gives inspiration for a whole new family of software archeology tools and practices, with far reaching implications for software maintenance. Imagine this:
  • Having a control panel for the replay of this kind of visualizations, with 1) filters for developers, modules and time frame. And 2) controls for playback, zooming and panning at will.
  • Being able to specify mapping rules from physical files to design modules (which could be much more useful) and with the option to choose between both.
  • Integrating this view with your project dashboards (e.g. JIRA)
You could use this setup to:
  • Quickly get an objective idea of the source code evolution, in terms of work done.
  • If you are new to the project, get a feeling of the most recent project dynamics.
  • Identify time frames which produced the most unstable modules, and try to correlate this with the project's context and practices at the time.
  • Correlate with other charts and visualizations.
  • Identify project landmarks, and attach metadata and links to other sources providing more information of the events.
In a sense, this kind of view is an implementation of "The Moving Picture Metaphor" as exposed by Mark Mahoney last OOPSLA conference. It's not an implementation of the whole metaphor, but It's a feasible one and it's certainly a great start.

A complementary view to the one provided by gource is that of the source code metrics evolution, for example, as given by the Motion Chart plugin for Sonar. I've found it really useful.

You may think software archaeology is a useless subject which people like me do just for fun. If you are that kind of guy, let me tell you this, loud and clear: people who don't know and understand the past are condemned to repeat the same mistakes over and over again.

If you are interested in the high definition video, let me know =)

4 comentarios:

  1. Very interesting video. Your link to the OGSI web site (1st paragraph) is however not correct.

    ReplyDelete
  2. I've recently got similar insight by trying to visualize our perforce repository with gource:

    http://blog.ruslans.com/2010/01/code-opera-using-gource-to-watch-story.html

    It can be quite amazing from the entertaining perspective. But also, I believe, it has a big practical potential for improving our mental models of the codebase we work with.

    But it has a long way to go before it happens.

    ReplyDelete
  3. OSGi link is fixed =)
    I hadn't setup mail notifications for comments. Shame of me! =(

    ReplyDelete