Hi Stephane,

On Thu, Jun 11, 2009 at 8:33 PM, Stephane
Vaucher<[email protected]> wrote:
> The answers you provided supports our hypothesis that many "bad code"
> detection techniques which measure some sort of complexity will raise false
> alerts as they ignore important factors like the complexity of the domain.

Code quality measurement tools, in general are good to detect various
kinds of wrong coding practices. They should generally be used in
complex projects.

An important measurement of code complexity is "cyclomatic number" for
the code (ref, http://en.wikipedia.org/wiki/Cyclomatic_complexity).
Code with high cyclomatic number (above 10-15 I guess, as recommended
by SEI) is considered risky in terms of ease of change if requirements
change, and being prone to bugs [1].

Having said this [1], though I believe, sometimes it becomes necessary
to write code which might have high cyclomatic number because
requirements makes us write a complex code. I believe, an usual
measure to tackle high complexity is adequate testing.


-- 
Regards,
Mukul Gandhi

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to