This article shows a few metrics and statistics on how the Jomic project evolved over time.
So far, the metrics are derived from reports generated by Checkstyle, Emma and JDepend. With
every release of Jomic, the current metrics are checked in the Subversion repository under
/trunk/reports
. A little Python script named
create-metrics.py
collects and prepares them for
gnuplot.
In case of Jomic, it does not hold any surprises: as features are added, the source code increaeses.
Interesting about the previous graphs is that while the code size increases, the average number of lines per method remains pretty constant:
This shows a certain quality of the code because huge methods are harder to understand. Consequently applying the principle of "devide and conquer" by splitting up complex interactions in smaller methods increases the legibility.
However, the number of methods per class does not keep up with this:
As a sidenote, Java offers a feature called inner classes where a class can contain other classes, usually tightly bound to the parent class. Apparently I'm not a big fan of this, though it hardly can be avoided - especially for GUI programming and multi-threading:
In some cases, it is more useful to see the absolute number of changes, for example when moving files from one package to another or changing the Checkstye configuration.
Aparently, the number of issues increased a lot in late 2005. This happened because test code was included in the check. While this basically makes sense, some of the checks for normal source code do not go well with test code. For example, numeric constants are discouraged in application code because the meaning of the number is not clear. In test code however, many test cases uses numbers for expected values to compare the actual result with. In April 2006 this was fixed by adding approriate suppressors for test code checks.