“Jimmy, PLEASE don’t tell me how to run your business- which again is now mine.”

Homework Assignment 2-3 Notes.

What is the maximum recommended cyclomatic complexity?
10

What exceptions are there to the answer in “a” above?
Case or switch statements. Question: Does this include if()elsif()elsif()else statements where the condition is testing the same variable? Stupid. Isn’t that a case statement in disguise? Yes.

How would you use the information gained in the article if you were software manager for a major new program?
Cyclomatic complexity is a metric, a measurement of the code of the program. It can be used to describe the quality of the code, and it can be used to prescribe where to focus testing and changes.

  1. Use it to identify bad code: hard to understand, hard to test and hard to modify.
  2. Use it to stress the number tests per module which in turn helps delineate the testing schedule: time, man-hours, etc.
  3. Use it to determine what areas to concentrate on fixing or testing.
  4. If you have third party developed code, use to control it’s quality.

Cyclomatic complexity seems to drive testing from the developer’s viewpoint. How does it work for system tests? Configuration management? Quality? Safety? These are software departments at work.

I’m sorry I have been posting my homework. I have to so that I can read over what I did at work or in school or anyplace else. You see, I can cut and paste this stuff straight from the web. Unfortunately, it’s also clogging up my recent posts list with somewhat useless stuff, but hey, if you’re a software engineer or in school feel free to join in a post a comment.

Posted by broderic

Yo! I'm the writer here. Super sauce.