S h o r t S t o r i e s

// Tales from software development

Getting over the hump

leave a comment »

I’ve been using source code metrics tools for around 12 years and early on I noticed something a little odd about the way that the lines of codes (LOC) metric changes over the course of a project. I’d expected that the LOC value plotted against time would look like this:

This shows the weekly LOC metric for a project of around 12 weeks duration that produces an application of around 34,000 LOC.

As expected, the quantity of code being written in the first few weeks is high but gradually eases off towards the end of the project until perhaps only a few hundred lines of code are being added each week at the end of the project.

In fact, every project I’ve ever worked on and collected metrics for looks like this:

The significant difference is the way that the LOC value starts decreasing at the end of the project. Why ?

It’s simple enough: at this stage of the project developers are rationalising and refactoring code. For example, two developers might have each written a library method that performs almost the same function. One of them will identify the duplication of code and refactor the two methods into one. This kind of activity often happens towards the end of the development phase of a project when developers have started fixing bugs identified in testing.

I think it’s useful to know about this because if you plot the LOC value over the course of your project you can expect to see a peak and then a small decrease towards the end of the development phase. If you see this when you expect to then you can congratulate yourself that this project is going to plan. If you don’t see it, something’s wrong…


Written by Sea Monkey

February 23, 2010 at 9:00 pm

Posted in Development

Tagged with

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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: