Mike.McCarty at sbcglobal.net
Mon Mar 15 22:10:06 PDT 2010
Bruce Dubbs wrote:
> Mike McCarty wrote:
>> The routine we tracked the problem down to
>> had a McCabe cyclomatic complexity 'way over 1000. The upper limit
>> for a routine which is maintainable is considered to be about 24
>> or so. It had deeply nested switch() statements, with gotos which
>> went between diffferent levels of separately nested switch()
>> statements. It was unbelievable spaghetti. T
The McCabe Cyclomatic Complexity measure is a rough measure
of how many different "facts" about the code one must keep
in mind in order fully to understand what it may do in all
Is actually a fairly good introduction to the concept.
> GOTO considered harmful - Dijkstra (Title by Wirth)
I once read an amusing article by a japanese fellow named Goto,
wondering why so many people disliked him :-)
> That is terrible. I've seen worse, both very old code and relatively
> new code. For instance, I recently (about 2008) had one function that
> was over 1000 lines long. Some lines were over 200 characters in
> length. Indentation levels went to at least 8, probably more. Totally
> unmaintainable. The author supposedly has a MSCS. He doesn't work for
> us any more.
Simply code size is not so important as how complex the execution
paths may be. I agree that code size is indicative, but a very
long routine which simply does one thing after another can in
some circumstances be maintained.
> 28876 total
> That does not exude confidence to me.
Well, the alternative is to use another OS, or write your own.
Oppose globalization and One World Governments like the UN.
This message made from 100% recycled bits.
You have found the bank of Larn.
I speak only for myself, and I am unanimous in that!
More information about the lfs-support