On Tue, Jun 05, 2001 at 03:29:02PM -0700, Daniel S. Wilkerson wrote:
> It would be interesting for someone to measure that, however I doubt that it
> is so.
Oh, and look at what just showed up in my mailbox!
----- Forwarded message from Tony Bowden <[EMAIL PROTECTED]> -----
I think we should start measuring our rate of change on the
Maintainability Index over time:
It's quite a simple process. For each 'module' of code, we just take:
171 - 5.2 * ln(aveV) - 0.23 * aveV(g') - 16.2 * ln (aveLOC) - 50 * sin (s=
qrt(2.4 * perCM))
where
perCM = the average percent of lines of comments per module,
aveLOC = the average count of lines of code per module
aveV(g') = the average extended cyclomatic complexity per module=20
aveV = the average Halstead Volume V per module.
For anyone not familiar with the latter concepts, the cyclomatic
complexity (CC) is simply calculated as:
CC = E - N + p
Where for a connected graph of the module that shows the topology of
control flow within the program,
E = the number of edges of the graph
N = the number of nodes of the graph
p = the number of connected components
and the Halstead Volume is simply
HV = N * (LOG2 n)
where
N = N1 + N2
n = n1 + n2
where
n1 = the number of distinct operators
n2 = the number of distinct operands
N1 = the total number of operators
N2 = the total number of operands=20
(This is spelt out in much more detail at
http://www.sei.cmu.edu/activities/str/descriptions/mitmpm.html)
This should be fairly simple to implement (I'll leave that as an exercise
for the reader), and could probably be used as a starting point for
CPANTS.
----------------------- End forwared message ----------------------------
(That was a joke, BTW)
--
Michael G. Schwern <[EMAIL PROTECTED]> http://www.pobox.com/~schwern/
Perl6 Quality Assurance <[EMAIL PROTECTED]> Kwalitee Is Job One
Let me check my notes.
http://www.sluggy.com