Search code examples
visualizationlegacylegacy-code

Getting your head around other people's code


I'm occasionally unfortunate enough to have to make alterations to very old, poorly not documented and poorly not designed code.

It often takes a long time to make a simple change because there is not much structure to the existing code and I really have to read a lot of code before I have a feel for where things would be.

What I think would help a lot in cases like this is a tool that would allow one to visualise an overview of the code, and then maybe even drill down for more detail. I suspect such a tool would be very hard to get right, given that is trying to find structure where there is little or none.

I guess this is not really a question, but rather a musing. I should make it into a question - What do others do to assist in getting their head around other peoples code, the good and the bad?


Solution

  • I strongly recommend BOUML. It's a free UML modelling tool, which:

    • is extremely fast (fastest UML tool ever created, check out benchmarks),
    • has rock solid C++ import support,
    • has great SVG export support, which is important, because viewing large graphs in vector format, which scales fast in e.g. Firefox, is very convenient (you can quickly switch between "birds eye" view and class detail view),
    • is full featured, intensively developed (look at development history, it's hard to believe that so fast progress is possible).

    So: import your code into BOUML and view it there, or export to SVG and view it in Firefox.