Thursday, April 06, 2006

Coverity Code Analysis and Ruby

Recently, Coverity added Ruby to it's list of scanned projects (overview data is available here). Because Perl and Python were already in Coverity's target list, this allows us to look at a code quality comparison between these three languages. Below, I've listed each langage with its Lines of Code (LoC), current number of defects, original number of defects, current rate of defects per KLoC, and the original rate of defects per KLoC. I've had to calculate the last figure since it's not explicitly available on Coverity's wesite.
LangLoCcur defectsdefect rate
Perl485,001670.138
Python273,980140.051
Ruby258,908300.116
Python looks very good here, probably because they've been aggressive about attacking the reported defects. In the grand scheme of things though, All three languages look pretty good.
LangLoCorig defectsdefect rate
Perl485,001890.185
Python273980960.350
Ruby258,908300.116
This is where Ruby shows a bit better than the 'competition'. Ruby has a pretty good (low) defect rate before we've even gotten any feedback from Coverity. Hopefully we can be at least as aggressive about attacking our defects as the Python community. In fact, there's an even better target — AMANDA:
LangLoCcur defectsdefect rate
AMANDA088,4140.000
(By the way, they started out with a rate of 1.227)

1 comment:

Joshua said...

Um... 88,414 defects in 0 lines of code? That is pretty good.