Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
Mike Cohn
Norwegian Developerā€™s Conference
6 June 2012
User Stories
1
Ā© Copyright Mountain Goat Software
Ā®
What problem do stories address?
Software requirements is a communication
problem
Those who want
the software must
communicate with
those who will
build it
2
Ā© Copyright Mountain Goat Software
Ā®
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 language
of the business and developers lose the opportunity to
learn from listening
3
Ā© Copyright Mountain Goat Software
Ā®
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
4
Ā© Copyright Mountain Goat Software
Ā®
Responsibility for resource allocation
If developers are responsibleā€¦
May trade quality for additional
features
May only partially implement a
feature
May solely make decisions that
should involve the business
If the business is responsibleā€¦
Lengthy upfront requirements
negotiation and signoff
Features are progressively
dropped as the deadline nears
5
Ā© Copyright Mountain Goat Software
Ā®
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
6
Ā© Copyright Mountain Goat Software
Ā®
This is where
user stories
come in
So what do we do?
ā€¦but do it often
We make decisions based
on the information we
have
ā€¦we spread decision-
making across the project
Rather than making one
all-encompassing set of
decisions
7
Ā© Copyright Mountain Goat Software
Ā®
Agenda
What stories are
Writing user stories
Why user stories
8
Ā© Copyright Mountain Goat Software
Ā®
Three Cs
Stories are traditionally
written on note cards.
Cards may be annotated with
estimates, notes, etc.
Card Details behind the story come
out during conversations with
product owner
Conversation
story was coded correctly
Conļ¬rmation
Source: XP Magazine 8/30/01, Ron Jeļ¬€ries.
9
Ā© Copyright Mountain Goat Software
Ā®
As a user, I want to
reserve a hotel room.
As a user, I want to
cancel a reservation.
As a vacation traveler,
I want to see photos of
the hotels.
As a frequent ļ¬‚yer, I
want to rebook a past trip
so that I save time
booking trips I take often.
Samples from a travel website
10
Ā© Copyright Mountain Goat Software
Ā®
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 conļ¬rmation provided to the user?
How?
11
Ā© Copyright Mountain Goat Software
Ā®
Details as conditions of satisfaction
As a user, I can
cancel a reservation.
Verify that a premium member can
cancel the same day without a fee.
Verify that a non-premium member is
charged 10% for a same-day cancellation.
Verify that an email conļ¬rmation is sent.
Verify that the hotel is notiļ¬ed of any
cancellation.
ā€¢ The product ownerā€™s
conditions of satisfaction
can be added to a story
ā€¢ These are essentially
tests
12
Ā© Copyright Mountain Goat Software
Ā®
Details added in smaller sub-stories
As a user, I can
cancel a reservation.
As a site visitor, I am
emailed a conļ¬rmation of
any cancelled
reservation.
As a non-premium
member, I can cancel up
to 24 hours in advance.
As a premium site
member, I can cancel a
reservation up to the
last minute.
13
Ā© Copyright Mountain Goat Software
Ā®
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
14
Ā© Copyright Mountain Goat SoftwareĀ®
The product backlog iceberg
Priority
15
Ā© Copyright Mountain Goat Software
Ā®
Some additional useful terms
Epic
A large user
story
Theme
A collection of
related user
stories
16
Ā© Copyright Mountain Goat Software
Ā®
An example
As a VP Marketing, I want to
select the timeframe to use
when reviewing the
performance of past
promotional campaigns, so
that ā€¦
As a VP Marketing, I can
select which type of
campaigns (direct mail, TV,
email, radio, etc.) to include
when reviewing the
performance of past ā€¦
As a VP Marketing, I want
to review the performance
of historical promotional
campaigns so that I can
identify and repeat
proļ¬table ones.
Clearly an epic
Epics???
17
Ā© Copyright Mountain Goat Software
Ā®
As a VP Marketing, I want
to see information on
direct mailings when
reviewing historical
campaigns.
As a VP Marketing, I want
to see information on TV
ads when reviewing
historical campaigns.
As a VP Marketing, I want
to see information on
email ads when reviewing
historical campaigns.
18
Ā© Copyright Mountain Goat Software
Ā®
Agenda
What stories are
Writing user stories
Why user stories
19
Ā© Copyright Mountain Goat Software
Ā®
Logging in
ā€¢See how many user stories you can
write about logging in.
ā€¢Examples:
ā€¢As a registered user, I am required to
log in so that I can access the system.
ā€¢As a forgetful user, I can request a
password reminder so that I can log in
if I forget mine.
ā€œAs a <user role>,
I <want/need/can/
etc> <goal>
so that <reason>.ā€
20
Ā© Copyright Mountain Goat Software
Ā®
Story-writing workshops
Includes whole team plus possibly some
external stakeholders
Typically not done every sprint
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
21
Ā© Copyright Mountain Goat Software
Ā®
Start with epics and iterate
As a frequent
ļ¬‚yer, I want to
book a trip using
miles.
As a frequent
ļ¬‚yer, I want to
rebook a trip I
take often.
As a frequent
ļ¬‚yer, I want to
request an
upgrade.
As a frequent
ļ¬‚yer, I want to
see if my
upgrade cleared.
As a frequent
ļ¬‚yer, I want to
see check my
account.
As a frequent
ļ¬‚yer, I want to
book a trip.
As a frequent
ļ¬‚yer, I want
toā€¦
Frequent Flyer
22
Ā© Copyright Mountain Goat Software
Ā®
Agenda
What stories are
Writing user stories
Why user stories
23
Ā© Copyright Mountain Goat Software
Ā®
So why user stories?
If requirements are
written down
The user will get
what she wants
then
At best sheā€™ll get
what was writtenā€œYou built what I
asked for, but itā€™s
not what I need.ā€
Shift focus from writing to talking
24
Ā© Copyright Mountain Goat Software
Ā®
Words are imprecise
EntrƩe comes
with
soup or salad
and bread. ā€¢ (Soup or Salad) and Bread
ā€¢ (Soup) or (Salad and Bread)
Which is right?
25
Ā© Copyright Mountain Goat Software
Ā®
Examples
The user can enter a
name. It can be 127
characters.
The system should
prominently display a warning
message whenever the user
enters invalid data.
ā€¢ Must the user enter a
name?
ā€¢ Can it be other than
127 chars?
ā€¢ What does should
mean?
ā€¢ What does prominently
display mean?
ā€¢ Is invalid data deļ¬ned
elsewhere?
26
Ā© Copyright Mountain Goat Software
Ā®
Additional reasons
Stories are understandable
Developers and customers understand them
People are better able to remember events if
they are organized into storiesā€ 
Support and encourage iterative
development
Can easily start with epics and disaggregate
closer to development time
ā€ Bower, Black, and Turner. 1979.
Scripts in Memory for Text.
27
Ā© Copyright Mountain Goat Software
Ā®
Yet more reasons
Stories are the right size for planning
Stories support opportunistic development
We design solutions by moving
opportunistically between top-down and
bottom-up approachesā€ 
Stories support participatory design
ā€ Guindon. 1990. Designing the Design Process.
28
Ā© Copyright Mountain Goat Software
Ā®
What if we had stories instead?
29
Ā© Copyright Mountain Goat Software
Ā®
Most importantlyā€¦
The story text we write on
cards is less important
than the conversations we
have.
Donā€™t forget the purpose
30
Ā© Copyright Mountain Goat Software
Ā®
mike@mountaingoatsoftware.com
www.mountaingoatsoftware.com
twitter: mikewcohn
(720) 890-6110
Mike Cohn
31

