An Introduction to User Stories - Mike Cohn · An Introduction to User Stories Mike Cohn -...

24
An Introduction to User Stories Mike Cohn - background © Mountain Goat Software, LLC 1 2

Transcript of An Introduction to User Stories - Mike Cohn · An Introduction to User Stories Mike Cohn -...

Page 1: An Introduction to User Stories - Mike Cohn · An Introduction to User Stories Mike Cohn - background ... • The product owner’s conditions of satisfaction can be added to a story

An Introduction toUser Stories

Mike Cohn - background

© Mountain Goat Software, LLC

1

2

Page 2: An Introduction to User Stories - Mike Cohn · An Introduction to User Stories Mike Cohn - background ... • The product owner’s conditions of satisfaction can be added to a story

© Mountain Goat Software, LLC

• Software requirements is a communication problem

What problem do stories address?

• Those who want the software must communicate with those who will build it

© Mountain Goat Software, LLC

Balance is critical

• If either side dominates, the business loses

• If the business side dominates…

• …functionality and dates are mandated with little regard for reality or whether the developers understand the requirements

• If the developers dominate…

• …technical jargon replaces the languageof the business and developers lose the opportunity to learn from listening

3

4

Page 3: An Introduction to User Stories - Mike Cohn · An Introduction to User Stories Mike Cohn - background ... • The product owner’s conditions of satisfaction can be added to a story

© Mountain Goat Software, LLC

Resource allocation

• We need a way of working together so that resource allocation becomes a shared problem

• Project fails when the problem of resource allocation falls too far to one side

© Mountain Goat Software, LLC

Responsibility for resource allocation

5

6

Page 4: An Introduction to User Stories - Mike Cohn · An Introduction to User Stories Mike Cohn - background ... • The product owner’s conditions of satisfaction can be added to a story

© Mountain Goat Software, LLC

Imperfect schedules

• We cannot perfectly predict a software schedule

• As users see the software, they come up with new ideas

• Too many intangibles

• Developers have a notoriously hard time estimating

• If we can’t perfectly predict a schedule, we can’t perfectly say what will be delivered

© Mountain Goat Software, LLC

So what do we do?

7

8

Page 5: An Introduction to User Stories - Mike Cohn · An Introduction to User Stories Mike Cohn - background ... • The product owner’s conditions of satisfaction can be added to a story

© Mountain Goat Software, LLC

© Mountain Goat Software, LLC

Ron Jeffries’ Three Cs

Source: XP Magazine 8/30/01, Ron Jeffries.

9

10

Page 6: An Introduction to User Stories - Mike Cohn · An Introduction to User Stories Mike Cohn - background ... • The product owner’s conditions of satisfaction can be added to a story

© Mountain Goat Software, LLC

Samples from a travel website

© Mountain Goat Software, LLC

Where are the details?

• As a user, I can cancel a reservation.

• Does the user get a full or partial refund?

• Is the refund to her credit card or is it site credit?

• How far ahead must the reservation be cancelled?

• Is that the same for all hotels?

• For all site visitors? Can frequent travelers cancel later?

• Is a confirmation provided to the user?

• How?

11

12

Page 7: An Introduction to User Stories - Mike Cohn · An Introduction to User Stories Mike Cohn - background ... • The product owner’s conditions of satisfaction can be added to a story

© Mountain Goat Software, LLC

Details as conditions of satisfaction

• The product owner’s conditions of satisfaction can be added to a story

• These are essentially tests

© Mountain Goat Software, LLC

Details added in smaller sub-stories

13

14

Page 8: An Introduction to User Stories - Mike Cohn · An Introduction to User Stories Mike Cohn - background ... • The product owner’s conditions of satisfaction can be added to a story

© Mountain Goat Software, LLC

Techniques can be combined

• These approaches are not mutually exclusive

• Write stories at an appropriate level

• By the time it’s implemented, each story will have conditions of satisfaction associated with it

© Mountain Goat Software, LLC

The product backlog iceberg

Sprint

Release

FutureReleases

Priority

15

16

Page 9: An Introduction to User Stories - Mike Cohn · An Introduction to User Stories Mike Cohn - background ... • The product owner’s conditions of satisfaction can be added to a story

© Mountain Goat Software, LLC

Stories, themes and epicsUser StoryA description of desired functionality told from the perspective of the user or customer.

ThemeA collection of related user stories.

EpicA large user story.

© Mountain Goat Software, LLC

An example

Clearly an epic

Epics??

17

18

Page 10: An Introduction to User Stories - Mike Cohn · An Introduction to User Stories Mike Cohn - background ... • The product owner’s conditions of satisfaction can be added to a story

© Mountain Goat Software, LLC

An example

© Mountain Goat Software, LLC

19

20

Page 11: An Introduction to User Stories - Mike Cohn · An Introduction to User Stories Mike Cohn - background ... • The product owner’s conditions of satisfaction can be added to a story

© Mountain Goat Software, LLC

“The User”

• Many projects mistakenly assume there’s only one user:

• “The user”

• Write all stories from one user’s perspective

• Assume all users have the same goals

• Leads to missing stories

© Mountain Goat Software, LLC

Common attributes

21

22

Page 12: An Introduction to User Stories - Mike Cohn · An Introduction to User Stories Mike Cohn - background ... • The product owner’s conditions of satisfaction can be added to a story

© Mountain Goat Software, LLC

User roles

• Broaden the scope from looking at one user

