Slide 1

Slide 1 text

How to Improve Your Requirements with Tiny Stories

Slide 2

Slide 2 text

JEFFREY DAVIDSON consulting business analyst ThoughtWorks. [email protected] @JeffreyGoodReq goodrequirements.com www.thoughtworks.com ®

Slide 3

Slide 3 text

© Jeffrey Davidson, 2013 Today’s Goals !  Appreciate why we need to change !  Practice the structure for easy to understand requirements (stories) !  Discuss why natural language & business terms are better !  Learn how scenarios add huge power

Slide 4

Slide 4 text

© Jeffrey Davidson, 2013 It’s not easy !  We can only hope to make reliable those things that we can understand. !  We can only consider a few things at a time. !  Intertwined things must be considered together. !  Complexity undermines understanding. Rich Hickey Simple Made Easy @ StrangeLoop 2011

Slide 5

Slide 5 text

© Jeffrey Davidson, 2013 Requirements should be . . . !  Valuable !  Concise !  Design-free !  Attainable !  Complete !  Consistent !  Unambiguous !  Verifiable !  Atomic

Slide 6

Slide 6 text

© Jeffrey Davidson, 2013 Requirements should be . . . !  Valuable !  Concise !  Design-free !  Attainable !  Complete !  Consistent !  Unambiguous !  Verifiable !  Atomic

Slide 7

Slide 7 text

© Jeffrey Davidson, 2013 My realization Value comes from understanding

Slide 8

Slide 8 text

© Jeffrey Davidson, 2013 My realization There is no difference between requirements and understanding

Slide 9

Slide 9 text

© Jeffrey Davidson, 2013 Principles of good business analysis !  We build better software when we understand the goals of what we are building

Slide 10

Slide 10 text

© Jeffrey Davidson, 2013 Principles of good business analysis !  We are working on difficult concepts and need to use every tool possible to increase our understanding

Slide 11

Slide 11 text

© Jeffrey Davidson, 2013 Principles of good business analysis !  We want a common understanding for everyone involved; from user to stakeholder to analyst to developer to tester to user

Slide 12

Slide 12 text

© Jeffrey Davidson, 2013 My realization There is no difference between requirements and understanding

Slide 13

Slide 13 text

© Jeffrey Davidson, 2013 Corollaries to the principles !  We build a common understanding best when we communicate using natural language and business terms

Slide 14

Slide 14 text

© Jeffrey Davidson, 2013 Corollaries to the principles !  Functional requirements are best understood in context with actors, actions, and results These things are called Stories

Slide 15

Slide 15 text

© Jeffrey Davidson, 2013 Let’s tell a story . . . .

Slide 16

Slide 16 text

© Jeffrey Davidson, 2013 – – context You & Your condition What you do What you see Help me tell a better story event response

Slide 17

Slide 17 text

© Jeffrey Davidson, 2013 Help me tell a better story You are a ____ !  Princess ( or Prince ) !  Little girl ( or boy ) !  Teenager

Slide 18

Slide 18 text

© Jeffrey Davidson, 2013 Help me tell a better story You and ____ !  Friend !  Dog !  Parent !  No one

Slide 19

Slide 19 text

© Jeffrey Davidson, 2013 Help me tell a better story You were ____ !  Sleeping !  Walking !  Flying !  Dreaming

Slide 20

Slide 20 text

© Jeffrey Davidson, 2013 Help me tell a better story You were ____ !  In the forest !  By the ocean !  In your bed !  In town

Slide 21

Slide 21 text

© Jeffrey Davidson, 2013 Help me tell a better story When ____ !  You hear a sound !  The pet runs off !  You walk around the corner !  You float Pick 2

Slide 22

Slide 22 text

© Jeffrey Davidson, 2013 Help me tell a better story Then you ____ !  See a monster !  Run !  Say “Hello” !  Hear a horse ask for your help

Slide 23

Slide 23 text

© Jeffrey Davidson, 2013 Help me tell a better story Once upon a time _____ and _____ were ____ _____. As they were ____ they ____ and ____. Then they ____.

Slide 24

Slide 24 text

© Jeffrey Davidson, 2013 – – Given You & Your condition What you do What you see Simple Structure When Then

Slide 25

Slide 25 text

© Jeffrey Davidson, 2013 What should we be writing? !  Fine grained, focused bits of behavior !  Told in a story format

Slide 26

Slide 26 text

© Jeffrey Davidson, 2013 What is it? !  It’s a bunch of tiny stories, using a particular grammatical structure !  It’s finding places of misunderstanding, and filling it with understanding !  It’s a conversation, captured

Slide 27

Slide 27 text

© Jeffrey Davidson, 2013 Business Terms & Natural Language !  Make it understandable Imagine your grandmother following these directions

Slide 28

Slide 28 text

© Jeffrey Davidson, 2013 Generic over Specific !  Generic behavior (no design) Imagine performing the same actions on a telephone interface!

Slide 29

Slide 29 text

© Jeffrey Davidson, 2013 !  Given: !  When: !  Then: Tiny Stories: Let’s practice!

Slide 30

Slide 30 text

