Halstead Metrics: For When Program Size Matters
The most common metric to measure program size is Software Lines of Code (SLOC). This metric has remained with us due to its simplicity. But what does it really tell us about the program and the application? Because of all the variables involved (no pun intended), it can’t give us a real comparison with other programs and applications. Straight or “physical” SLOC can include all the comments, spaces, and definitions.
There are basically two things you need to know about a program for a better comparison: how many statements and how many variables. In an attempt to remedy this, “logical” SLOC is often used. It measures the number of executable statements. Since you will know how much of the program is involved with logic, it gets you closer to understanding the true size of a program to aid in comparisons. By using this metric, you will know how many statements the developer will have to review to make a change, which helps you estimate the time it will take to evaluate and carry out the task.
via DZone.com Feed https://dzone.com
May 26, 2017 at 10:39AM