Top Banner
Extracted from: Create Your Successful Agile Project Collaborate, Measure, Estimate, Deliver This PDF file contains pages extracted from Create Your Successful Agile Project, published by the Pragmatic Bookshelf. For more information or to purchase a paperback or PDF copy, please visit http://www.pragprog.com. Note: This extract contains some colored text (particularly in code listing). This is available only in online versions of the books. The printed versions are black and white. Pagination might vary between the online and printed versions; the content is otherwise identical. Copyright © 2017 The Pragmatic Programmers, LLC. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior consent of the publisher. The Pragmatic Bookshelf Raleigh, North Carolina
10

Create Your Successful Agile Projectmedia.pragprog.com/titles/jragm/measure.pdfoverall cost to fix a defect was quite high. And given the number of defects, it was quite difficult

Apr 29, 2021

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Create Your Successful Agile Projectmedia.pragprog.com/titles/jragm/measure.pdfoverall cost to fix a defect was quite high. And given the number of defects, it was quite difficult

Extracted from:

Create Your Successful Agile ProjectCollaborate, Measure, Estimate, Deliver

This PDF file contains pages extracted from Create Your Successful Agile Project,published by the Pragmatic Bookshelf. For more information or to purchase a

paperback or PDF copy, please visit http://www.pragprog.com.

Note: This extract contains some colored text (particularly in code listing). Thisis available only in online versions of the books. The printed versions are blackand white. Pagination might vary between the online and printed versions; the

content is otherwise identical.

Copyright © 2017 The Pragmatic Programmers, LLC.

All rights reserved.

No part of this publication may be reproduced, stored in a retrieval system, or transmitted,in any form, or by any means, electronic, mechanical, photocopying, recording, or otherwise,

without the prior consent of the publisher.

The Pragmatic BookshelfRaleigh, North Carolina

Page 2: Create Your Successful Agile Projectmedia.pragprog.com/titles/jragm/measure.pdfoverall cost to fix a defect was quite high. And given the number of defects, it was quite difficult
Page 3: Create Your Successful Agile Projectmedia.pragprog.com/titles/jragm/measure.pdfoverall cost to fix a defect was quite high. And given the number of defects, it was quite difficult

Create Your Successful Agile ProjectCollaborate, Measure, Estimate, Deliver

Johanna Rothman

The Pragmatic BookshelfRaleigh, North Carolina

Page 4: Create Your Successful Agile Projectmedia.pragprog.com/titles/jragm/measure.pdfoverall cost to fix a defect was quite high. And given the number of defects, it was quite difficult

Many of the designations used by manufacturers and sellers to distinguish their productsare claimed as trademarks. Where those designations appear in this book, and The PragmaticProgrammers, LLC was aware of a trademark claim, the designations have been printed ininitial capital letters or in all capitals. The Pragmatic Starter Kit, The Pragmatic Programmer,Pragmatic Programming, Pragmatic Bookshelf, PragProg and the linking g device are trade-marks of The Pragmatic Programmers, LLC.

Every precaution was taken in the preparation of this book. However, the publisher assumesno responsibility for errors or omissions, or for damages that may result from the use ofinformation (including program listings) contained herein.

Our Pragmatic books, screencasts, and audio books can help you and your team createbetter software and have more fun. Visit us at https://pragprog.com.

The team that produced this book includes:

Publisher: Andy HuntVP of Operations: Janet FurlowDevelopment Editor: Katharine DvorakIndexing: Potomac Indexing, LLCCopy Editor: Candace CunninghamLayout: Gilson Graphics

For sales, volume licensing, and support, please contact [email protected].

For international rights, please contact [email protected].

Copyright © 2017 Johanna Rothman.All rights reserved.

No part of this publication may be reproduced, stored in a retrieval system, or transmitted,in any form, or by any means, electronic, mechanical, photocopying, recording, or otherwise,without the prior consent of the publisher.

Printed in the United States of America.ISBN-13: 978-1-68050-260-2Encoded using the finest acid-free high-entropy binary digits.Book version: P1.0—October 2017

