Wednesday, March 3, 2010

How to Calculate Software Development Productivity

There have been many attempts to define metrics that effectively measure software development productivity. Most of the ones that I have seen are amazingly complicated and very difficult to apply.

A simpler productivity metric is the total number of lines of code in the organization divided by the number of people who are working on that code (including QA as well as development). For short, I will call this metric the average LOC per head. Essentially, it represents the developer horizon: how much code each developer really understands.

This measurement is an excellent representation of the development organization’s true productivity. If the number is high, it means that you have a relatively low number of people working on code. In other words, you are accomplishing a lot with minimal resources.

Approximately 10-20 thousand lines of code per developer is the norm for most of today’s development organizations. This is based on the current industry averages that report a typical program has about a million lines of code, and there are usually about 50 to 80 developers working on that code base.


LOC per head – Does it really vary over time?

After I introduce this metric, I’m often asked, “Does this refer to the number of lines of code per head per month? Per week? Or something else?”

I respond that the time period is irrelevant. Why? Because as a software product evolves, its number of lines of code remains relatively constant.

Among non-developers, there is a misconception that the code base continuously grows as development occurs. However, if you talk to developers, you’ll find that most development work—even adding new functionality—really boils down to refactoring existing code.

With the exception of the prototyping phase at the beginning of a completely new development project (a phase that usually lasts a matter of weeks), development primarily involves reworking existing code. Thus, each developer’s understanding of the code base is critical for development productivity. As I’ll discuss in more detail later, the more code each team member truly understands and can efficiently modify, the more productive the team becomes.

No comments:

Post a Comment