Measuring Changes in Software with CLOC
As software developers we are often asked to measure different software characteristics. Decisions are based upon facts and figures, which are generated through taking precise measurements.
In order to better control and manage software development, computer scientists work to develop better software measurements. These measures can assist in choosing development environments, clarifying and focusing goals, and in ascertaining the cost of design decisions.
The factors involved with source code are numerous and varied. They include the degree of expertise required to develop the code and the size, complexity, reliability, and performance of the code.
Although software's complex nature makes reliance on a single measurement method impractical, there are a myriad of good techniques for quantifying software. The current techniques each provide absolute values for certain characteristics of a static piece of software.
However, it can sometimes be useful to quantify the evolution (i.e., the amount of change) that occurs in a software project (Figure 1 below), instead of a static absolute measurement pertaining to a single instance.
Click on image to enlarge.
The evolution of a software project can be based upon the reuse of code, which increases programmer productivity by allowing for the reuse of programming artifacts such as the designs, specifications, tests, and of course the code itself [1, p. 65].
When we were recently asked to evaluate the changes in a piece of software from one version to another, we realized that the existing metrics were good at measuring single static values, but were not sufficient for quantitatively measuring the evolution of the software. We therefore devised a method to measure the changes in software from one version to another.
The new measure is called Changing Lines of Code or "CLOC" for short and is based upon the kinetic nature of software development. This new method is demonstrated through an analysis of the popular open source search engine Mozilla Firefox and the Apache HTTP server.
The traditional method for measuring software evolution is to compare the total number of lines of code between two versions. There are variations of this method that differ in the way functional and nonfunctional lines of code are counted, but they all produce the same basic results.
We concentrated on the "source lines of code" ("SLOC") method that simply counts the number of non-blank lines of source code ("LOC") in a program, which includes both functional and nonfunctional code.
The SLOC method can provide static absolute measurements for two completely different programs, which can roughly translate to the relative efforts involved in developing the programs. If one program has a higher SLOC count then it can reasonably be concluded that it is more complex and required more effort to develop.
This method has some major flaws when examining the evolution between subsequent versions of a single software project because it measures absolute values and does not account for the nature of software evolution [2 p. 18].
Currently no items