From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=BAYES_00,TO_NO_BRKTS_PCNT autolearn=no autolearn_force=no version=3.4.5-pre1 Date: 4 Jun 93 21:25:42 GMT From: csus.edu!netcom.com!dani@decwrl.dec.com (Dani Zweig) Subject: Re: McCabe package for Ada? Message-ID: List-Id: shanks@saifr00.cfsat.honeywell.com (Mark Shanks): >>It turned out that there was a 96% correlation between the Cyclomatic >>Complexity of a module and the number of statements in a module... >As I understand it, the cyclomatic complexity - extended McCabes >is a count of conditions (IFs, ELSEIFs, AND THENs, etc.) in a >procedure + 1... Close. Multiple entries, multiple exits and non-binary conditions will boost the figure a bit, but #conditionals+1 is a good approximation. >But it seems you're concluding that the complexity metric would >(could?) be correlated with the number of statements, and I >haven't had that experience. I see you are referring to a >COBOL/MIS environment; I'm using Ada. No, I'm reporting the 96% correlation as an observation, not a deduction (other studies have reported similar results), and only invoking the formula to give an intuitive explanation. I'm sure the correlation is weaker in your environment, but I'll be very surprised if it's below 80%. This doesn't call for judgment calls on your part: Measure v(G) and the number of statements for a large number of modules, and simply compute the correlation. >Well, at the risk of appearing hopelessly inept, I have a problem >with high McCabe values as a necessary indicator of procedure >complexity/lack of maitainability. I agree: It doesn't measure what most people who use it think it does. ----- Dani Zweig dani@netcom.com It was mentioned on CNN that the new prime number discovered recently is four times bigger then the previous record. -- John Blasik