Welcome!

Software As If It Matters

David Dossot

Subscribe to David Dossot: eMailAlertsEmail Alerts
Get David Dossot via: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Blog Feed Post

Legacy Code Sonar Signature

In "Working Effectively with Legacy Code", Michael Feathers gives this definition:
To me, legacy code is simply code without tests.
He also adds:
I've gotten some grief for this definition.
Indeed, defining legacy code is hard.

After purging one of our project from code that we consider legacy (deprecated, EJB2...), we noticed this interesting trend in our Sonar dashboard:

Notice how code coverage is way less affected than complexity and rules compliance. Our legacy code had test coverage, not the greatest ever, but it had some.

Therefore, I am wondering if we could then postulate that legacy code is code that has fallen short of software development standards?

This is actually what is expressed by the above graph: ditching legacy code drastically improved compliance to standards expressed as acceptable complexity and compliance to coding rules. These standards evolve over time: as legacy code is left abandoned, it slowly drifts away and gets less and less compliant by just standing still.

Have you noticed similar trends?

Read the original blog entry...

More Stories By David Dossot

David Dossot has worked as a software engineer and architect for more than 14 years. He is a co-author of Mule in Action and is the project despot of the JCR Transport and a member of the Mule Community Committee. He is the project lead of NxBRE, an open source business rules engine for the .NET platform (selected for O'Reilly's Windows Developer Power Tools). He is also a judge for the Jolt Product Excellence Awards and has written several articles for SD Magazine. He holds a Production Systems Engineering Diploma from ESSTIN.