From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,9a0ff0bffdf63657 X-Google-Attributes: gidfac41,public X-Google-Thread: 103376,4b06f8f15f01a568 X-Google-Attributes: gid103376,public X-Google-Thread: 1108a1,9a0ff0bffdf63657 X-Google-Attributes: gid1108a1,public X-Google-Thread: f43e6,9a0ff0bffdf63657 X-Google-Attributes: gidf43e6,public From: Martin@nezumi.demon.co.uk (Martin Tom Brown) Subject: Re: Module size (was Re: Software landmines) Date: 1998/09/04 Message-ID: <904912650snz@nezumi.demon.co.uk>#1/1 X-Deja-AN: 387836087 References: <6snlos$bh6$1@hirame.wwa.com> X-Complaints-To: abuse@demon.net X-Mail2News-Path: news.demon.net!nezumi.demon.co.uk X-Trace: mail2news.demon.co.uk 904916111 mail2news:16405 mail2news mail2news.demon.co.uk Organization: Nezumi Reply-To: Martin@nezumi.demon.co.uk Newsgroups: comp.lang.eiffel,comp.object,comp.software-eng,comp.lang.ada Date: 1998-09-04T00:00:00+00:00 List-Id: On Thursday, in article <6snlos$bh6$1@hirame.wwa.com> rmartin@oma.com "Robert Martin" wrote: > Jeffrey C. Dege wrote in message ... > > >I've been trying to run various size metrics against a fairly large > >(130kloc) C++ project we finished a year or so ago, with an eye to > >improving our estimating techniques. Some of the results have been > >hard to explain to my manager. Whenever you measure something - even if the measurment is flawed and most are, you have to always ask what do these numbers mean ? Sometimes the answer is very little but sometimes you can gain real insight into process. > >He used to program for a living, but he's never done real work in an OO > >language. When I tell him the project has 510 classes, with 2871 methods, > >he nods his head wisely. But when I tell him that 965 of those methods > >contain one line of code each, he starts to frown. He asks me if maybe > >we're taking modularization a bit too far. When I tell him that we have > >63 methods that contain zero lines of code, he wants to know why we > >bothered to write them in the first place, if they don't do anything. > > > >I can't think of a short answer. > > They exist for the same reason that we put zeroes in numbers -- they are > place holders. Beautifully succinct. > Metrics are interesting things. In the absence of a theory, they indicate > nothing other than a measurement of something. Clearly your manager has a > theory, or at least a hypothesis, that he is applying the metrics to. Just > as clearly, that theory is inaccurate. Not necessarily it is perfectly reasonable to ask dumb questions to try and find out if you are being bamboozled by experts. And histograms of lines/method CCI/method and a graph of defects/method vs either lines or CCI would be interesting. > What kind of theory might be appropriate nowadays? It would be interesting > to establish a standard histogram for method sizes. That histogram might > follow an exponential distribution with a mean of around 20-30 lines, and a > deviation on the order of 10 or so. Interestingly, a method with zero lines > would be within 3 deviations of the mean; but a method with 100 lines would > be well beyond six deviations from the mean. I'd guess they were more of a Poisson distribution without having looked at any huge volume of data. And it is *very* reasonable indeed to measure things and then look at the extreme cases to see if there is good reason for it to be the way it is. Especially true of over long or tangled methods or large numbers of placeholders for "future development" that will never take place. Both are capable of damaging projects. Regards, -- Martin Brown __ CIS: 71651,470 Scientific Software Consultancy /^,,)__/