Page 5: Create Your Successful Agile Projectmedia.pragprog.com/titles/jragm/measure.pdfoverall cost to fix a defect was quite high. And given the number of defects, it was quite difficult

To Mark, as always.

Page 6: Create Your Successful Agile Projectmedia.pragprog.com/titles/jragm/measure.pdfoverall cost to fix a defect was quite high. And given the number of defects, it was quite difficult

Velocity Is a Capacity Measurement

I already said velocity is not acceleration back in Understand Velocity, on page?. Velocity can be a measure of capacity once the team is stable andunderstands how to work together.

A team’s velocity (regardless of whether it uses points or story counts) willvary while it learns how to work together. (Many people think it takes some-where between six and nine iterations for a team to learn how to worktogether.) A team’s velocity might vary under other circumstances, as well:

• The team is learning a new domain.• The stories vary in size and may be quite large.• The team changed the iteration duration.

There are two potential drawbacks to measuring velocity. I said that velocityis the rate of change. That’s what you deliver (features or story points) overtime. If you change your iteration duration, you change the time, one of theinputs to the rate of change. If you use story points and you decrease orincrease the size of the stories, you change one of the inputs to the rate ofchange. If you maintain the same iteration duration and use features insteadof points, your velocity measurements will be more accurate.

Measure Cycle Time to Understand Capacity

Many teams, especially those working in iterations, measure theirvelocity in story points to understand their capacity. Instead ofpoints, consider measuring cycle time. When the team measuresits cycle time—possibly different times for stories, fixes, andinterruptions—the team has a better idea about its capacity. Forme, points are too variable, especially in a team new to agileapproaches.

Agile Approaches Change the Meaningof Defect Measurements

Assuming the team meets the acceptance criteria on a story, the team won’thave defects during the iteration or while it works on the story. Any defectsthe team finds before it decides the story is done is work in progress. It’s notuntil the team says the story is done that we need to count defects.

This means the defect counts should be much lower than on a more traditionalproject. However, the product owner and the team might not understand how

• Click HERE to purchase this book now. discuss

Page 7: Create Your Successful Agile Projectmedia.pragprog.com/titles/jragm/measure.pdfoverall cost to fix a defect was quite high. And given the number of defects, it was quite difficult

the user will use the story. It’s possible that in the entire product context,the team made a mistake and created a defect. One mistake I’ve seen is theproduct environment: the team assumed one environment and the customeruses the product in a different environment. That’s a design defect.

You might find several defect measurements helpful: defect escape rates, thecost to fix a defect, the defect cumulative flow, and the fault feedback ratio.

Measure Defect EscapesSometimes the team doesn’t fully understand some aspect of a story. Or maybethe product owner didn’t fully explain the acceptance criteria. Or maybe theproduct owner or the team made a mistake writing the story and the accep-tance criteria. Any number of things might occur and a defect escapes theteam, even though the story met the acceptance criteria and the productowner accepted it.

Measuring the team’s defect escapes can help the team see what’s going on.

I would hope that the number of escaping defects is zero. However, if you arestarting your agile journey, you might encounter several traps that preventyou from keeping your defect levels to zero or close:

• Trap: Developers and Testers Work in Successive or Staggered Iterations,on page ?

• Trap: Your Team Has No Product Owner, on page ?

• Trap: You Have Iterations of Waterfalls, on page ?

When you measure the number of defects that escape over time, you can thenperform a retrospective to see what you might do.

In an agile approach, escaped defects are not the norm. If you see defectsescape, address that as an impediment to fix.

Measure Your Cost to Fix a DefectThe software-engineering literature has references to exponential costs throughthe life cycle for how much it costs to fix a defect: If you have a cost of 1 inrequirements, it’s now 10x in analysis, 100x in coding, 1,000x in testing, anda whopping 10,000x post-release. Those costs have been debunked by TheLeprechauns of Software Engineering [Bos14].

My experience is that it does cost more, but not nearly that much. Even inone of my projects that did very little review or testing, the actual cost post-release was 16x. The problem was that there were so many defects that the

• 8

