|
|||
Metrics
The metric suite that we chose to use for our metric gathering this semester is JStyle. JStyle is specifically designed to look for metrics
associated with object orientated programming, and in particular the Java programming language. This we found to be well suited our project Randyloops,
because of its Java implementation. JStyle gave us the option of looking at metrics over the entire project, particular files, individual classes, and
individual methods. The class metric summaries in JStyle were used to display many of the standard metrics found in object-orientated programming for
each class in our project. These include Depth of Inheritance Tree, Response of Class, Weighted Methods per Class, Lack of Cohesion, and many more.
In large object-orientated projects these metrics would be rather helpful as they would help indicate when certain classes are becoming too large,
the misuse of inheritance, the abundance of message passing between classes, and other problems. Our project Randyloops however, is comprised of only
a few classes, with a limited amount of inheritance. After running JStyle on Randyloops and bringing up the class metric report, we found that many metrics
were insignificant to our project and the others were at very low levels. This was a little helpful in that it reassured that we were not abusing any part
of object-orientated programming, but because of the scale of our project this was expected and did not really modify the way in which we approached our work.
The method metric report in JStyle however, was a little more useful. The method metrics gathered by JStyle include Number of Statements, Cyclomatic Number,
Number of static variables, and many others. Using the method metric spreadsheet in JStyle was somewhat helpful in organizing our methods into a single
list so that we could observe their complexities as we worked on our project. In particular there were cases in which we observed either high coupling
between two methods or a lack of cohesion in a single method. This prompted us to merge or split methods as appropriate. Using JStyle to collect metrics
was a little helpful, but would have been more useful if our project was on a larger object-orientated scale. We first used JStyle to gather metrics during
the metric homework assignment. We continued to gather metrics on our project after each subsequent release and in some cases when we modified specific files.
Our metric results can be found at the links below. Also for questions regarding JStyle, visit http://www.mmsindia.com/jstyle.html |