Tamin’ that chatterbox

It seems every time I give my Refactoring with code metrics presentation, someone has an acid flashback and tells about the 10,000 line method they ran across in the hunt for a crippling defect. When I was speaking at the PhillyJUG in 2005, I distinctly remember a hip gentleman volunteering he once worked on an application that had a smokin’ 22,000 line method.

Long-winded code may be a badge of courage and often makes for copasetic jokes, but ultimately this kind of code is a bear to maintain and is impractical to test effectively, man. The sixth article in IBM developerWork’s series “In pursuit of code quality” demonstrates three neat-o ways to measure code complexity, based on method length, class length, and intra-class coupling with both PMD and JavaNCSS.

Check out “Tame the chatterbox” and, if it’s your bag, let it all hang out at the “Improve Your Java Code Quality” forum!

Related odds and ends
 

Trackback this Post | Feed on comments to this Post

Leave a Reply