• Click HERE to purchase this book now. discuss

Page 8: Create Your Successful Agile Projectmedia.pragprog.com/titles/jragm/measure.pdfoverall cost to fix a defect was quite high. And given the number of defects, it was quite difficult

overall cost to fix a defect was quite high. And given the number of defects,it was quite difficult to release and make progress on the next project. (SeeManage It! [Rot07] for more details.)

The more the team works in a way to promote technical excellence, thefewer defects the team will see. That will make the number of escapeddefects low. It should keep the cost to fix a defect low. If your team hastrouble with escaped defects, start to measure the cycle time of defect-fixing.Once the team has the data, ask what actions the team might consider ina retrospective.

Measure the Defect Cumulative FlowEspecially if you have a legacy product where defect discovery overwhelmedthe team, you might need to measure defect cumulative flow. The followingchart illustrates the defects found, closed, and remaining as a line chart.

0

5

10

15

20

25

1 3 5 7 9 11 13 15 17 19 21 23 25 27

Defe

cts

Week

Defect Cumulative Flow: Legacy Code Base, Agile Project

New Defects Found

Defects Closed

Defects Open

Your team might prefer a stacked chart, such as the one shown in the fol-lowing figure, so that it can see the contribution from each part of thecumulative flow.

• Click HERE to purchase this book now. discuss

Agile Approaches Change the Meaning of Defect Measurements • 9

Page 9: Create Your Successful Agile Projectmedia.pragprog.com/titles/jragm/measure.pdfoverall cost to fix a defect was quite high. And given the number of defects, it was quite difficult

0

10

20

30

40

50

60

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28

AxisTitle

DefectCumulative Flow:LegacyCodeBase,AgileProject,StackedChart

DefectsOpen

DefectsClosed

NewDefectsFound

This team discovered previously undetected defects as it progressed throughthe project. That’s because the team increased its test automation andrefactored the code base as it worked on one small feature at a time.

Some weeks the team discovered 15 to 20 defects. The team learned, as itadded those defects to the backlog, that it had cascading defects. It discoveredand fixed one defect. Then it discovered that defect masked several moreunderlying defects.

As the team progressed through the project, it realized that it was able tostabilize the code base. As the number of discovered defects went to zero, theteam’s capacity for more features increased.

The team used this chart to help its management see that the team hadunfinished work. It had debt from previous projects that it paid off in thisproject.

Measure the Fault Feedback RatioI bet you’ve seen problems that the team swore it fixed—and the problemreturned. The team fixed it in one place and it popped back up in anotherplace. What the team thought fixed the problem didn’t. The team (and possiblythe PO) rejects that fix.

We can measure the ratio of rejected fixes to total fixes. This is the faultfeedback ratio (FFR).

The FFR is the ratio of the number of rejected fixes (fixes that don’t actuallyfix the problem) to the total number of fixes. My experience is that an FFR ofmore than 10% says the developers don’t make enough progress on findingand fixing the problems. They spend their time trying to discover the cause(s)

• 10

• Click HERE to purchase this book now. discuss

Page 10: Create Your Successful Agile Projectmedia.pragprog.com/titles/jragm/measure.pdfoverall cost to fix a defect was quite high. And given the number of defects, it was quite difficult

of the problems and creating even more tests. I’ve also seen this occur whenfixing one problem uncovered more problems.

If the team discovers defects as a matter of course, here are some possibleactions to offer the team:

• Discuss the defects and their causes at a retrospective. What creates thedefects?

• Is the team’s definition of “done” sufficient for these kinds of problems?(See Chapter 11, Know What "Done" Means, on page ?, for more details.)

• Can the team pair or mob on the defects to discover the root cause andfix it?

The team may have other ideas once it realizes it has a problem that doesn’twant to stay fixed.

If the team accomplishes the acceptance criteria (what “done” means for astory) and meets the “done” criteria for an iteration, the team tends not tohave many defects. That means the escaped defects should be quite low.

• Click HERE to purchase this book now. discuss

Agile Approaches Change the Meaning of Defect Measurements • 11