Vous êtes sur la page 1sur 48

Metrics 

for  
Agile Projects

Presented at 
Agile NCR 2008 Conference (March 8, 08)
by 
Deepak Mittal

www.IntelliGrape.com
Speaker back­ground

9 years of experience with software development

became agilist 2 years back when joined Xebia

Certified Scrum Master

recently founded IntelliGrape Systems 

enjoy looking at and evaluating new and exciting 
frameworks in java space

 
http://www.IntelliGrape.com
”If you can not measure it, you can not 
improve it.”

Lord Kelvin

 
http://www.IntelliGrape.com
”Measure and let it be known that you 
are measuring.”

”Measurement drives behaviour.”

”You get what you measure”

 
http://www.IntelliGrape.com
Session Agenda

What are Metrics / Diagnostics

Why are Metrics so important for Agile Projects

Various types of Metrics

Metrics collection tools

Demo at Metrics reports

Recommendations / Thoughts

 
http://www.IntelliGrape.com
Take Away from Session

The importance of Metrics on Agile 
Projects

Various Metrics that can be collected 
and analysed

Tools used for Metrics collection

 
http://www.IntelliGrape.com
Quick Poll

How many people have used Metrics in their 
projects : Agile or Non Agile? 

One useful metric

One useless metric

 
http://www.IntelliGrape.com
Metrics Vs Diagnostics

A metric measures something of direct value to the 
business
– e.g. Earned Business value per iteration

A diagnositc measures something of our ability to 
produce the thing of value
– e.g. Velocity, Code Quality

 
http://www.IntelliGrape.com
Why do we Measure?

to inform

to compare / benchmark

to motivate

to improve

to get CMM certification :)

 
http://www.IntelliGrape.com
3 Approaches to Metrics

Using the wrong metrics
– Improper metrics collection besides being 
wasteful also skews team­behaviour in counter­
productive ways. e.g. Code Review 
Effectiveness, Kloc

No Metrics at all
– how do you improve?

Using the right metrics

 
http://www.IntelliGrape.com
Why Metrics are Important for 
Agile Projects

Because we are doing the same thing over and 
over again – the same metrics are applicable 
through­out the project. 

Agile projects are all about early feedback which 
helps you improve in the project and not only at the 
end of the project

Agile Principle : Plan­> Do ­> Inspect ­> Adapt 
(Having metrics help you inspect objectively)
  ●
http://www.IntelliGrape.com
Why Metrics are Important for 
Agile Projects

Agile projects embrace change
– To incorporate changing requirements – you 
need a healthy codebase
– Evolutionary design against big up­front design 
– To refactor code, you need good code coverage 
and clearly defined package dependencies
– To be able to make frequent releases, you need 
continuous integration
 
http://www.IntelliGrape.com
Quick Re­cap

Why do we measure

Metrics / Diagnostics

Why Metrics are needed on Agile Projects

 
http://www.IntelliGrape.com
Metrics Classification

Code 

Design 

Project 

Automation

Business Value 

etc

 
http://www.IntelliGrape.com
Code Metrics

Cyclomatic complexity 

Best practices violation 

Coding standards violation 

Possible bugs (empty try­catch)

Code duplication 

Unit Tests Quality 

Dead Code (unused variables)

 
http://www.IntelliGrape.com
Code Metrics Tools

Checkstyle

PMD

Jester

Findbugs

Simian

 
http://www.IntelliGrape.com
Design Metrics

Distance from Main sequence – measures the 
balance between abstractness and instability
– # of Abstract Classes & Interfaces
– # of Concrete Classes
– # of Incoming Dependencies (Affering Coupling)
– # of Outgoing Dependencies (Efferent Coupling) 

Cyclic Dependencies 

 
http://www.IntelliGrape.com
Design Metrics Tools

jDepend

Eclipse CAP Plug­in

 
http://www.IntelliGrape.com
Project Metrics

Velocity  / Burn­down 

Rework % 

Open and Closed Issues

Defects carried over to next iteration 

User stories carried over to next iteration

Obstacles carried over to next iteration

 
http://www.IntelliGrape.com
Project Metrics Tools

VersionOne

ThoughtWorks Mingle

ScrumWorks

Atlassian JIRA

MS Excel

 
http://www.IntelliGrape.com
Automation Metrics

Test coverage 

# of builds in a day 

