Agile Metrics

42
Agile Metrics Agile Metrics Alimenkou Mikalai Alimenkou Mikalai 27.09.2008 27.09.2008

description

Which metrics you can use in your Agile projects to speed up learning and process improvements.

Transcript of Agile Metrics

Page 1: Agile Metrics

Agile MetricsAgile Metrics

Alimenkou MikalaiAlimenkou Mikalai

27.09.200827.09.2008

Page 2: Agile Metrics

IntroductionIntroduction

"Tell me how you will measure me and I will tell you how I will behave"

- Eliyahu Goldratt

”If you can’t measure it, you can’t improve it”

- Lord Kelvin

Page 3: Agile Metrics

Metrics VS Diagnostics Metrics VS Diagnostics

Page 4: Agile Metrics

Metrics UsesMetrics Uses

Understand real ROIUnderstand real ROI Plan market strategies, product Plan market strategies, product

releasesreleases Fail fast and save moneyFail fast and save money Identify and mitigate business risksIdentify and mitigate business risks Estimate new projectsEstimate new projects Award bonuses to developersAward bonuses to developers

Page 5: Agile Metrics

Why Do We Measure?Why Do We Measure?

To informTo inform To compareTo compare To motivateTo motivate To understandTo understand To improveTo improve To protectTo protect

Page 6: Agile Metrics

Why Metrics Are So Why Metrics Are So Important?Important?

Great help for retrospectivesGreat help for retrospectives Continuously gives feedbackContinuously gives feedback Help to have healthy code baseHelp to have healthy code base To refactor code To refactor code To be able to do frequent releasesTo be able to do frequent releases Show issues earlyShow issues early

Page 7: Agile Metrics

Metrics ApproachesMetrics Approaches

Using wrong Using wrong metricsmetrics

No metrics at allNo metrics at all Using right metricsUsing right metrics

Page 8: Agile Metrics

Useless MetricsUseless Metrics

Total lines of codeTotal lines of code Line of code per developerLine of code per developer Total number of completed tasksTotal number of completed tasks Total time workedTotal time worked Bugs fixedBugs fixed

Page 9: Agile Metrics

Business MetricsBusiness Metrics

RTF (Running Tested Features)RTF (Running Tested Features) Earned Business Value (EBV)Earned Business Value (EBV) Net Present Value (NPV)Net Present Value (NPV) Internal Rate of Return (IRR)Internal Rate of Return (IRR) Return on Investment (ROI)Return on Investment (ROI)

Page 10: Agile Metrics

RTF BasicsRTF Basics

Running – shipped in a productRunning – shipped in a product Tested – continuously pass acceptance Tested – continuously pass acceptance

teststests Features – real customer given Features – real customer given

featuresfeatures

Page 11: Agile Metrics

RTF AgilityRTF Agility

RTF requires feature count to grow from first RTF requires feature count to grow from first day so team is focused on featuresday so team is focused on features

RTF requires feature count to grow RTF requires feature count to grow continuously continuously so team integrates oftenso team integrates often

RTF requires features to be tested RTF requires features to be tested so team has contract with the customerso team has contract with the customer

RTF requires tests continue to pass RTF requires tests continue to pass so tests are automatedso tests are automated

RTF requires to grow smoothly RTF requires to grow smoothly so design will need to be cleanso design will need to be clean

Page 12: Agile Metrics

RTF SmellsRTF Smells

RTF is zero from start during some RTF is zero from start during some sprintssprints

RTF starts fast and then slow downRTF starts fast and then slow down RTF behaves like yoyoRTF behaves like yoyo RTF grows too quicklyRTF grows too quickly

Page 13: Agile Metrics

EBV BasicsEBV Basics

Each story has its own Each story has its own relative weight relative weight assigned by product assigned by product ownerowner

Each story has binary Each story has binary status: done/not donestatus: done/not done

EBV calculated as sum EBV calculated as sum of weights for done of weights for done storiesstories

Page 14: Agile Metrics

EBV AgilityEBV Agility

Focus on business value so no big Focus on business value so no big upfront designupfront design

Don’t work on layers, but on featuresDon’t work on layers, but on features Customer sees value immediatelyCustomer sees value immediately Features prioritizing instrumentFeatures prioritizing instrument Help planning releases and demosHelp planning releases and demos

Page 15: Agile Metrics

Business Metrics ToolsBusiness Metrics Tools

Agile task management tool/plug-inAgile task management tool/plug-in Issues management systemIssues management system MS ExcelMS Excel

Page 16: Agile Metrics

Code MetricsCode Metrics

Cyclomatic complexityCyclomatic complexity Best practices violationBest practices violation Coding standards violationCoding standards violation Possible bugsPossible bugs Code duplicationCode duplication Code coverageCode coverage Dead codeDead code Tests qualityTests quality

Page 17: Agile Metrics

Code Metrics ToolsCode Metrics Tools