• Allows users to vary by

• What they use the software for

• How they use the software

• Background

• Familiarity with the software / computers

• Used extensively in usage-centered designSource: Software for Use by Constantine and Lockwood (1999).

© Mountain Goat Software, LLC

System and programmer users

23

24

Page 13: An Introduction to User Stories - Mike Cohn · An Introduction to User Stories Mike Cohn - background ... • The product owner’s conditions of satisfaction can be added to a story

© Mountain Goat Software, LLC

Advantages of using roles

© Mountain Goat Software, LLC

25

26

Page 14: An Introduction to User Stories - Mike Cohn · An Introduction to User Stories Mike Cohn - background ... • The product owner’s conditions of satisfaction can be added to a story

© Mountain Goat Software, LLC

A horrible question

• A problem:

• The question is closed

• {Yes | No}

© Mountain Goat Software, LLC

We can do better

• It’s open

• Full range of answers

• But it has too much context

27

28

Page 15: An Introduction to User Stories - Mike Cohn · An Introduction to User Stories Mike Cohn - background ... • The product owner’s conditions of satisfaction can be added to a story

© Mountain Goat Software, LLC

A better way to ask

• We want to ask questions that are

• Open-ended

• Context-free

© Mountain Goat Software, LLC

My context isn’t your context

29

30

Page 16: An Introduction to User Stories - Mike Cohn · An Introduction to User Stories Mike Cohn - background ... • The product owner’s conditions of satisfaction can be added to a story

© Mountain Goat Software, LLC

It’s my problem, I know the solution

• Having a problem does not uniquely qualify you to solve it

• “It hurts when I go like this…”

© Mountain Goat Software, LLC

We need to stop asking users

• Since users don’t know how to solve their problems, we need to stop asking

• We need to involve them instead

31

32

Page 17: An Introduction to User Stories - Mike Cohn · An Introduction to User Stories Mike Cohn - background ... • The product owner’s conditions of satisfaction can be added to a story

© Mountain Goat Software, LLC

Story-writing workshops

• Includes developers, users, customer, others

• Brainstorm to generate stories

• Goal is to write as many stories as possible

• Some will be “implementation ready”

• Others will be “epics”

• No prioritization at this point

© Mountain Goat Software, LLC

Start with epics and iterate

33

34

Page 18: An Introduction to User Stories - Mike Cohn · An Introduction to User Stories Mike Cohn - background ... • The product owner’s conditions of satisfaction can be added to a story

© Mountain Goat Software, LLC

© Mountain Goat Software, LLC

What makes a good story?

Thanks to Bill Wake for the acronym. See www.xp123.com.

35

36

Page 19: An Introduction to User Stories - Mike Cohn · An Introduction to User Stories Mike Cohn - background ... • The product owner’s conditions of satisfaction can be added to a story

Copyright Mountain Goat Software, LLC

INVESTing in good stories• Independent

• Dependenices lead to problems estimating and prioritizing

• Can ideally select a story to work on without pulling in 18 other stories

• Negotiable• Stories are not contracts

• Leave or imply some flexibility

• Valuable

• To users or customers, not developers

• Rewrite (most) developer stories to reflect value to users or customers

Copyright Mountain Goat Software, LLC

INVESTing in good stories

• Estimatable

• Because plans are based on user stories, we need to be able to estimate them

• Sized Appropriately

• Complex stories are intrinsically large

• Compound stories are multiple stories in one

• Testable

• Stories need to be testable

37

38

Page 20: An Introduction to User Stories - Mike Cohn · An Introduction to User Stories Mike Cohn - background ... • The product owner’s conditions of satisfaction can be added to a story

© Mountain Goat Software, LLC

© Mountain Goat Software, LLC

then

“You built what I

asked for, but it’s

not what I need.”

39

40

Page 21: An Introduction to User Stories - Mike Cohn · An Introduction to User Stories Mike Cohn - background ... • The product owner’s conditions of satisfaction can be added to a story

© Mountain Goat Software, LLC

Words are imprecise

© Mountain Goat Software, LLC

Examples

41

42

Page 22: An Introduction to User Stories - Mike Cohn · An Introduction to User Stories Mike Cohn - background ... • The product owner’s conditions of satisfaction can be added to a story

© Mountain Goat Software, LLC

© Mountain Goat Software, LLC

What are we building?1.The product shall have a gas engine.2.The product shall have four wheels.

2.1.The product shall have a rubber tire mounted to each wheel.

3.The product shall have a steering wheel.4.The product shall have a steel body.

Source: Adapted from The Inmates are

Running the Asylum by Alan Cooper (1999).

43

44

Page 23: An Introduction to User Stories - Mike Cohn · An Introduction to User Stories Mike Cohn - background ... • The product owner’s conditions of satisfaction can be added to a story

© Mountain Goat Software, LLC

What if we had stories instead?

© Mountain Goat Software, LLC

The product

45

46

Page 24: An Introduction to User Stories - Mike Cohn · An Introduction to User Stories Mike Cohn - background ... • The product owner’s conditions of satisfaction can be added to a story

© Mountain Goat Software, LLC

Most importantly...

The story text we write on cards is less important than the conversations we have.

Don’t forget the purpose

© Mountain Goat Software, LLC

[email protected]

www.mountaingoatsoftware.com

(720) 890-6110 (office)

(303) 810-2190 (mobile)

Mike Cohn contact info

47

48