Time taken for the build 

Total builds done / passed / failed 

Trends 
– Code coverage
– Checkstyle 
– PMD
 
http://www.IntelliGrape.com
Automation Metrics Tools

Atlassian Clover

Cobertura

CruiseControl

Maven Dashboard plug­in

 
http://www.IntelliGrape.com
Business Value Metrics

EBV – Earned Business Value 

RTF – Running Tested Features

Potential Value delivered 

 
http://www.IntelliGrape.com
The ”real” Metric
Earned Business Value

Product owner assigns a relative weight to each 
user story/feature. 

Small stories with clearly defined completion 
criteria: 100% done or 0% done : binary status

 
http://www.IntelliGrape.com
Benefits of EBV metric

No big­upfront design possible because of the 
focus on business value

You build the application in vertical slices than 
horizontal layers

You don't work on layers but features

Customer sees the value immediately rather than 
after months

Easy to identify when the project hits the point of 
diminishing returns
 
http://www.IntelliGrape.com
Business Value Metrics Tools

MS Excel

ThoughtWorks Mingle

VersionOne

 
http://www.IntelliGrape.com
Demo : Metrics of a real project

Show
Code, Design and Automation Metrics
on Magnolia CMS

 
http://www.IntelliGrape.com
Checkstyle

 
http://www.IntelliGrape.com
Cobertura : Code coverage

 
http://www.IntelliGrape.com
Copy Paste Detection

 
http://www.IntelliGrape.com
FindBugs

 
http://www.IntelliGrape.com
jDepend : Design Metrics

 
http://www.IntelliGrape.com
PMD Reports

 
http://www.IntelliGrape.com
CruiseControl Metrics

 
http://www.IntelliGrape.com
Metrics Demo : Recap

Maven dashboard report ●
Cyclic dependencies

Good Builds / Bad builds ●
Code coverage

Build break­down ●
Distance from Main 

Checkstyle Sequence


PMD

Abstractness


Findbugs: Possible Bugs

Cyclomatic Complexity

Code Duplication

 
http://www.IntelliGrape.com
Demo : Burn­down chart

Show 
Burn­down Chart, Velocity and Velocity trends, 
etc
from a past project

 
http://www.IntelliGrape.com
Sprint Burn down Chart

 
http://www.IntelliGrape.com
Velocity

 
http://www.IntelliGrape.com
Open and Closed Issues

 
http://www.IntelliGrape.com
Release Burn­down Chart

 
http://www.IntelliGrape.com
Demo of EBV Metric

EBV Metrics Excel Sheet

 
http://www.IntelliGrape.com
Benefits of Metrics Collection & 
Analysis on my Projects

Keeping a check on codebase health

Estimation for future sprints

Project planning

Velocity Trends and Insights

Tells us when to re­factor

Code metrics used as the most important factor 
when doing a big refactoring
  ●
http://www.IntelliGrape.com
Metrics Collection Tools List

ScrumWorks ●
Cobertura

FindBugs ●
Code Analysis Plugin

PMD ●
Maven Dashboard

Checkstyle ●
Simian

Clover ●
ThoughtWorks Mingle

jDepend ●
VersionOne

Jester ●
Atlassian JIRA

 
http://www.IntelliGrape.com
Useless Metrics

Kloc & Defects / Kloc 
– doesn't make sense
– promotes copy­pasting

Time/Effort spent in various phases of the project

 
http://www.IntelliGrape.com
Recommendations

Collect minimum number of metrics that will provide 
all information necessary to meet business goals – 
Measure ”just enough”.

Look at Metrics in perspective

Choose Metrics carefully ­ applying waterfall 
metrics to agile projects can do more harm than 
good

Metrics collection should be as automated as 
possible
 
http://www.IntelliGrape.com
References / Attribution


Neal Ford's presentation on Agile Metrics

David Nicolette's presentation on Agile Metrics

Appropriate Agile Measurement

Hemant Saraf : for excellent review & ideas

 
http://www.IntelliGrape.com
Feedback

dmittal@IntelliGrape.com
http://www.IntelliGrape.com
http://blog.IntelliGrape.com

 
http://www.IntelliGrape.com
License

              

This work is licensed under the Creative Commons Attribution­Noncommercial­Share Alike 
3.0 License

 
http://www.IntelliGrape.com

Vous aimerez peut-être aussi