Prev
Up
Next

Source
code metrics give you a quick overview on certain system attributes
and allow you to identify code smells, that is, pieces of your code
that may require refactoring.
Currently, the
Bauhaus toolkit measures the following source code
attributes:
- Lines of Code per
Function: the number of lines of code for a function
definition
- Cyclomatic McCabe
Complexity: the number of decision nodes in the function body plus
one; a decision node is a predicate at which control flow
branches
- Maximal Nesting:
the maximal syntactic nesting of statements in the body of a
function
N .B.: The reason why
we have implemented these metrics and no others is simply that this
collection was explicitly asked for by an industrial partner.
Generally, we follow the Goal-Question-Metric approach in which we
first elicit the goal to be achieved, then ask specific questions
related to the goal, and finally select the metrics to answer these
questions. It is interesting to note that we were able to implement
these three non-trivial metrics in just two person days.

Last modified: Tue Aug 26 11:38:40 MET DST 2003