8 Measuring internal product attributes: structure


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

8.5 Data structure

The book has not much to say here. Data structure and the structure of the program working on the structure are of course interdependent. A suitable data structure will normally make the program simpler, see Figure 8.27.

8.6 General stuctural complexity measures

There is no single metric that can be used to measure the inherent complexity of large software systems. It is expected that different metrics will be needed for estimating a program's readability, testability, maintainability, etc.

The danger in attempting to find measures to characterize a large collection of different attributes is that often the measures address conflicting goals, counter to the representional theory of measurement. As an example of this, Weyuker's list of properties for a good complexity metric is sometimes mentioned, see Table 8.3, where the properties 5 and 6 are mutually incompatible.

Törn et al  offers an explanation to some of these incompatibilities. The word complexity has several meanings in the empirical world. One meaning is is connected with size, i.e., a big system is considered more complex than a small one. Another meaning is connected with density, i.e., complexity is measured per size unit. Complexity density is is the measure we have in mind when we find that system A is more complex than system B even if their sizes are equal.

If, in discussing complexity these empirical views are interchanged so that in one situation one thinks of one and in another situation of the other, then conflicting statements can be expected. So, for instance, Weyuker's property 5, is obviously true for the size view, but not for the density view.