More Related Content

Introduction to User Stories

  • 1. Mike Cohn Norwegian Developerā€™s Conference 6 June 2012 User Stories 1
  • 2. Ā© Copyright Mountain Goat Software Ā® What problem do stories address? Software requirements is a communication problem Those who want the software must communicate with those who will build it 2
  • 3. Ā© Copyright Mountain Goat Software Ā® 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 language of the business and developers lose the opportunity to learn from listening 3
  • 4. Ā© Copyright Mountain Goat Software Ā® 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 4
  • 5. Ā© Copyright Mountain Goat Software Ā® Responsibility for resource allocation If developers are responsibleā€¦ May trade quality for additional features May only partially implement a feature May solely make decisions that should involve the business If the business is responsibleā€¦ Lengthy upfront requirements negotiation and signoff Features are progressively dropped as the deadline nears 5
  • 6. Ā© Copyright Mountain Goat Software Ā® 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 6
  • 7. Ā© Copyright Mountain Goat Software Ā® This is where user stories come in So what do we do? ā€¦but do it often We make decisions based on the information we have ā€¦we spread decision- making across the project Rather than making one all-encompassing set of decisions 7
  • 8. Ā© Copyright Mountain Goat Software Ā® Agenda What stories are Writing user stories Why user stories 8
  • 9. Ā© Copyright Mountain Goat Software Ā® Three Cs Stories are traditionally written on note cards. Cards may be annotated with estimates, notes, etc. Card Details behind the story come out during conversations with product owner Conversation story was coded correctly Conļ¬rmation Source: XP Magazine 8/30/01, Ron Jeļ¬€ries. 9
  • 10. Ā© Copyright Mountain Goat Software Ā® As a user, I want to reserve a hotel room. As a user, I want to cancel a reservation. As a vacation traveler, I want to see photos of the hotels. As a frequent ļ¬‚yer, I want to rebook a past trip so that I save time booking trips I take often. Samples from a travel website 10
  • 11. Ā© Copyright Mountain Goat Software Ā® 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 conļ¬rmation provided to the user? How? 11
  • 12. Ā© Copyright Mountain Goat Software Ā® Details as conditions of satisfaction As a user, I can cancel a reservation. Verify that a premium member can cancel the same day without a fee. Verify that a non-premium member is charged 10% for a same-day cancellation. Verify that an email conļ¬rmation is sent. Verify that the hotel is notiļ¬ed of any cancellation. ā€¢ The product ownerā€™s conditions of satisfaction can be added to a story ā€¢ These are essentially tests 12
  • 13. Ā© Copyright Mountain Goat Software Ā® Details added in smaller sub-stories As a user, I can cancel a reservation. As a site visitor, I am emailed a conļ¬rmation of any cancelled reservation. As a non-premium member, I can cancel up to 24 hours in advance. As a premium site member, I can cancel a reservation up to the last minute. 13
  • 14. Ā© Copyright Mountain Goat Software Ā® 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 14
  • 15. Ā© Copyright Mountain Goat SoftwareĀ® The product backlog iceberg Priority 15
  • 16. Ā© Copyright Mountain Goat Software Ā® Some additional useful terms Epic A large user story Theme A collection of related user stories 16
  • 17. Ā© Copyright Mountain Goat Software Ā® An example As a VP Marketing, I want to select the timeframe to use when reviewing the performance of past promotional campaigns, so that ā€¦ As a VP Marketing, I can select which type of campaigns (direct mail, TV, email, radio, etc.) to include when reviewing the performance of past ā€¦ As a VP Marketing, I want to review the performance of historical promotional campaigns so that I can identify and repeat proļ¬table ones. Clearly an epic Epics??? 17
  • 18. Ā© Copyright Mountain Goat Software Ā® As a VP Marketing, I want to see information on direct mailings when reviewing historical campaigns. As a VP Marketing, I want to see information on TV ads when reviewing historical campaigns. As a VP Marketing, I want to see information on email ads when reviewing historical campaigns. 18
  • 19. Ā© Copyright Mountain Goat Software Ā® Agenda What stories are Writing user stories Why user stories 19
  • 20. Ā© Copyright Mountain Goat Software Ā® Logging in ā€¢See how many user stories you can write about logging in. ā€¢Examples: ā€¢As a registered user, I am required to log in so that I can access the system. ā€¢As a forgetful user, I can request a password reminder so that I can log in if I forget mine. ā€œAs a <user role>, I <want/need/can/ etc> <goal> so that <reason>.ā€ 20
  • 21. Ā© Copyright Mountain Goat Software Ā® Story-writing workshops Includes whole team plus possibly some external stakeholders Typically not done every sprint 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 21
  • 22. Ā© Copyright Mountain Goat Software Ā® Start with epics and iterate As a frequent ļ¬‚yer, I want to book a trip using miles. As a frequent ļ¬‚yer, I want to rebook a trip I take often. As a frequent ļ¬‚yer, I want to request an upgrade. As a frequent ļ¬‚yer, I want to see if my upgrade cleared. As a frequent ļ¬‚yer, I want to see check my account. As a frequent ļ¬‚yer, I want to book a trip. As a frequent ļ¬‚yer, I want toā€¦ Frequent Flyer 22
  • 23. Ā© Copyright Mountain Goat Software Ā® Agenda What stories are Writing user stories Why user stories 23
  • 24. Ā© Copyright Mountain Goat Software Ā® So why user stories? If requirements are written down The user will get what she wants then At best sheā€™ll get what was writtenā€œYou built what I asked for, but itā€™s not what I need.ā€ Shift focus from writing to talking 24
  • 25. Ā© Copyright Mountain Goat Software Ā® Words are imprecise EntrĆ©e comes with soup or salad and bread. ā€¢ (Soup or Salad) and Bread ā€¢ (Soup) or (Salad and Bread) Which is right? 25
  • 26. Ā© Copyright Mountain Goat Software Ā® Examples The user can enter a name. It can be 127 characters. The system should prominently display a warning message whenever the user enters invalid data. ā€¢ Must the user enter a name? ā€¢ Can it be other than 127 chars? ā€¢ What does should mean? ā€¢ What does prominently display mean? ā€¢ Is invalid data deļ¬ned elsewhere? 26
  • 27. Ā© Copyright Mountain Goat Software Ā® Additional reasons Stories are understandable Developers and customers understand them People are better able to remember events if they are organized into storiesā€  Support and encourage iterative development Can easily start with epics and disaggregate closer to development time ā€ Bower, Black, and Turner. 1979. Scripts in Memory for Text. 27
  • 28. Ā© Copyright Mountain Goat Software Ā® Yet more reasons Stories are the right size for planning Stories support opportunistic development We design solutions by moving opportunistically between top-down and bottom-up approachesā€  Stories support participatory design ā€ Guindon. 1990. Designing the Design Process. 28
  • 29. Ā© Copyright Mountain Goat Software Ā® What if we had stories instead? 29
  • 30. Ā© Copyright Mountain Goat Software Ā® Most importantlyā€¦ The story text we write on cards is less important than the conversations we have. Donā€™t forget the purpose 30
  • 31. Ā© Copyright Mountain Goat Software Ā® mike@mountaingoatsoftware.com www.mountaingoatsoftware.com twitter: mikewcohn (720) 890-6110 Mike Cohn 31