[SystemSafety] McCabe¹s cyclomatic complexity and accounting fraud
paul_e.bennett at topmail.co.uk
paul_e.bennett at topmail.co.uk
Thu Mar 29 20:56:58 CEST 2018
On 29/03/2018 at 7:10 PM, "Steve Tockey" <Steve.Tockey at construx.com> wrote:
>
>Derek,
>With all due respect, I am very conscious of and concerned about
>the
>Accounting Fraud issue you focus so much on. I even agree that it
>is a
>serious problem today. However, I don’t think that taking an
>approach of
>“since we don’t know everything that needs to be known about code
>complexity metrics today then we should abandon everything that has
>anything to do with it”.
I maintain that taking the MCC metrics for each individual function and
placing those figures in the context of the overall system, by reporting
the number of functions, the maximum and average MCC values and
gaining some sense of MCC spread (number of functions at each level)
would be a useful indicator. I find I can actually estimate testing effort
based on such information. Higher MCC in a function means more hours
in testing. As the effort per MCC value curve seems to be exponentially
related (based on some previous intensely tested products), then I would
look towards seeing a bigger proportion of MCC values in the lowest zones.
One project, with 3400 individual functions, reported Max MCC of 47 and
an average of 1.87. The majority of functions had an MCC of less than 5.
I can capture MCC values during test compilations (spooled to a file which
then gets processed into a spreadsheet for further analysis). At some point
I need to automate the counting of functions at each MCC level. Then we
could produce the actual view in histogram form.
I just wonder how many on this list collect and analyse such numbers for their
own systems. What do they make of their analysis and its whether or not it
helps them assess required testing effort.
Regards
Paul E. Bennett IEng MIET
Systems Engineer
Lunar Mission One Ambassador
--
********************************************************************
Paul E. Bennett IEng MIET.....
Forth based HIDECS Consultancy.............
Mob: +44 (0)7811-639972
Tel: +44 (0)1392-426688
Going Forth Safely ..... EBA. www.electric-boat-association.org.uk..
********************************************************************
More information about the systemsafety
mailing list