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=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 26 May 93 20:44:27 GMT From: news.crd.ge.com!e7sa!groleau@uunet.uu.net (Wes Groleau X7574) Subject: Re: McCabe package for Ada? Message-ID: List-Id: In article <1993May24.003302.27291@mole-end.matawan.nj.us> mat@mole-end.matawan .nj.us writes: >In article <1993May19.220953.20443@sparky.imd.sterling.com>, dwb@IMD.Sterling. COM (David Boyd) writes: >> In article , groleau@e7sa.crd.ge.com (Wes Grole au >> X7574) writes: I did not write what follows, in case anyone cares. >> Actually the McCabe folks have come up with some metrics for just >> that situation. ... pathological complexity (pv(G)) >> which measures those truely awfull conditions in code >> such as branches into loops or decisions. You know the stuff you shoot >> people for or would only expect from a 10 year olds first program. This is NOT the situation I was talking about. I was talking about code that "fools" a control analyzer into giving it a low complexity rating. Instead of having ridiculously complex decisions and convoluted nesting, it has "simple" one or two level control structures. Unfortunately, it's not any easier to understand, because it's sixteen pages long and the coding thought process goes like this: LOOP "Hmm, I'm gonna need to make a decision based on these two fields sometime further down the file, so I'll check the condition now and throw the answer into this boolean (or enumerated, or integer) variable." "OK, now I need to loop the number of times I saved in...which scratch variable did I put that in?" "And inside this loop I need to create and save another control value for the decision in the exception handler..." "Now I need a case statement on the variable I assigned by calling that subprogram back there ... [ more of the same ] exit LOOP and hope it works when I can no longer figure out where I am... END LOOP If I had a nickel for the number of times somebody said "I don't know why I did that. Must be needed somewhere else." ... Wes