0% found this document useful (0 votes)
26 views12 pages

Agile Code Quality Metrics: Gil Nahmias, CSP

The document discusses various agile code quality metrics that can be measured including: WTF/Minute during code reviews, abstractness vs instability, defect density, test case density, code and test coverage, fan-in, fan-out, and cyclomatic complexity. It notes that while metrics can indicate problems, they do not provide precise causes, and fixing quality issues requires instilling pride and discipline in the team. Tools mentioned for measuring metrics include Eclipse, NDepend, SourceMonitor, and Klocwork.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views12 pages

Agile Code Quality Metrics: Gil Nahmias, CSP

The document discusses various agile code quality metrics that can be measured including: WTF/Minute during code reviews, abstractness vs instability, defect density, test case density, code and test coverage, fan-in, fan-out, and cyclomatic complexity. It notes that while metrics can indicate problems, they do not provide precise causes, and fixing quality issues requires instilling pride and discipline in the team. Tools mentioned for measuring metrics include Eclipse, NDepend, SourceMonitor, and Klocwork.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Agile Code Quality Metrics

Gil Nahmias, CSP


Summary for Experts

Metrics Tools
– WTF/Minute - „Metrics‟ eclipse
– Abstractness vs. Instability plugin
– Cyclomatic complexity - Ndepend
– Test cases/Class - SourceMonitor
– Defect Density - Klocwork
– Fan in, Fan out
– Code coverage, Test
coverage
disclaimer

“Metrics are a carving knife when what you


really need is a scalpel. Metrics can tell you
something is wrong, but they can't give you
much guidance about the precise cause.

In the case of clean code, the cause is


discipline and professionalism”...”Fixing
that problem is a matter of instilling
pride of workmanship into the team”

-- Uncle Bob
Note before we start

What are we
trying to
understand
What we
actually
measure
How does it
make people
behave
Note before we start

What are we
trying to
understand
What we
actually
measure
How does it
make people
behave
Note before we start

What are we
trying to
understand
What we
actually
measure
How does it
make people
behave
WTF/Minute – in code review
Abstractness vs. instability
Software quality

Defect Density: number of defects per lines


of code

Unit test density: number of unit test cases


per feature or class.

MINIMUM +ve (actual = expected)

4 -ve (actual != expected)


stress
integration
completeness

Code coverage: percentage of automatically


tested code

Test coverage: percentage of automatically


tested business scenarios

Tests

Business Code
complexity

Fan-in: per type is the number of types that


depends directly on it. [a.k.a. Afferent Coupling]

Fan-out: per type is the number of types it


directly depends on. [a.k.a. Efferent Coupling]

Cyclomatic complexity: number of decisions


that can be taken in a procedure
[can be measured per class/feature]
contact me for more

[email protected]

@gilnahmias

myagile.co.il

You might also like