Twitter icon.
Random notes on software, programming and languages.
By Adrian Kuhn

A Software Cartographer’s Vision


It is my vision that developers can speak of code as “up in the north”, “over in the west”, or “down-under in south”. I want to provide developers (and everyone else involved in software development) with a shared & stable & spatial mental model of their project.

A mental model of code that is shared with your team mates and that is stable over time and that is spatial so you can grok it. They way I try to reinforce this, is by providing a map in your IDE. The map is always visible in the bottom-left, just like the navi in your car. Whatever you do in the IDE is reflected on the map.

When you open a source file, its name pops up on the map.

When you browse references or callers, arrows show up on the map, pointing from where you are to references respectively callers.

When you run tests, tubes pop up filled with colored chemicals in green, yellow, or red.

When you are tracking down a bug in the debugger, arrows pop up and show the current stack trace.

Codemap: sneak peek of call graph visualization.

The idea of the map is to provide you with a spatial model of your software. You will quickly learn that, for example, web UI code is in the north, the database layer in the south, unit tests are in the west, and the whole buggy XML mess over there in the east.

On the map, code is grouped by topic and not by structure. That is, even if your architecture sucks, you’ll get a meaningful map that will guide you out of the mess, as you refactor it.

At first, it can be unfamiliar to see code grouped by topic rather than by packages, but you’ll get used to it very quickly. Also, if you come back to the same project a year later, code is supposed to be roughly at the same location (unless of course, in the meantime, domain tectonics put the world of your application upside-down).

Cross-cutting topics are not always a sign of bad packaging. Just think of “session timeout” in both the user interface and the database layer. You won’t probably be able to factor it out into a common class. But still, codemap will put it on a landslide connecting north and south, such that you can find both classes in one place when working on that mysterious bug report related to timeouts. And even better, all your domain classes related to time will be grouped closely in the same neighborhood.

…and you will recall the blue avatar of your team mate that was busy down there yesterday. Dropping him a line of chat might be the quickest way to get that bug killed.

A prototype of Codemap is available for Eclipse.

Not everything is working yet up to our expectations, but you are welcome to give it a try and let us know how you like it. Just follow @codemap on twitter for news, feedback and questions.

— Adrian and David

2 Responses to “A Software Cartographer’s Vision”

  1. Kael Rowan Says:

    Have you seen the Code Canvas project by Microsoft Research?

  2. Daniel Gasienica Says:

    Wonderful. Imagine your software maps visualized with Seadragon.

    Cheers,
    Daniel

For.example is Digg proof thanks to caching by WP Super Cache!