comp.lang.ada
 help / color / mirror / Atom feed
From: mfb@mbunix.mitre.org (Michael F Brenner)
Subject: Re: Cyclomatic complexity
Date: 1997/11/03
Date: 1997-11-03T00:00:00+00:00	[thread overview]
Message-ID: <63kr9u$l31@top.mitre.org> (raw)
In-Reply-To: 345D98D0.31AE@sh.bel.alcatel.be


Cyclomatic complexity has more to do with the program flow graph than
subroutine calling. Cyclomatic complexity has nothing to do with which
parts of a system have been verified. Strengths of cyclomatic complexity
are: (a) it is accepted by the government, (b) it is easy to measure,
and (c) it gives the illusion that you are predicting maintenance cost
which is perceived to be related to cyclomatic complexity. Weaknesses
of cyclomatic complexity are: (a) it becomes less and less corellated
to maintenance cost as the program improves in quality by converting
to static CASE statements or GOTO-less programing, (b) as soon as 
you admit that this is your measure the programmers will make trivial
modifications to the code which increase maintenance cost but reduce
the cyclomatic complexity, and (c) it encourages a mind-set that 
thinks of complexity primarilly as the difficulty of understanding
small pieces of code rather than things that are actually related
to maintenance cost like (i) prior maintenance billing, (ii) number
of references to global variables, (iii) number of states (or
statelessness), (iv) complexity of the data flow graph (rather than
the program flow graph), (v) use of nonstandard file formats or
message formats, (vi) use of APIs when a standard file format would
couple systems more loosely, (vii) number of service requests closed
before completion, (viii) automation of the configuration management 
and testing processes, (ix) ability of the analysis tools to 
instantly display the data flow diagram and the program flow diagram
for any portion of the system, and (x) existence of an on-line
method of tracking the correlation of all metics used to actual costs
incurred.

Measuring what is easy to measure (like lines of code and cyclomatic
complexity) does not necessarily lead to lower life-cycle costs. Measuring
what is actually corelated to thoses costs and acting on those
measurements will lead to lower life-cycle costs. In most organization
reducing the number of levels of managers and the number of references
to global variables, while increasing the speed of the computers used
for debugging and testing will reduce software maintenance costs faster
than reducing the cyclomatic complexity of the code. 





  reply	other threads:[~1997-11-03  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-11-03  0:00 Cyclomatic complexity Jos De Laender
1997-11-03  0:00 ` Michael F Brenner [this message]
1997-11-07  0:00   ` ltroeger
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox