Thoughts on Technology, Methodology and Programming.

Code Metrics, Code smells and Refactoring in Practice

Posted by Marcus Wyatt on 27 February 2006

In this article I describe how our team uses metrics to identify code smells and apply refactorings to correct these code smells. This example is real simple but it shows exactly how some of the eXtreme programming practices are helping our team to maintain our code. 


Our team uses eXtreme programming practices to manage development on a mission critical system for a large retail chain. We have not adopted all the practices, but use the majority of the practices.

Here is a list of the practices we use:

Every morning at the standup meeting the team lead will report on the nightly integration build.

This report includes the following metrics:

  • Unit tests passed, failed, ignored
  • Fit test passed, failed, ignored, exceptions
  • Test Coverage (Should be more than 80%)
  • Cyclomatic complexity (Should be less than 10)
  • Code Instructions (Should be less than a 100)
  • FxCop rule validations

Each day metrics are compared to the previous day and overall the project manager tracks these metrics to get an overall feel for the health of the project.

You can find the rest of the article here.


tags: , , , , , , ,

Currently listening to: 19 Vegas Soul-Junk Funk – Winamp *** 46. DANNY TENAGLIA – 19 Vegas Soul-Junk Funk


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: