« Zeno-Length Iterations | Main | Festering Code Bases and Budding Code Bases »

May 24, 2010



This is pure and simple, which leads to brilliant, thanks for sharing.

Do you use a tool to automatically build the graphs?

I wonder whether there is a graph based IDE - the notion at least seems to me to be a good idea.

Martin Aatmaa

I always wondered whether a visual (graph) layout would enable different or quicker reasoning about software (compared to textual representations), or whether this was just a matter of personal preference.

"Code Bubbles" is a great step in this direction: http://www.youtube.com/watch?v=PsPX0nElJ0k&feature=player_embedded

Michael Feathers

ServerDude: Yeah, it's a handwritten tool which uses BCEL to pull info from class files, produce dot files and then render them with GraphViz's neato. I'm going to put it up on github soon.


Sounds even better :)

Magnus Skog

Hi Michael,

Very nice with tools that help you visualize the problem and the design behind the problem. Could you recommend a similar tool to someone working with C++?



Great post.

Peter Provost

Mike, have you looked at the DGML graph generation stuff in Visual Studio 2010 Ultimate? It will make the graphs you are talking about.

Matt Read

Structure101 (the most useful code analysis tool you've never heard of) does something like this too. If you drill down to an individual class and look at what they call partitions. I'm convinced this is an automatable refactoring but haven't fully worked out the rules yet though.

Account Deleted

I loved Michael's book and a few years ago I was inspired by the book to write a tool (classgraph on sf.net ) for graphing class structure.
It worked with Eclipse 2 and it still works despite not being maintained anymore for some years.


Interesting approach with those 'class feature diagrams'. This should be made available to all IDE's IMO.

It makes the coupling and cohesion instantly clear, which eases the improvement of the object model.

For instance, take the second example which clearly shows the class consists of 2 parts which can be separated (one with 2 functions and 1 field and one with 4 functions and 2 fields).

Billy Gitel

What approach do you advocate to handle a command failure (since it is void and can not return a failure indicator)?

The comments to this entry are closed.