views:

328

answers:

6

I am looking for a tool to help me to more quickly grasp someone else's code. Usually I am working with 10-15 method call chunks scattered across 3-5 modules (DLLs or .NET assemblies). What I am after is a tool which could be used to draw an annotated call diagram in 10-30 minutes.

I think it should look like a some kind of combination of a workflow and combination UML diagrams without the monstrosity of UML editors. Just drop a dozen rectangles on the screen, add a method name to each (and optionally: module name, parameters, etc). Add a quick note what this method does, what goes in, what goes out, etc. Then connect these figures (rectangles) with a different looking arrows to indicate which type this method call is: simple call, a call which returns nothing, remote call, etc.

The important thing - the tool should be easy to use. Otherwise, I could just fire up MS Word and draw it there. But that is not going to be an easy task.

Thanks.

+1  A: 

It sounds like what you are looking is for a lightweight UML-like drawing tool.

There are quite a few that are being developed in academia, which use handwriting recognition and such so you can sketch but a fully-functional model is formed.

If you're just looking for a quick drawing tool, Word is not very convenient, I'd consider using Visio on PC, or OmniGraffle if you're lucky enough to use a mac. These are drawing programs, but easier to use than UML modelers.

There is a doctoral student at Carnegie Mellon whose research is focused on helping people understand control flow in applications and he's building a tool, but as far as I know it's not released yet.

Uri
A: 

Visio is pretty easy to use if you're on Windows, but it'll cost you.

I've heard that ArgoUML is good, but it might be more complex than you're hoping.

Steven Richards
I have tried Visio and in my opinion it is not easy to use.
AlexKelos
A: 

You don't mention which language you're dealing with, so I'll go with one generic answer, and one for C#.

WithClass looks like it does what you're looking for, no matter what language:

[...] allows you to draw UML Diagrams, generate code, and reverse engineer popular OO languages.

Reverse engineer C++. Java, Delphi, VB, IDL, Perl, PHP, C#, and VB.net.

For refactoring C#, IMO nothing beats ReSharper.

Joce
+1  A: 
Perica Zivkovic
+1  A: 

Red Gate's .NET Reflector is a popular free tool for debugging, reverse-engineering and such.

To compliment it, there are several handy add-ins (also free) which will help you visualize with diagrams:

  1. Graph
  2. SequenceViz (Note that this is kind of tedious to install and configure. You will need to install the Win32 port of GNU PlotUtils first, and it isn't very clear in the instructions.)
ewall
A: 

The most useful tool I have ever found for performing this and many other kinds of code analysis is NDepend. It has lots of great analysis out of the box and you can even write queries in a SQL-like dialect CQL (Code Query Language) to get at specific information.

The creator, Patrick Smacchia also blogs and provides additional insights on how to use the tool.

Joe Kuemerle