Path: utzoo!attcan!uunet!aplcen!uakari.primate.wisc.edu!sdd.hp.com!usc!apple!cambridge.apple.com!emory!stiatl!srchtec!johnb From: johnb@srchtec.UUCP (John Baldwin) Newsgroups: comp.lang.c Subject: Re: Determining C Complexity Keywords: C, complexity, metrics, cyclomatic complexity, McCabe Message-ID: <157@srchtec.UUCP> Date: 27 Jul 90 13:50:56 GMT References: <1050@ashton.UUCP> <142@srchtec.UUCP> <2592@dataio.Data-IO.COM> Distribution: na Organization: search technology, inc. Lines: 30 In article <2592@dataio.Data-IO.COM> bright@Data-IO.COM (Walter Bright) writes: >....[excerpted]... > There is no substitute for an organized code review. Agreed. In my posting on the use of complexity metrics, I did not mean to suggest that metrics be used to the exclusion of code reviews or walkthroughs. We are using both design walkthroughs and code walkthroughs on the project I am currently involved with, and I instituted a review process with a previous employer. In that previous environment, I found that the metrics were helpful just for the nonsubjective input they provided in the review process, even though the interpretation was subjective. Some friends of mine in other organizations have mentioned that metrics, when properly used, allowed team leaders to continue to maintain a reasonable "situation assessment" even when unreasonable time constraints prevented thorough reviews of all code. Perhaps I was too subtle earlier, but I also wanted to make the point that when using imperfect tools such as code metrics, it is vitally important that the user differentiate between ACCURACY and PRECISION. For those who work in organizations where you are required to submit metrics or other "statistics" (I use the term very loosely here) to nontechnical management, it may be very helpful to express your numbers in the form "value (+|-) err". If I have some measurement that I know is only accurate to within 50% of its value, I will very likely reduce a number such as "6.12214" to the form "6 (+|-) 3". [Interpret "(+|-)" as the over/under plus-or-minus symbol :-)] -- John T. Baldwin | johnb@srchtec.uucp Search Technology, Inc. | johnb%srchtec.uucp@mathcs.emory.edu standard disclaimer: | ...uunet!samsung!emory!stiatl!srchtec.. opinions and mistakes purely my own. | ...mailrus!gatech!stiatl!srchtec...