views:

443

answers:

5

I am looking for studies about applied code quality, comparing costs before and after. They should show a clear benefit in cost (or maybe a negative effect of too much cost). I need hard facts like (entirely fictional):

After we added static code analysis to our build, the number of defects reduced to half. So we saved approx. 10 developer days effort per iteration on bug fixing. Extra cost by buying and setting up the analysis was x$. Development was slowed down 0.1% by obeying the analysis results, increasing the total development effort by 5 days per iteration. During the first half year the initial cost was returned. etc. Now we save approx. y$ per iteration.

I only know one such story given in Code Complete 2nd Ed. It is talking about Boeing that defects decreased after adding reviews during the QA process (AFAIK). Unfortunately most shops would not compare with Boeing, so studies from Boeing do not count.

Do you know such studies or do you have any hard data from your shop?

EDIT:
There is a related question, but does not give any hard data.

+2  A: 

Here's some nice data on TDD about four projects in IBM and Microsoft: http://blog.typemock.com/2009/03/cost-of-test-driven-development.html

mgroves
Yes, it shows that TDD reduce the amount of bugs in the code but takes more time then not using TDD. Still it does not show if it pays off in $. Fixing defects might be cheaper (propably not, but there is no proof).
Peter Kofler
Check out the second graph--the green line represents the cost of fixing defects at different stages of the SDLC. Notice the cost of fixing defects skyrockets during support.
mgroves
+4  A: 

There is some good data in the book, "The Best Kept Secrets of Peer Code Review," which is free from Smart Bear Software. The data that's given is related to the introduction of code reviews, but it might be what you are looking for.

If you order the book, it should show up in about 2-3 weeks, at least that's how long it took to get my copy. If I had it next to me right now I'd type up the examples they gave but I left it at work.

http://smartbear.com/codecollab-code-review-book.php

Jared
ah, even with ROI calculator, nice. They want to sell their product. Can it be trusted?
Peter Kofler
I haven't used their product, just read the book. I'd be interested to see how their product differs from Rietveld (the Google code review tool).
Jared
+2  A: 

The "hardest absolute numbers" I heard are from T-Systems: Wartungskosten im Visier (German only; Google translate?). By introducing and integrating code quality management measures (metrics and monitoring) they reduced their costs by 10% (partly even up to 20%, they claim). They affirm to save 20% maintenance time such that allover (with time more needed for the quality measures) they still save about 10% of their time. I don't know if this is correct, but it sounds plausible and T-Systems has some reputation.

Beside these "numbers" there are several studies and papers about the influence of internal to external quality in general. Commonly they are quite optimistic about that, but a big problem is the lack of real business figures. The calculation in fact is quite easy. But it's hard to evaluate a ROI if the one who needs this confidence to establish a quality process doesn't know anything about his maintenance costs... ;-)

German is ok with me ;-)
Peter Kofler
+3  A: 

Here's the ultimate guide - http://www.scribd.com/doc/7758538/Capers-Jones-Software-Quality-in-2008 Capers Jones Software Quality in 2008

I've seen Capers Jones at a few conferences/presentations, he's been gathering statistics for years (has a few books dedicated to it) and presents solid information....and advice.

meade
yes the ammount of numbers in the slides is impressive. Although I am just able to extract one fact: ROI factor = 15. Propably will have to look into his books...
Peter Kofler
A: 

The books Code Complete 2 and Rapid Development have lots of examples from real life case studies and experiments. Almost everything they argue is backed up with hard facts.

Stephane Grenier
Yes Steve McConnell has lot's of hard facts. I don't know Rapid Development, but most hard facts from Code Complete are from Boeing. Unfortunately most shops would not compare with Boeing, so studies from Boeing do not count.
Peter Kofler
I understand. Then you might want to check Rapid Development. If I remember right, the sources are much more spread out and diverse.
Stephane Grenier