Once upon a time, a client of the day job dropped a substantial Perl codebase on our desk and said "Tell us what this does." My boss gave me the job, and expected me to actually READ all the code, but given that I had no desire to read through 100 kloc of Perl code commented only in Japanese, I went for visualization instead:<p>1) Inspect several files for commonalities. Thankfully, the author was obsessive compulsive about coding standards.<p>2) Write a parser for the Perl they used. Use it to glean what pages of the site were connected to each other and what the flow control was like. (a -> b, b -> c, b -> d, etc)<p>3) Plot that on a graph (all hard work already done for me: <a href="http://rgl.rubyforge.org/rgl/index.html" rel="nofollow">http://rgl.rubyforge.org/rgl/index.html</a> )<p>4) Visually inspect the graph to learn non-obvious things about the codebase like "Oh, there is an English language version of the site embedded in here. Isn't that TOTALLY UNDOCUMENTED." Do a bit more code to chop the graph into subgraphs by related functionality (signup flow, admin functions, etc etc).<p>5) Spit out all the code into HTML pages with appropriate autogenerated navigation, inline flow control graphs, and syntax highlighting. Do a bit of quality control, add in some comments about notable things I had learned, burn on CD and hand to customer.<p>6) Charge customer $X0,000 for the CD. The customer was overjoyed they got it done so cheaply. (Did I mention <i>100 kloc of Perl</i>?)