Software Development Metrics

Software Development Estimation

in Software Costing we looked at some typical ways of determining the likely cost of a Software Development project. One way was to look at how much typing was involved. This is not considered the best approach as the cartoon below demonstrated.

 

Software Estimation

Software Estimation

I prefer to spend more time thinking about the problem and less time typing. Among other things this reduces the amount of typing required.

 

The other example was by looking at the study by VDC Research where the median Software Development project had a cost of US$12.50 per line of code. Which is also very expensive by our reckoning. But these are actual figures. The hard part is working out how many lines of code (LOC) will be required before you have written them.

 

Estimation by Function Points

So I was interested when The Embedded Muse, a software development newsletter authored by Jack Ganssle, published some data from Capers Jones who is a legend in the Software Development industry for his statistics on the Software Development Process.

Capers Jones & Quote

Capers Jones & Quote

My first thought was that I fully agree with the quote. Let’s have a look at it in detail.

High-quality software is not expensive. High-quality software is faster and cheaper to build and maintain than low-quality software, from initial development all the way through total cost of ownership.

 

The assertion is that if you have a way to measure Software Quality, and you stick to good Software Development Process and the creation of High Quality Software, the overall cost will be lower. This might seems counter intuitive to some of our prospects given the development process requests we get, but I think it is spot on. Here are the other items of interest.

 

According to Capers Jones, a very rough guide to estimating the number of people needed on a project, and the project’s duration, is:

 

  • Number of developers = (function points)/150
  • Calendar months = (function points) x 0.4
  • One function point is approximately 130 lines of C Code

So for a typical 20,000 lines of C Code project, we would expect 154 function points with 1 developer required and it would take 5 years. If I look at one of the Industrial Control projects we did then that was 60,000 lines with 3 developers (that part works) and 8 months overall (rather than 5 years). So I’m not convinced the time component of the formula works. Maybe it is too heavily influenced by larger projects. But the number of developers seems to be about right.

 

Again, these are actual project figures and not some abstract model. And if you don’t use good Software Development Process then the cost of debugging and fixing issues in the field will typically dwarf the cost of writing the code.

 

Software Development Metrics

So I thought I’d do a summary of the Software Development Metrics we have accumulated over time as this may help with the Software Estimation process. This is what it looks like in our world of typically smaller projects (less than 100K LOC) reflected through the data above:

 

  • Number of developers = LOC  / 20,000
  • Number of months = LOC / ((number of developers) x 6600)
  • Cost of development = $4.80 per LOC

This assumes good process and average project difficulty. Things that will push a project way past this are code space constraints, processing power constraints, poorly defined requirements and substantial changes of direction mid project. But it does give some way to at least know the ballpark.

 

Successful Endeavours specialise in Electronics Design and Embedded Software Development, focusing on products that are intended to be Made In AustraliaRay Keefe has developed market leading electronics products in Australia for more than 30 years. This post is Copyright © 2018 Successful Endeavours Pty Ltd.

Software Costing

Software Costing

There is an old saying that goes something like this: “hardware is almost free and comes from China; but software is actually free and comes from India”. Actually not such on old saying, and certainly not true. But we do see signs of this myth being alive and well when providing project pricing and estimates for new clients. I covered some of this in Software Estimation.

 

Software Estimation

Software Estimation

This was about how to try and work out a Software Development Budget in advance. Including forgetting that the entire Software Development Process involves more than just typing. So is it possible to know what it really costs from real world (non-imaginary) data?

 

Software Cost

The answer is that it is. My thanks go to VDC Research who recently did a survey of Embedded Developers and made the data available to subscribers of The Embedded Muse, a software development newsletter authored by Jack Ganssle. If you develop software, especially for Embedded Systems, I recommend you sign up if you aren’t already a subscriber.

 

Jack Ganssle

Jack Ganssle

Here is a summary of some statistics that gave me insights into real Software Development Costs.

 

Average Median
Project Team Members 19 7
Project Cost $27,000,000 $250,000
Lines of Code 627,000 20,000

So that is a big spread. Our projects are often below the median level shown here so I was interested to work out what these statistics translate to in cost. The $ are all USD$. And the large lines of code average probably represents larger projects using a major Operating System such as Linux as part of the project.

 

Cost per team member Cost per line of code
Average $1,421,052 $43.06
Median $35,714 $12.50

My first thought is that we don’t charge enough if these are industry typical figures. A bit more thinking shows the process costs of much larger systems. As far as I know there would be few software developers actually getting $1M for their part in the project. And there will be tools costs also included. The statistic missing for me was the duration the money was spent over. We typically budget $5 per line of code for larger projects (20K lines is a decent sized project for a small embedded system) and $2.50 for smaller ones (say 5K lines of code of less).

 

So there you have a really rough way of estimating cost based on Lines of Code and number of Software Developers involved.

 

The above is a very small example of the data collected by VDC Research so consider signing up if you want to see all of it.

 

Software Lines of Code

Software Lines of Code, or LOC, is only one measure of a project. There is much more to consider. We had a recent project where we were asked to fix 50K lines of code for a product that was proving unreliable. So I ran RSM over the top of it to get the average Cylcomatic Complexity and got 6.2! Those who know what that means probably have no idea how you could write code that hard to debug. And no, it wasn’t lots of switch statements. So is the correct answer $250K at $5 per line of code for a complete rewrite?

 

The answer is a resounding “NO”!

 

And the reason is because we redesigned the control flow and changed the UI to a table driven design and reduced a spaghetti mess of 50K lines of code down to 10K lines of cleanly designed code. Which is a budget more like $50K. In this case, it was much more cost effective to redesign from scratch than to try and rescue it. We also fixed the hardware design as that was in part responsible for the unreliability.

 

So the other answer is that good requirements analysis and good design will reduce Software Cost.

 

Successful Endeavours specialise in Electronics Design and Embedded Software Development, focusing on products that are intended to be Made In Australia. Ray Keefe has developed market leading electronics products in Australia for more than 30 years. This post is Copyright © 2017 Successful Endeavours Pty Ltd.