Good thing that you know better then :-)
Incidentally the measure that I described is due to Tom McCabe. The usual list of key words are, if, while, repeat for, and, and or (or equivalent). The rule of thumb is that 0-5 decision points means that your routine is probably fine. 6-10 indicate that you perhaps should simplify. 10+ is a danger sign.
In both editions of Code Complete you'll find this advice in the Control Structures and Complexity subchapter. In the first edition this is at pp 394-396. In the second edition, pp 456-459. Both versions cite 2 studies (McCabe 1976, Shen et al. 1985) that indicated that complexity and low reliability of code are strongly correlated.
He also reports on a 1989 paper from Hewlett Packard. They used this principle for organizing code on two programs, one at 77,000 lines and the other 125,000 lines. The post-release defect rates rates per thousand lines were 0.31 and 0.02 respectively, both substantially below the norm at HP. (I calculate that this means 24 bugs and 2 bugs.)
In the second edition he claims that his consulting company in the last few years has achieved similar results from this technique.
So not only does this allow you to measure where the bugs are likely to appear, it also allows you to reduce your overall defect rate.
I'd like to update this advice with the point that I think that at least some method calls should be included as "decision points". Depending on the coding style, not all - just the ones that you're likely to actually use polymorphism on. (Simple accessors don't count.) This is just my thinking on the topic though, see [link|http://www.perlmonks.org/?node_id=298755|http://www.perlmonks.org/?node_id=298755] for more detailed discussion.
Cheers,
Ben
To deny the indirect purchaser, who in this case is the ultimate purchaser, the right to seek relief from unlawful conduct, would essentially remove the word consumer from the Consumer Protection Act
- [link|http://www.techworld.com/opsys/news/index.cfm?NewsID=1246&Page=1&pagePos=20|Nebraska Supreme Court]