1. 6

Cyclomatic Complexity was initially formulated as a measurement of the “testability and maintainability” of the control flow of a module. While it excels at measuring the former, its underlying mathematical model is unsatisfactory at producing a value that measures the latter. This white paper describes a new metric that breaks from the use of mathematical models to evaluate code in order to remedy Cyclomatic Complexity’s shortcomings and produce a measurement that more accurately reflects the relative difficulty of understanding, and therefore of maintaining methods, classes, and applications.

  1.  

  2. 3

    @jfmengels wrote an excellent article last week about incorporating this concept into elm-review.

    1. 1

      Are there any attempts to measure correlation between this estimate, and perceived complexity of the code it’s measuring?

      1. 1

        Most of the literature tries to find correlations between defect/error rates in known datasets and correlation metrics. [1], [2], and [3] are somewhat well-known results in the field.

        [1]: Empirical analysis of ck metrics for object-oriented design complexity: Implications for software defects - https://ieeexplore.ieee.org/abstract/document/1191795/

        [2]: A validation of object-oriented design metrics as quality indicators - https://ieeexplore.ieee.org/abstract/document/544352/

        [3]: Quantitative analysis of faults and failures in a complex software system - https://ieeexplore.ieee.org/abstract/document/879815/

        1. 1

          Thanks.