Software metrics

77
Metrics

description

 

Transcript of Software metrics

Page 1: Software metrics

Metrics

Page 2: Software metrics

3 flavors3 flavors

Software metrics Agile Project metrics Organizational metrics

Page 3: Software metrics

before we get to them….before we get to them….

Page 4: Software metrics

a warning (or three)a warning (or three)

Page 5: Software metrics

how many of you have an in car how many of you have an in car GPS system?GPS system?

Page 6: Software metrics

metrics satisfy our metrics satisfy our inquisitive natureinquisitive nature

Page 7: Software metrics

and can easily become a and can easily become a distractiondistraction

Page 8: Software metrics

steering with numbers is the wrong steering with numbers is the wrong metaphormetaphor

Page 9: Software metrics

metrics are your guide and can help you metrics are your guide and can help you make decisionsmake decisions

Page 10: Software metrics

make sure your metrics support the decisions make sure your metrics support the decisions you need to make…you need to make…

Page 11: Software metrics

1. Construct metrics for root cause 1. Construct metrics for root cause decision making…decision making…

Page 12: Software metrics

Or use GQMOr use GQM

GOAL QUESTION METRICGOAL QUESTION METRIC

Page 13: Software metrics

WERNER HEISENBERG (1901 - 1976)

Page 14: Software metrics

‘‘The more precisely the The more precisely the POSITIONPOSITION is is determined, the less precisely the determined, the less precisely the MOMENTUM MOMENTUM is known’is known’

Page 15: Software metrics

detrimentally affecting software detrimentally affecting software project teams ability to adapt to project teams ability to adapt to circumstance is a key mistake.circumstance is a key mistake.

Page 16: Software metrics

every project team should be every project team should be ruthless in its adaption to situational ruthless in its adaption to situational circumstance.circumstance.

Page 17: Software metrics

2. Don’t restrict a teams ability to 2. Don’t restrict a teams ability to maximize their effectiveness maximize their effectiveness through over zealous or bureaucratic through over zealous or bureaucratic reporting practices…reporting practices…

Page 18: Software metrics

In order for metrics to be useful they In order for metrics to be useful they have to be accepted.have to be accepted.

Page 19: Software metrics

3. don’t build 3. don’t build metrics that metrics that are too are too complicated complicated to to understand.understand.

Page 20: Software metrics

So….So….

Page 21: Software metrics

back to metrics…back to metrics…

Page 22: Software metrics

3 flavors3 flavors

Software metrics Agile Project metrics Organizational metrics

Page 23: Software metrics

The primary metric for agile The primary metric for agile software development is software development is whether software exists and whether software exists and is demonstrably suitable for is demonstrably suitable for use in its intended purpose.use in its intended purpose.

Page 24: Software metrics

This key metric is tested by This key metric is tested by demonstration at the end of demonstration at the end of every iteration and release.every iteration and release.

Page 25: Software metrics
Page 26: Software metrics

Individual metricsIndividual metrics

Defects Complexity Conformance Coverage Object Orientation Volatility

Page 27: Software metrics

Much more useful when correlated…Much more useful when correlated…

Page 28: Software metrics

Goal: I’d like to reduce defects.Goal: I’d like to reduce defects.

Page 29: Software metrics

Question: Where do defects come Question: Where do defects come from and why?from and why?

Page 30: Software metrics

Panopticode Panopticode shows the hot spots shows the hot spots in code where there are in code where there are intersections between low test intersections between low test coverage, high volatility and high coverage, high volatility and high complexity.complexity.

Page 31: Software metrics
Page 32: Software metrics

In the end code metrics can help In the end code metrics can help remove uncertainty from remove uncertainty from delivery and build a system with delivery and build a system with a longer life span, lower cost of a longer life span, lower cost of change.change.

Page 33: Software metrics
Page 34: Software metrics

Metrics smorgasboardMetrics smorgasboard Velocity: Number of story points completed in any given iteration.

Number of story points started in a given iteration.Total Number of Story points remaining in the project. Total Number of 'new' story points in project.

Number of stories added to the project in a given iteration.Number of story points added to the project in a given iteration.

Total number of stories in project. Total number of story points in project.

Resources:

Planned man days available per iteration.Actual man days used per iteration.

Total man days accrued on project to date.Total man days remaining on budget.

Total Man days lost to non project work.

Financials:

Cost per iteration.Cost per release.

Total days worked on Project.Total days worked by resource type.Monthly spend.Total Monthly spend.

Total Cost to dateTotal Cost to complete.Estimated Cost at complete.

% Unit Test coverage.

Acceptance TestsTotal number of Acceptance tests per iteration.    Automated    Non Automated.    

Total Acceptance tests passing per iteration. Total acceptance tests failing per iteration.Total acceptance tests ignored per iteration.

Total automated Acceptance tests in project.Total non automated Acceptance tests in project.% Automated.

Defects (Bugs identified post development).Total number of defects per iteration.Total number of defects by severity.

Quality.

Unit TestsTotal number of unit tests per iteration.Total Unit tests passing per iteration.Total Unit tests failing per iteration. Total Unit tests ignored per iteration.

Page 35: Software metrics

Uh oh.Uh oh.

Page 36: Software metrics

We just broke golden rule #1.We just broke golden rule #1.

Page 37: Software metrics

So, lets figure out what we need So, lets figure out what we need first…first…

Page 38: Software metrics

Goal, Question, Metric.Goal, Question, Metric.

Page 39: Software metrics

here are some common Goals, here are some common Goals, questions and examples of how questions and examples of how metrics support them…metrics support them…

Page 40: Software metrics

Goal: I want predictability.Goal: I want predictability.

