ITWissen.info - Tech know how online

lines of code (source code) (LOC)

Software metrics that quantify different properties of software products and processes are used to measure software products. Thereby Lines-of-Code( LOC) is the simplest, oldest and still most frequently used measure for the complexity of a software product. Lines-of-Code integrates into the group of scope metrics, summing the number of effective lines of code excluding blank and comment lines.

LOC = Number of effective lines of code

In connection with the use of this metric it is however of disadvantage that a strong reference to the used programming language and the programming style is present. Often therefore first another tool is used for the unification of the optical form, whereby then at least the number of the code lines becomes comparable considering different programmers. Nevertheless thereby several instructions in a code line are not separately considered.

Therefore Number of Statements( NOS) is a more efficient measure, since here instead of the code lines the number of executable instructions are considered.

NOS = Number of executable statements

Both LOC and NOS can be used to estimate the effort and cost of software modules. In addition, LOC and NOS are used as a measure of the testability as well as maintainability of modules, since the effort in this regard increases with the size of a software module.

An interesting aspect is the strong correlation (similarity) of the values of LOC and NOS to those, which are determined with the far more complex procedures of McCabe and Halstead. Here, therefore, the use of LOC and NOS can be seen as quite advantageous. On the other hand, however, this does not take into account the special aspects of more complex instructions and flow structures.

Informations:
Englisch: lines of code (source code) - LOC
Updated at: 03.11.2013
#Words: 275
Links: software (SW), loss of cell (LOC), code, blank, indium (In)
Translations: DE
Sharing:    

All rights reserved DATACOM Buchverlag GmbH © 2024