© Jeffrey Davidson, 2013 How did we do? Were you design agnostic? Did you use natural language? Was everything in business terms?

Slide 31

Slide 31 text

© Jeffrey Davidson, 2013 !  Given: !  When: !  Then: Tiny Stories: Let’s practice again!

Slide 32

Slide 32 text

© Jeffrey Davidson, 2013 Requirements versus Examples Examples . . . !  . . . amplify what we know !  . . . point out holes !  . . . are easy to test !  . . . take requirements & make them real

Slide 33

Slide 33 text

© Jeffrey Davidson, 2013 Let’s make some examples! !  Given: I have selected a date to purchase tickets !  When: I submit my selection !  Then: I receive a confirmation for each seat

Slide 34

Slide 34 text

© Jeffrey Davidson, 2013 Let’s make some examples! !  A simple sample example

Slide 35

Slide 35 text

© Jeffrey Davidson, 2013 Given: Origin Dest Pass Date Boston Bahamas 1 Jan 15, 2014 When: Submit Then: Display “Congratulations, you are ready for your trip! Your confirmation numbers are NNNNNN” ConfirmationNo 000001

Slide 36

Slide 36 text

© Jeffrey Davidson, 2013 Let’s make some examples! !  A more complicated sample example

Slide 37

Slide 37 text

© Jeffrey Davidson, 2013 Given: # Origin Dest Pass Date 1 Boston Bahamas 1 Jan 15, 2014 2 Boston Bahamas 3 Jan 15, 2014 3 Bahamas Boston 4 Jan 20, 2014 When: Submit

Slide 38

Slide 38 text

© Jeffrey Davidson, 2013 Then: Display “Congratulations, you are ready for your trip! Your confirmation numbers are NNNNNN” # Confirmation 1 000001 2 000002, 000003, 000004 3 000005, 000006, 000007, 000008

Slide 39

Slide 39 text

© Jeffrey Davidson, 2013 Let’s make some examples! !  Let’s make one together

Slide 40

Slide 40 text

© Jeffrey Davidson, 2013 Stories are about … !  What’s happening !  How we got here !  What’s important •  Not everything goes into a story •  Some things belong behind the scenes !  Understanding

Slide 41

Slide 41 text

© Jeffrey Davidson, 2013 My realization There is no difference between requirements and understanding

Slide 42

Slide 42 text

© Jeffrey Davidson, 2013 Benefits To build the right product effectively, software dev practices need: !  Assurance all stakeholders & delivery team members understand what needs to be delivered in the same way Gojko Adzic Specification by Example, 2011

Slide 43

Slide 43 text

© Jeffrey Davidson, 2013 Benefits To build the right product effectively, software dev practices need: !  Precise specifications so delivery teams avoid wasteful rework caused by ambiguities and functional gaps Gojko Adzic Specification by Example, 2011

Slide 44

Slide 44 text

© Jeffrey Davidson, 2013 Benefits To build the right product effectively, software dev practices need: !  An objective means to measure when a piece of work is complete Gojko Adzic Specification by Example, 2011

Slide 45

Slide 45 text

© Jeffrey Davidson, 2013 Who Benefits? !  Everyone! !  Seriously, it helps everyone. •  Business Stakeholders •  Users •  Testers •  Developers •  Analysts

Slide 46

Slide 46 text

© Jeffrey Davidson, 2013 It’s not about tools “These tools are intended for use by programmers to guide coding, but they can also be used to express business facing tests that drive development, involving customers more closely in the process.” Lisa Crispin & Janet Gregory Agile Testing, 2010

Slide 47

Slide 47 text

© Jeffrey Davidson, 2013 Downsides !  May not help velocity !  New-ish (to lots of BAs) !  Tools (and all that jazz) may cause clutter, slow-down, new learning, other stuff

Slide 48

Slide 48 text

© Jeffrey Davidson, 2013 My realization There is no difference between requirements and understanding

Slide 49

Slide 49 text

© Jeffrey Davidson, 2013 Ferry Boats & Bridges

Slide 50

Slide 50 text

© Jeffrey Davidson, 2013 My Primary Sources !   Gojko Adzic BDD / Specification by Example gojko.net !   Martin Fowler Crevasse of Doom (ferry boats & bridges) martinfowler.com !   Liz Keogh BDD lunivore.com !   Chris Matts Feature Injection theitriskmanager.wordpress.com !   Dan North BDD & Crevasse of Doom dannorth.net

Slide 51

Slide 51 text

© Jeffrey Davidson, 2013 Share & Tell This is licensed under Creative Commons Sharealike [CC BY 3.0] !  Please use it !  Please share it !  Please improve it !  As long as you credit me somewhere

Slide 52

Slide 52 text

© Jeffrey Davidson, 2013 Video Taped copy Today’s presentation was recorded on a home video camera and will be uploaded for public viewing. I am happy to share access to this presentation upon your request.

Slide 53

Slide 53 text

How to Improve Your Requirements with Tiny Stories JEFFREY DAVIDSON consulting business analyst ThoughtWorks. [email protected] @JeffreyGoodReq goodrequirements.com www.thoughtworks.com ®