7 Measuring internal product attributes: size


A. Törn - Contents - - Previous chapter - Next chapter - - Previous page - Next page

7.2 Length, code, cont.

Some other usable length measures are number of characters and bytes of computer storage.

Maurice Halstead made an early attempt, Software Science, to capture notions of size and complexity. The basic metrics were

mu1 = number of unique operators
mu2 = number of unique operands
N1 = total number of operators
N2 = total number of operands

From these he then defined a number of derived measures, with length defined as N = N1 + N2, vocabulary defined as mu = mu1 + mu2, volume (amount of computer storage necessary for a uniform binary encoding) as V = N log mu, and the rest some generally invalidated (even intuitively implausible) prediction systems.

There are several problems in defining length in visual programming and windowing environments, and also (to a lesser extent) in object orientation and fourth-generation languages. So, for instance, in object-orientation, a count of objects and methods could be more useful as measures of length for the prediction of productivity than using LOC.

7.2 Length, specifications and designs

Specification and design documents contain text and diagrams, which could make up a composite measure of length, i.e., (text length, diagram length).

7.2 Length, predicting

There are some attempts to predict length of later life-cycle documents based on length of earlier life-cycle documents but nothing really usable is in sight.