Q: Is my project team converging on Q: Is my project team converging on a solution that meets the outcomes a solution that meets the outcomes for my business?for my business?

Page 41: Software metrics
Page 42: Software metrics

Iteration

Total Effort remaining at start.

Work completed this iteration

Work Added this iteration.

Total effort remaining End Date.

Estimated Cost.

Actual Cost.

Accrued Costs.

Iteration 7-8 49 10 +0 39 01 Sept 34, 650 34,650 34,650

Iteration 9 39 12 +0 27 15 Sept 30,80030,800

65, 450

Iteration 10 27 10 +5 22 29 Sept 31,350

31,35096,800

Iteration 11 22 11 +0 11 13 Oct 31,900

31,900128,700

Iteration 12 11 11 +0 0 21 Oct 22,000

22,000150,700

Page 43: Software metrics

100% of Outcomes met

Page 44: Software metrics

Goal: I want to understand the Goal: I want to understand the capacity of the team and how it capacity of the team and how it changes.changes.

Q: Will defects affect the Q: Will defects affect the predictability of delivery?predictability of delivery?

Page 45: Software metrics

Hypothesis: we can use yesterdays Hypothesis: we can use yesterdays weather to predict how much we can weather to predict how much we can get done next time.get done next time.

Page 46: Software metrics

Velocity is simply the number of Velocity is simply the number of Story points delivered last time used Story points delivered last time used as a predictor for next time…as a predictor for next time…

Page 47: Software metrics
Page 48: Software metrics

Goal: I want to reduce waste in my Goal: I want to reduce waste in my process and deliver value to the process and deliver value to the customer as often as possible.customer as often as possible.

Q: Where are the bottle necks in my Q: Where are the bottle necks in my development process?development process?

Page 49: Software metrics
Page 50: Software metrics
Page 51: Software metrics

Goal: I don’t want any nasty Goal: I don’t want any nasty surprises late in the project that will surprises late in the project that will affect the predictability of delivery.affect the predictability of delivery.

Q: Will defects affect the Q: Will defects affect the predictability of delivery?predictability of delivery?

Page 52: Software metrics

0

10

20

30

40

50

60

70

80

90

Mon Tue Wed Thur Fri Mon Tue Wed Thur Fri Mon Tue Wed Thur Fri

Date

# o

f w

ork

ing

Acc

Tes

ts

Not workingWorking

Page 53: Software metrics
Page 54: Software metrics

At this point things can become less At this point things can become less quantitative and more qualitative…quantitative and more qualitative…

Page 55: Software metrics

Goal: I want to build capabilities that Goal: I want to build capabilities that allow me to repeatably deliver high allow me to repeatably deliver high value products/services.value products/services.

Q: Are my teams developing Q: Are my teams developing repeatable capabilities?repeatable capabilities?

Page 56: Software metrics

Pairing

TDD

ATDP

Cont Integration

Stand up’s

Retrospectives

Design Storming

Re-factoring

Page 57: Software metrics

Goal: I’m a low risk business, if one Goal: I’m a low risk business, if one project fails this year I don’t want it project fails this year I don’t want it to sink the organization!to sink the organization!

Q: What is the risk profile of my Q: What is the risk profile of my project portfolio?project portfolio?

Page 58: Software metrics

Potential Value

Risk

Cost

Page 59: Software metrics

Goal: I want to maximize the value Goal: I want to maximize the value from my workforce ensuring smooth from my workforce ensuring smooth transition between projects….transition between projects….

Q: When will I need capacity?Q: When will I need capacity?

Page 60: Software metrics
Page 61: Software metrics

Be careful with this one…Be careful with this one…

Page 62: Software metrics

Don’t break golden Don’t break golden rule number 2….rule number 2….

Page 63: Software metrics

Goal: To understand if our strategy Goal: To understand if our strategy in the market place is working so in the market place is working so that we can adapt quickly. that we can adapt quickly.

Q: What do my customers think ?Q: What do my customers think ?

Page 64: Software metrics

Fred ReichheldFred ReichheldLoyalty expertLoyalty expert

‘The ultimate ‘The ultimate question’question’(otherwise known (otherwise known as NPS)as NPS)

Page 65: Software metrics

NNet et PPromoter romoter SScore: would you core: would you recommend us to a friend or recommend us to a friend or Colleague?Colleague?

P – D = NPSP – D = NPS

The difference between the The difference between the number of Promoters and number number of Promoters and number of Detractors = Net Promoter Score of Detractors = Net Promoter Score (NPS)(NPS)

Page 66: Software metrics

Goal: To leverage our strategy to Goal: To leverage our strategy to make our enterprise successful.make our enterprise successful.

Q: Do our projects align with the Q: Do our projects align with the vision of our organization?vision of our organization?

Page 67: Software metrics

A Starbucks on every corner

Page 68: Software metrics

Inspire customers to enjoy the daily pleasure of Peet's Coffees & Teas by providing a distinctive, superior product, superior coffee and tea knowledge and superior service to every customer, every day.

Page 70: Software metrics
Page 71: Software metrics

keep metrics simplekeep metrics simple

Page 72: Software metrics

Figure out why you want to measure Figure out why you want to measure something before you figure out something before you figure out how.how.

Page 73: Software metrics

GOAL > Question > MetricGOAL > Question > Metric

Page 74: Software metrics

Everywhere is different . Build Everywhere is different . Build metrics that make sense for YOU.metrics that make sense for YOU.

Page 75: Software metrics

Don’t restrict team process Don’t restrict team process adaptations, adapt reporting as adaptations, adapt reporting as requiredrequired

Page 76: Software metrics
Page 77: Software metrics