Search for a tool that will help me analyze and understand the code of other users.

I am looking for a tool that will help me quickly understand other people's code. I usually work with call pieces 10-15 scattered across 3-5 modules (DLLs or .NET assemblies). What I need is a tool that you can use to draw an annotated call chart in 10-30 minutes.

I think it should look like a combination of workflow diagrams and a combination of UML without the monster of UML editors. Just remove a dozen rectangles on the screen, add a method name to each (and optionally: module name, parameters, etc.). Add a short note about what this method does, what happens, what goes out, etc. Then connect these shapes (rectangles) with other looking arrows to indicate what type of call to this method is: a simple call, a call that returns nothing, a remote call, etc.

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

Thanks.

+6
code-analysis code-review
source share
6 answers

It looks like you are looking for a lightweight UML drawing tool.

There are many that are being developed in academia that use handwriting recognition, and therefore you can create sketches, but a fully functional model is formed.

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

Carnegie Mellon has a graduate student whose research is aimed at helping people understand the control flow in applications, and he is creating a tool, but as far as I know, it has not yet been released.

+1
source share
+1
source share

Red Gate.NET Reflector is a popular free tool for debugging, reverse engineering, etc.

To emphasize this, there are a few handy add-ons (also free) that can help you visualize with diagrams:

+1
source share

Visio is pretty easy to use if you are running Windows, but it will cost you.

I heard ArgoUML is good, but it can be harder than you hope.

0
source share

You do not indicate which language you are dealing with, so I will go over with one general answer and another for C #.

WithClass looks like it is doing what you are looking for, no matter what language:

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

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

For C # refactoring, IMO does nothing for ReSharper .

0
source share

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

The creator Patrick Smakchia also blogs and gives additional information on how to use this tool.

0
source share

All Articles