Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Ovid (2709)

Ovid
  (email not shown publicly)
http://publius-ovidius.livejournal.com/
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Thursday February 26, 2009
10:56 AM

Why Visualization Rocks

[ #38553 ]

You've probably read about Class::Sniff, software I've "written in anger" to deal with some terribly class composition issues. Because I already had a graph available, I decided to use it for visualization of class hierarchies. I know some people sneer at visualization ("hey, just let me read the code!"), but really, they're wrong. Reading code gives you fine-grained knowledge that a diagram cannot. Seeing the diagram instantly gives you knowledge about the code which it could ages slogging through the code to acquire.

jplindstrom started using Class::Sniff to refactor our code base. Here's a small part of it before using Class::Sniff. Here's the same bit after using Class::Sniff. It still has issues, but it is far, far better than it was. Heck, which would you want to work on?

Our test suite reveals that this refactoring has introduced one bug -- amusingly in the code with the tiny amount of multiple inheritance left. Seems we have an exception being thrown twice, but we're having trouble tracking it down.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • This had nothing to do with multiple inheritance. At all.

    The problem was it wasn't a pure refactoring. It added functionality to a class (which was appropriate), and the setup code for the failing test wasn't amended to reflect this.

    • Are you saying that you don't have a problem with multiple inheritance, or that you're just not worried about it and eliminating it was just a side-effect of something else you were trying to do?

      • I'm saying the bug had nothing to do with MI.

        My reply was referring to the last paragraph about the bug, not the whole post. Reading the reply again, I can see that wasn't clear.