Agile Metrics

45
Agile Metrics Agile Metrics Alimenkou Mikalai Alimenkou Mikalai 11.10.2008 11.10.2008

description

Agile Metrics by Nikolay Alimenkou done on Agile Gathering 6, Ukraine.

Transcript of Agile Metrics

Page 1: Agile Metrics

Agile MetricsAgile MetricsAlimenkou MikalaiAlimenkou Mikalai

11.10.200811.10.2008

Page 2: Agile Metrics

AgendaAgenda

IntroductionIntroductionMetrics basicsMetrics basicsBusiness metricsBusiness metricsCode metricsCode metricsDesign metricsDesign metrics

Process metricsProcess metricsAutomation metricsAutomation metricsTesting metricsTesting metricsOther metricsOther metricsBest practicesBest practices

Page 3: 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 4: Agile Metrics

Metrics VS Diagnostics Metrics VS Diagnostics

Page 5: Agile Metrics

Metrics UsesMetrics Uses

Understand real ROIUnderstand real ROIPlan market strategies, product releasesPlan market strategies, product releasesFail fast and save moneyFail fast and save moneyIdentify and mitigate business risksIdentify and mitigate business risksEstimate new projectsEstimate new projectsAward bonuses to developersAward bonuses to developers

Page 6: Agile Metrics

Why Do We Measure?Why Do We Measure?

To informTo informTo compareTo compareTo motivateTo motivateTo understandTo understandTo improveTo improveTo protectTo protect

Page 7: Agile Metrics

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

Great help for retrospectivesGreat help for retrospectivesContinuously gives feedbackContinuously gives feedbackHelp to have healthy code baseHelp to have healthy code baseTo refactor code To refactor code To be able to do frequent releasesTo be able to do frequent releasesShow issues earlyShow issues early

Page 8: Agile Metrics

Metrics ApproachesMetrics Approaches

Using wrong metricsUsing wrong metricsNo metrics at allNo metrics at allUsing right metricsUsing right metrics

Page 9: Agile Metrics

Useless MetricsUseless Metrics

Total lines of codeTotal lines of codeLine of code per developerLine of code per developerTotal number of completed tasksTotal number of completed tasksTotal time workedTotal time workedBugs fixedBugs fixed

Page 10: 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 11: Agile Metrics

RTF BasicsRTF Basics

Running Running –– shipped in a productshipped in a productTested Tested –– continuously pass acceptance testscontinuously pass acceptance testsFeatures Features –– real customer given featuresreal customer given features

Page 12: Agile Metrics

RTF AgilityRTF Agility

RTF requires feature count to grow from first day RTF requires feature count to grow from first day so team is focused on featuresso team is focused on featuresRTF requires feature count to grow continuously RTF requires feature count to grow continuously so team integrates oftenso team integrates oftenRTF requires features to be tested RTF requires features to be tested so team has contract with the customerso team has contract with the customerRTF requires tests continue to pass RTF requires tests continue to pass so tests are automatedso tests are automatedRTF requires to grow smoothly RTF requires to grow smoothly so design will need to be cleanso design will need to be clean

Page 13: Agile Metrics

RTF SmellsRTF Smells

RTF is zero from start during some sprintsRTF is zero from start during some sprintsRTF starts fast and then slow downRTF starts fast and then slow downRTF behaves like yoyoRTF behaves like yoyoRTF grows too quicklyRTF grows too quickly

Page 14: Agile Metrics

EBV BasicsEBV Basics

Each story has its own Each story has its own relative weight assigned relative weight assigned by product ownerby product ownerEach story has binary Each story has binary status: done/not donestatus: done/not doneEBV calculated as sum of EBV calculated as sum of weights for done storiesweights for done stories

Page 15: Agile Metrics

EBV AgilityEBV Agility

Focus on business value so no big upfront Focus on business value so no big upfront designdesignDonDon’’t work on layers, but on featurest work on layers, but on featuresCustomer sees value immediatelyCustomer sees value immediatelyFeatures prioritizing instrumentFeatures prioritizing instrumentHelp planning releases and demosHelp planning releases and demos

Page 16: Agile Metrics

Business Metrics ToolsBusiness Metrics Tools

Agile task management tool/plugAgile task management tool/plug--ininIssues management systemIssues management systemMS ExcelMS Excel

Page 17: Agile Metrics

Code MetricsCode Metrics

Cyclomatic complexityCyclomatic complexityBest practices violationBest practices violationCoding standards violationCoding standards violationPossible bugsPossible bugsCode duplicationCode duplicationCode coverageCode coverageDead codeDead codeTests qualityTests quality

Page 18: Agile Metrics

Code Metrics ToolsCode Metrics Tools

CheckstyleCheckstylePMD/CPDPMD/CPDJesterJesterFindbugsFindbugsSimianSimianMaven site plugMaven site plug--ininIntellij IDEA inspectionsIntellij IDEA inspections

