48
Metrics for  Agile Projects Presented at Agile NCR 2008 Conference (March 8, 08) by Deepak Mittal www.IntelliGrape.com

Metrics for Agile Projects

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Metrics for Agile Projects

Metrics for  

Agile Projects

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

by Deepak Mittal

www.IntelliGrape.com

Page 2: Metrics for Agile Projects

 http://www.IntelliGrape.com

Speaker background● 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

Page 3: Metrics for Agile Projects

 http://www.IntelliGrape.com

”If you can not measure it, you can not improve it.”

Lord Kelvin

Page 4: Metrics for Agile Projects

 http://www.IntelliGrape.com

”Measure and let it be known that you are measuring.”

”Measurement drives behaviour.”

”You get what you measure”

Page 5: Metrics for Agile Projects

 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

Page 6: Metrics for Agile Projects

 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

Page 7: Metrics for Agile Projects

 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

Page 8: Metrics for Agile Projects

 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

Page 9: Metrics for Agile Projects

 http://www.IntelliGrape.com

Why do we Measure?● to inform● to compare / benchmark● to motivate● to improve● to get CMM certification :)

Page 10: Metrics for Agile Projects

 http://www.IntelliGrape.com

3 Approaches to Metrics● Using the wrong metrics

– Improper metrics collection besides being wasteful also skews teambehaviour in counterproductive ways. e.g. Code Review Effectiveness, Kloc

● No Metrics at all– how do you improve?

● Using the right metrics

Page 11: Metrics for Agile Projects

 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 throughout 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)

Page 12: Metrics for Agile Projects

 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 upfront 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

Page 13: Metrics for Agile Projects

 http://www.IntelliGrape.com

Quick Recap● Why do we measure● Metrics / Diagnostics● Why Metrics are needed on Agile Projects

Page 14: Metrics for Agile Projects

 http://www.IntelliGrape.com

Metrics Classification● Code ● Design ● Project ● Automation● Business Value ● etc

Page 15: Metrics for Agile Projects

 http://www.IntelliGrape.com

Code Metrics● Cyclomatic complexity ● Best practices violation ● Coding standards violation ● Possible bugs (empty trycatch)● Code duplication ● Unit Tests Quality ● Dead Code (unused variables)

Page 17: Metrics for Agile Projects

 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 

Page 18: Metrics for Agile Projects

 http://www.IntelliGrape.com

Design Metrics Tools● jDepend● Eclipse CAP Plugin

Page 19: Metrics for Agile Projects

 http://www.IntelliGrape.com

Project Metrics● Velocity  / Burndown ● Rework % ● Open and Closed Issues● Defects carried over to next iteration ● User stories carried over to next iteration● Obstacles carried over to next iteration

Page 20: Metrics for Agile Projects

 http://www.IntelliGrape.com

Project Metrics Tools● VersionOne● ThoughtWorks Mingle● ScrumWorks● Atlassian JIRA● MS Excel

Page 21: Metrics for Agile Projects

 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

Page 22: Metrics for Agile Projects

 http://www.IntelliGrape.com

Automation Metrics Tools● Atlassian Clover● Cobertura● CruiseControl● Maven Dashboard plugin

Page 23: Metrics for Agile Projects

 http://www.IntelliGrape.com

Business Value Metrics● EBV – Earned Business Value ● RTF – Running Tested Features● Potential Value delivered 

Page 24: Metrics for Agile Projects

 http://www.IntelliGrape.com

The ”real” MetricEarned 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

Page 25: Metrics for Agile Projects

 http://www.IntelliGrape.com

Benefits of EBV metric● No bigupfront 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

Page 26: Metrics for Agile Projects

 http://www.IntelliGrape.com

Business Value Metrics Tools● MS Excel● ThoughtWorks Mingle● VersionOne

Page 27: Metrics for Agile Projects

 http://www.IntelliGrape.com

Demo : Metrics of a real project

ShowCode, Design and Automation Metrics

on Magnolia CMS

Page 28: Metrics for Agile Projects

 http://www.IntelliGrape.com

Checkstyle

Page 29: Metrics for Agile Projects

 http://www.IntelliGrape.com

Cobertura : Code coverage

Page 30: Metrics for Agile Projects

 http://www.IntelliGrape.com

Copy Paste Detection

Page 31: Metrics for Agile Projects

 http://www.IntelliGrape.com

FindBugs

Page 32: Metrics for Agile Projects

 http://www.IntelliGrape.com

jDepend : Design Metrics

Page 33: Metrics for Agile Projects

 http://www.IntelliGrape.com

PMD Reports

Page 34: Metrics for Agile Projects

 http://www.IntelliGrape.com

CruiseControl Metrics

Page 35: Metrics for Agile Projects

 http://www.IntelliGrape.com

Metrics Demo : Recap● Maven dashboard report● Good Builds / Bad builds● Build breakdown● Checkstyle● PMD● Findbugs: Possible Bugs● Code Duplication

● Cyclic dependencies● Code coverage● Distance from Main 

Sequence● Abstractness● Cyclomatic Complexity●

Page 36: Metrics for Agile Projects

 http://www.IntelliGrape.com

Demo : Burndown chart

Show Burndown Chart, Velocity and Velocity trends, 

etcfrom a past project

Page 37: Metrics for Agile Projects

 http://www.IntelliGrape.com

Sprint Burn down Chart

Page 38: Metrics for Agile Projects

 http://www.IntelliGrape.com

Velocity

Page 39: Metrics for Agile Projects

 http://www.IntelliGrape.com

Open and Closed Issues

Page 40: Metrics for Agile Projects

 http://www.IntelliGrape.com

Release Burndown Chart

Page 41: Metrics for Agile Projects

 http://www.IntelliGrape.com

Demo of EBV Metric● EBV Metrics Excel Sheet

Page 42: Metrics for Agile Projects

 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 refactor● Code metrics used as the most important factor 

when doing a big refactoring●

Page 44: Metrics for Agile Projects

 http://www.IntelliGrape.com

Useless Metrics● Kloc & Defects / Kloc 

– doesn't make sense– promotes copypasting

● Time/Effort spent in various phases of the project

Page 45: Metrics for Agile Projects

 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

Page 46: Metrics for Agile Projects

 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

Page 47: Metrics for Agile Projects

 http://www.IntelliGrape.com

Feedback

[email protected]

http://www.IntelliGrape.com

http://blog.IntelliGrape.com

Page 48: Metrics for Agile Projects

 http://www.IntelliGrape.com

License

              

This work is licensed under the Creative Commons AttributionNoncommercialShare Alike 3.0 License