Productivity is simply a measure of efficiency which is defined as a ratio of output to input in most of the fields. For example: Two carpenters are given 10kgs of wood to build a table of specified size. The following might be the outcomes. Let us assume that quality being equal in both of the tables because of clear specifications on load capacity, same material usage by both of them and other factors.

  • One of them might build the table quicker than the other.
  • One of them might use less wood say 9 kgs to build the table and the other might have used the full 10 kgs of wood.

The person who is the most efficient is the one who built the table faster than the other and also used less wood to build it to achieve the desired quality. How is it possible that one of them can build the same table with less wood? The answer is use of better technique and technology to build the table. In general organizations measure at least two types of productivities.

  • Capital productivity – Output Cost/Input Cost. In simple words cost of the raw materials to the cost to produce the product including machines and its usage.
  • Labour productivity – Gross Output/Labour Input. What is the total units produced by an employee in a given time period?

In IT projects how to do you measure the programmer’s productivity like how it is measured in manufacturing companies? In manufacturing companies inputs and outputs are mostly physical. How can we measure the productivity if inputs and outputs are virtual? Further complicating the problem is that the input is just an idea?

How do you measure the size of an idea?

Thanks to scientist Caper Jones. He came up with a method to calculate programmer’s productivity. Productivity is simply defined as

Function Points ÷ Person Month

  • Function Points – X no of lines code in a programming language is 1 function point.
  • Person Month – Number of hours a person works in a month.
  • X – Caper Jones factor and it varies based on programming languages.

What is a function point? Let us assume for now it is just X lines of code in a programming language equals 1 function point. Caper Jones researched various languages from each generation and came up with a factor called Caper Jones factor. This factor defines how many lines in a programming language makes one function point. I think you can purchase the factors for programming languages from Caper Jones’ company NamCook Analytics. The company I worked for bought the list from Software Productivity Research Inc. For your reference you can see one of the articles by Caper Jones here.

The first step to calculate the function point is to count the SLOC (source lines of code) coded by the programmer in each language used. Remember that today’s application development is complex than the previous generations like Mainframe or AS/400. In today’s web development projects part of the code is written in a server side language like C# or PHP, client side is written in HTML, JavaScript, CSS etc. It is important to obtain the SLOC at programming language level in an application.

Once you have SLOC at individual programming level for the screens you have coded, divide each SLOC by its Caper Jones factor. Now add the functional points to get the total. The other input needed for calculating the productivity is time. Get the number of hours you spent on coding the module. Once you have the total function points and total hours spent you can calculate the productivity using the formula below.

Productivity = 160 * F ÷ T

  • Productivity Formula
  • 160 – Max hours of work in a month.
  • F – Function Points coded by programmer.
  • T – Total effort in hours

Final concluding thoughts.

What type of productivity is programmer’s productivity? It is labour productivity and not capital productivity.

Why do we need to measure programmer’s productivity in the first place?  To come up with accurate estimates. In maintenance projects that I worked on I was always able to find similar screens or modules for the new requirements or changes. This helps me to roughly arrive at the function points needed to code and I add few function points as buffer and then calculate the estimate based on my average productivity using the reverse formula.

T = 160 * F / P

  • 160 – Max hours of work in a month.
  • F – Function Points coded by programmer.
  • P – Average productivity of the programmer
  • T – Estimated effort in hours

Credits and References