April 20th, 2005


Code Metrics Graphs

I want us to write more tests at work, and everybody else here does too, but it hasn't happened. So, I want to show just how much trouble we are in regarding our tests. I took the code metrics stuff from the previous post, swirled it around and ran it through gnuplot.

Collapse )

As you can see, we're horrible! Our best is about a 3:1 ratio between code and tests, which rapidly deteriorates.

Rails does much better, starting at around 4:1 and working upwards to better than 3:1.

While lines of code vs lines of test doesn't tell you anything about how well your tests are covered, having a 3:1 ratio is much better than having a 12:1 ratio.

Now I just need to finish hooking this in to the SVN commit hooks to have updated graphs.

Later I'll probably release my analysis scripts, they're really useful, and currently work with both svnlook and svn (and hopefully, soon p4 thanks to zenspider).