Page 19: Agile Metrics

Checkstyle SampleCheckstyle Sample

Page 20: Agile Metrics

PMD SamplePMD Sample

Page 21: Agile Metrics

Findbugs SampleFindbugs Sample

Page 22: Agile Metrics

Maven Site PlugMaven Site Plug--in Samplein Sample

Page 23: Agile Metrics

Intellij IDEA Inspections SampleIntellij IDEA Inspections Sample

Page 24: Agile Metrics

Design MetricsDesign Metrics

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

AbstractnessAbstractnessNumber of abstract classes and interfacesNumber of abstract classes and interfacesNumber of concrete classesNumber of concrete classes

Page 25: Agile Metrics

Design Metrics ToolsDesign Metrics Tools

JDependJDependEclipse CAP plugEclipse CAP plug--inin

Page 26: Agile Metrics

JDepend SampleJDepend Sample

Page 27: Agile Metrics

Process MetricsProcess Metrics

Agile practice maturityAgile practice maturityImpediments cleared per iterationImpediments cleared per iterationImpediments carried over the next iterationImpediments carried over the next iterationUser stories carried over the next iterationUser stories carried over the next iterationUser stories done per iterationUser stories done per iterationDefects carried over the next iterationDefects carried over the next iterationTeam member loadingTeam member loadingVelocityVelocityBacklog sizeBacklog size

Page 28: Agile Metrics

VelocityVelocity

Classic velocityClassic velocitySpeed velocitySpeed velocityInterruptions per dayInterruptions per day

Page 29: Agile Metrics

Impediments BacklogImpediments Backlog

Page 30: Agile Metrics

Backlog SizeBacklog Size

Page 31: Agile Metrics

Process Metrics ToolsProcess Metrics Tools

Issues management systemIssues management systemSpecial agile tools/plugSpecial agile tools/plug--insinsPhysical task management toolsPhysical task management toolsMS ExcelMS Excel

Page 32: Agile Metrics

Automation MetricsAutomation Metrics

Code coverageCode coverageNumber of builds per dayNumber of builds per dayTime taken per buildTime taken per buildNumber of failed/success buildsNumber of failed/success buildsTrends in code metricsTrends in code metrics

Page 33: Agile Metrics

Automation Metrics ToolsAutomation Metrics Tools

Continuous integration toolsContinuous integration toolsCruiseControlCruiseControlTeamCityTeamCityBambooBambooHudsonHudsonContinuumContinuum

CoberturaCoberturaCloverCloverMaven dashboard plugMaven dashboard plug--inin

Page 34: Agile Metrics

TeamCity SampleTeamCity Sample

Page 35: Agile Metrics

Cobertura SampleCobertura Sample

Page 36: Agile Metrics

Testing MetricsTesting Metrics

Acceptance tests per storyAcceptance tests per storyDefects count per storyDefects count per storyTests time to runTests time to runTests run frequencyTests run frequencyManual tests per storyManual tests per storyAutomation percentAutomation percentTime to fix testsTime to fix tests

Page 37: Agile Metrics

Testing Metrics ToolsTesting Metrics Tools

FitNesseFitNesseConcordionConcordionSeleniumSeleniumIssues management systemIssues management systemTesting automation toolsTesting automation tools

Page 38: Agile Metrics

Other MetricsOther Metrics

WTFs per minuteWTFs per minute VCS ActivityVCS Activity

Page 39: Agile Metrics

Metrics Evaluation ChecklistMetrics Evaluation Checklist

Page 40: Agile Metrics

Example: Business Value DeliveredExample: Business Value Delivered

Page 41: Agile Metrics

Example: VelocityExample: Velocity

Page 42: Agile Metrics

Best PracticesBest Practices

DonDon’’t produce metrics that no one wantst produce metrics that no one wantsBe honest about metrics usageBe honest about metrics usageDonDon’’t use metrics to compare teamst use metrics to compare teamsUse metrics as a basis of discussionUse metrics as a basis of discussionDonDon’’t demoralize team with metricst demoralize team with metricsTake team state into account when Take team state into account when selecting metricsselecting metricsDonDon’’t select hard produced metricst select hard produced metrics

Page 43: Agile Metrics

Best PracticesBest Practices

Measure outcomes, not outputsMeasure outcomes, not outputsMeasure results, not activityMeasure results, not activityMeasure work items done, not time spent Measure work items done, not time spent per taskper taskFollow trends, not numbersFollow trends, not numbers

Page 44: Agile Metrics

Best PracticesBest Practices

DonDon’’t measure something just because you t measure something just because you cancanUse just enough set of metricsUse just enough set of metricsUse metrics that are easy to collectUse metrics that are easy to collectShare metrics to get feedbackShare metrics to get feedbackDifferent metrics for product and processDifferent metrics for product and process

Page 45: Agile Metrics

Any Questions?Any Questions?