darke wrote:Ahh, didn't catch that part...and had a good laugh. Unless times are changing, in school a couple years ago they essentially taught us "if it's not broken, don't fix it."
I Think the OP is talking about reducing CC per method to 10 , something some organizations consider as 'good' coding standard . Personally , I consider it vandalizing of perfectly good code if enforced blindly .
I consider it vandalizing of perfectly good code if enforced blindly.I agree. I like it the way it is, as the most compact representation of the test. Quite elegant actually. Cyclomatic complexity isn't the only complexity in town, or the only consideration of any kind. You couldn't change that without making it more complex by any other measure.