Agile FAQs
  About   Slides   Home  

 
Managed Chaos
Naresh Jain’s Random Thoughts on Software Development and Adventure Sports
     
`
 
Discovering...
Industrial Logic

Microblog Feed
    Previous Feeds...
    Recent Thoughts

    Recent Comments
    Categories
    Archives
    February 2009
    M T W T F S S
    « Jan   Mar »
     1
    2345678
    9101112131415
    16171819202122
    232425262728  
    RSS Feed
    Add to Technorati Favorites

    Project Rescue Report

    Recently I spent 2 Weeks helping a project clear its Technical Debt. Here are some results:

    Topic Before After
    Project Size Production Code

    • Package = 7
    • Classes = 23
    • Methods = 104 (average 4.52/class)
    • LOC = 912 (average 8.77/method and 39.65/class)
    • Average Cyclomatic Complexity/Method = 2.04

    Test Code

    • Package = 1
    • Classes = 10
    • Methods = 92
    • LOC = 410
    Production Code

    • Package = 4
    • Classes = 20
    • Methods = 89 (average 4.45/class)
    • LOC = 627 (average 7.04/method and 31.35/class)
    • Average Cyclomatic Complexity/Method = 1.79

    Test Code

    • Package = 4
    • Classes = 18
    • Methods = 120
    • LOC = 771
    Code Coverage
    • Line Coverage: 46%
    • Block Coverage: 43%

    Coverage report before Refactoring

    • Line Coverage: 94%
    • Block Coverage: 96%

    Coverage report after refactoring

    Cyclomatic Complexity

    Cyclomatic Complexity report before Refactoring

    Cyclomatic Complexity report after Refactoring

    Obvious Dead Code Following public methods:

    • class CryptoUtils: String getSHA1HashOfString(String), String encryptString(String), String decryptString(String)
    • class DbLogger: writeToTable(String, String)
    • class DebugUtils: String convertListToString(java.util.List), String convertStrArrayToString(String)
    • class FileSystem: int getNumLinesInFile(String)

    Total: 7 methods in 4 classes

    Following public methods:

    • class BackgroundDBWriter: stop()

    Total: 1 method in 1 class

    Note: This method is required by the tests.

    Automation
    Version Control Usage
    • Average Commits Per Day = 1
    • Average # of Files Changed Per Commit = 2
    • Average Commits Per Day = 4
    • Average # of Files Changed Per Commit = 9

    Note: Since we are heavily refactoring, lots of files are touched for each commit. But the frequency of commit is fairly high to ensure we are not taking big leaps.

    Coding Convention Violation 976 0

    Something interesting to watch out is how the production code becomes more crisp (fewer packages, classes and LOC) and how the amount of test code becomes greater than the production code.

    Another similar report.

    • Share/Bookmark
    • I just finished reading Object-Oriented Software Metrics from Mark Lorenz and Jeff Kidd.  Since it\'s not quite a new book, I was looking for more recent metrics from real projects. Thanks for sharing that information!
    • Howdy Naresh,


      I'm glad you found Panopticode useful. This is exactly what I wrote it for.


      I'm about to start active development on Panopticode again. Do you have any feature requests or feedback for Panopticode?
    blog comments powered by Disqus
        Licensed under
    Creative Commons License
    Design by vikivix