Determining C Complexity

Walter Bright bright at Data-IO.COM
Thu Aug 2 10:33:30 AEST 1990


In article <204 at ssg0.UUCP> petej at ssg0.UUCP (Peter M. Jansson) writes:
<In article <2600 at dataio.Data-IO.COM> bright at Data-IO.COM (Walter Bright) writes:
<<I'm arguing against using metrics at all. If you're limited in resource,
<<decide to review the newest code, or the most critical.
<By the way, how does one define "most critical?"

I'd define most critical as code that is the most difficult to find problems
in. Examples are interrupt handlers. Interrupt handlers can easily have bugs
in them that only show up once every 1000 times they are called, and thus
are very difficult to verify correct by running test cases. The best
way to test and debug interrupt handlers is by "gedanken experiments",
that is, carefully examining the code with your brain.

A least critical piece would be, say, the code that parses the command
line switches. Bugs there usually show up without too much prodding and
are easily tested and fixed.



More information about the Comp.lang.c mailing list