10.3 Source Code Metrics – Code Size, Content, and Complexity
10.3.1 General
Software metrics are measures of various features of programs and their development processes. From a practical point of view – based on methods fairly widely used in real projects – measurable software attributes fall into two camps:
- Code size and content
- Code complexity
Source code size and content have a large bearing on development effort, object code size, and programming time. Code size is probably one of the easiest things to measure, giving rise to "line count" software metrics, namely:
- Lines of code
- Lines of comments
- Lines of mixed code and comments
- Lines left blank
What these really tell you about your software is debatable. However, many companies have nothing else to go on, and use these (especially the lines of code numbers) to estimate:
- Programmer productivity
- The number of potential errors present in...