CheckstyleCheckstyle PMD/CPDPMD/CPD JesterJester FindbugsFindbugs SimianSimian Maven site plug-inMaven site plug-in Intellij IDEA inspectionsIntellij IDEA inspections

Page 18: Agile Metrics

Checkstyle SampleCheckstyle Sample

Page 19: Agile Metrics

PMD SamplePMD Sample

Page 20: Agile Metrics

Findbugs SampleFindbugs Sample

Page 21: Agile Metrics

Maven Site Plug-in SampleMaven Site Plug-in Sample

Page 22: Agile Metrics

Intellij IDEA Inspections Intellij IDEA Inspections SampleSample

Page 23: Agile Metrics

Design MetricsDesign Metrics

Code dependenciesCode dependencies Incoming (Affering Coupling)Incoming (Affering Coupling) Outgoing (Efferent Coupling)Outgoing (Efferent Coupling)

AbstractnessAbstractness Number of abstract classes and interfacesNumber of abstract classes and interfaces Number of concrete classesNumber of concrete classes

Page 24: Agile Metrics

Design Metrics ToolsDesign Metrics Tools

JDependJDepend Eclipse CAP plug-Eclipse CAP plug-

inin

Page 25: Agile Metrics

JDepend SampleJDepend Sample

Page 26: Agile Metrics

Process MetricsProcess Metrics

Agile practice maturityAgile practice maturity Obstacles cleared per iterationObstacles cleared per iteration Obstacles carried over the next iterationObstacles carried over the next iteration User stories carried over the next User stories carried over the next

iterationiteration Defects carried over the next iterationDefects carried over the next iteration Team member loadingTeam member loading VelocityVelocity Backlog sizeBacklog size

Page 27: Agile Metrics

VelocityVelocity

Classic velocityClassic velocity Speed velocitySpeed velocity Interruptions per dayInterruptions per day

Page 28: Agile Metrics

Backlog SizeBacklog Size

Page 29: Agile Metrics

Process Metrics ToolsProcess Metrics Tools

Issues management systemIssues management system Special agile tools/plug-insSpecial agile tools/plug-ins Physical task management toolsPhysical task management tools MS ExcelMS Excel

Page 30: Agile Metrics

Automation MetricsAutomation Metrics

Code coverageCode coverage Number of builds per dayNumber of builds per day Time taken per buildTime taken per build Number of failed/success buildsNumber of failed/success builds Trends in code metricsTrends in code metrics

Page 31: Agile Metrics

Automation Metrics ToolsAutomation Metrics Tools

Continuous integration toolsContinuous integration tools CruiseControlCruiseControl TeamCityTeamCity BambooBamboo HudsonHudson ContinuumContinuum

CoberturaCobertura CloverClover Maven dashboard plug-inMaven dashboard plug-in

Page 32: Agile Metrics

TeamCity SampleTeamCity Sample

Page 33: Agile Metrics

Cobertura SampleCobertura Sample

Page 34: Agile Metrics

Testing MetricsTesting Metrics

Acceptance tests per storyAcceptance tests per story Defects count per storyDefects count per story Tests time to runTests time to run Tests run frequencyTests run frequency Manual tests per storyManual tests per story Automation percentAutomation percent Time to fix testsTime to fix tests

Page 35: Agile Metrics

Testing Metrics ToolsTesting Metrics Tools

FitNesseFitNesse ConcordionConcordion SeleniumSelenium Issues management systemIssues management system Testing automation toolsTesting automation tools

Page 36: Agile Metrics

Other MetricsOther Metrics

WTFs per minuteWTFs per minute VCS ActivityVCS Activity

Page 37: Agile Metrics

Metrics Evaluation ChecklistMetrics Evaluation Checklist

Page 38: Agile Metrics

Example: Business Value Example: Business Value DeliveredDelivered

Page 39: Agile Metrics

Example: VelocityExample: Velocity

Page 40: Agile Metrics

Best PracticesBest Practices

Don’t produce metrics that no one wantsDon’t produce metrics that no one wants Be honest about metrics usageBe honest about metrics usage Don’t use metrics to compare teamsDon’t use metrics to compare teams Use metrics as a basis of discussionUse metrics as a basis of discussion Don’t demoralize team with metricsDon’t demoralize team with metrics Take team state into account when Take team state into account when

selecting metricsselecting metrics Don’t select hard produced metricsDon’t select hard produced metrics

Page 41: Agile Metrics

Best PracticesBest Practices

Measure outcomes, not outputsMeasure outcomes, not outputs Measure results, not activityMeasure results, not activity Measure work items done, not time Measure work items done, not time

spent per taskspent per task Follow trends, not numbersFollow trends, not numbers

Page 42: Agile Metrics

Best PracticesBest Practices

Don’t measure something just because Don’t measure something just because you canyou can

Use just enough set of metricsUse just enough set of metrics Use metrics that are easy to collectUse metrics that are easy to collect Share metrics to get feedbackShare metrics to get feedback Different metrics for product and Different metrics for product and

processprocess