Hi Mukul,

Thanks for the response and constructive comments. There were more classes detected than those sent to the list. The subset I chose all exhibit high levels of cyclomatic complexity.

The general problem with development guidelines is that they are rarely based on empirical evidence that supports the choice of thresholds. Part of my research focusses on verifying how well and under which conditions, metrics can measure quality.

In the case of xerces, many classes would fail the SEI guidelines. For example, a class like XML11EntityScanner has a summed complexity in the order of 100s instead of 10-15 (# independant paths through code). Does this mean that the code is unmaintainable? Well, despite the fact that many core developers have left the project, the project is still under development. IMO, the lack of development activity is due to the lack of resources and the fact that the library already does what most users need, rather than code quality. In any case, I'll see how the GSoC participants perform and how easy they'll find adding code to xerces.

I'll go back to lurking, thanks for the responses.
cheers,
Stephane Vaucher

On 11-Jun-09, at 11:46 AM, Mukul Gandhi <[email protected]> wrote:

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]

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

Reply via email to