Re: How to develop a random number generation device



On Sep 20, 7:25 am, Martin Brown <|||newspam...@xxxxxxxxxxxxxxxxxx>
wrote:
On Sep 20, 2:16 pm, MooseFET <kensm...@xxxxxxxxx> wrote:


[... cyclomatic complexity ...]

So what exactly is the definition. It seems to me that just because
the memory is a repeated array in physical space, it needn't be in
logical space.- Hide quoted text -

It is actually a better metric for deciding on the number of test
cases needed to excerise every path in a complex decision network at
least once. Essentially it gives a path complexity count of all the
control flows through the code.

http://www.sei.cmu.edu/str/descriptions/cyclomatic_body.html
andhttp://en.wikipedia.org/wiki/Cyclomatic_complexity

That seems to be a slightly different meaning than Mr. Larkin was
thinking of.

There are a few reasons that I can think of as to why it hasn't caught
on widely.

1) It measures something about a software design. It doesn't give
you a tool to do something with that measurement. It doesn't help you
to simplify things.

2) It gives you the bad news once you are a long way into the
design. My then you've likely already got a feeling about how much
you underestimated the testing difficulty by.

3) It produces a bad news number. The number gets bigger the worse
the situation is. Nobady likes to pay for bad news.


It should be better known in the industry.

I agree that it should be known but I don't see it as a very good
measure for software. Consider a bit of code like this:

FastShift:
switch-like-construct-with(ShiftNo)

case 8:
Y = 0 All the bits are gone out the top
goto ShiftDone

case 7:
move carry, X.0 get LSB
Y = 0
rotate left thru carry Y
goto ShiftDone

... etc ...
case 0: Nothing to do
ShiftDone:


This would be considered fairly complex by a measure that used the
number of paths through the code. It however can be checked visually
fairly quickly. If the complexity is measured as a number of states
and number of ways to change states, it also would be fairly complex
because the X and N can start as 256*256 states.

Something that used a 12 bit pseudo-random generator to control just
two paths would be rated as less complex by both measures but would be
a lot harder to check.


I like McCabes CCI which I find a *very* good indicator of code likely
to contain bugs.

It is quicker just to look for the word "windows" on the
packaging. :)

I think you will agree that there is a weakness in the method. This
weakness may also be part of why it is not so widely used.

[...]

I can pretty much guarantee that above a certain size or complexity
there will be bugs in a given routine. You will get more hits Googling
with the longer "Tom McCabe" and "cyclomatic complexity index". Sadly
it is yet another useful tool ignored by the mainstream. "McCabe's
CCI" gets mostly my own postings and a medical usage.

It may be that you need to look for s different term. Some people may
have a different name for basically the same measure. "measure of
system complexity" leads to many hits in google. Some may be the CCI
under a different name.


Regards,
Martin Brown


.



Relevant Pages

  • Re: John le Carre - A Perfect Spy
    ... Once I was able to read without the normal interruptions of everyday life, I was drawn into the complexity of Magnus life experience and was hooked. ... And you'll be wondering if LeCarre is more plugged in than you think or if the spy world is just letting us in on the old news. ...
    (rec.arts.mystery)
  • global warming and dumb reporting.....
    ... "The first section gives some idea of the complexity of these studies, ... web site at www.abelard.org - news comment service, logic, economics ...
    (uk.politics.misc)
  • Re: Luck/skill in backgammon
    ... have a very similar complexity level to the rules of backgammon. ... rule-complexity doesn't explain poker's greater popularity than ... News: use seven bits; ...
    (rec.games.backgammon)

Quantcast