User Stories- Sunil Kumar
AgendaWhat is the need for user stories?What is a story?Why story?What is criteria for a good story?What are not stories?Prerequisite?  Knowledge of Scrum and it’s terms
What problems do user stories address?(mis)Communication!
Between?Those who want the softwareThose who build the software
Balance is critical
Business side dominates?
Developers dominate?
Resource allocationNeed to work together to make it a shared problem.
Developers Responsibility of resource allocation!May trade quality for additional featuresMay only partially implement the featureMay solely take decisions that should involve business side
Only business shoulders the responsibilityLengthy upfront requirements negotiation and signoffFeatures are dropped as the deadline nears
We cannot predict a software schedule!
As users see software, they come up with new ideas
Too many intangibles!
Developers have hard time estimating!
So what do we do?
Make decisions on information often
Spread the decision-making across the project
This is where user stories come in
What are stories? 3C
Story CardWritten on Note cardsShould have estimates, notes etcNo jargonWritten in direct speech
Conversation!Details behind the storyEmerges when team talks with Product owner, customer / customer proxy
ConfirmationAcceptance tests
Example of StoryA user can search for jobs by attributes like location, salary range, job title, company name, and the date the job was posted
A user can view information about each job that is matched by a search
A user can view detailed information about a company that has posted a jobMore Samples!
Conversation?
What is an Epic?A user can search for a jobA company can post job openings
Theme?
Why write Stories?
Words are imprecise!Main dish comes with soup or salad and bread(Soup or salad) and Bread?(Soup) or (Salad and bread)?The User can enter a name. it can be 127 charactersMust the user enter a name?Can it be other than 127 chars?
Words are imprecise contd…The system should prominently display a warning message whenever the user enter invalid dataWhat does should mean?What does prominently display mean?Is invalid data defined elsewhere?
Stories shift the focus from writing to talking“You built what I asked for, but it’s not what I need”
Stories are equally understandable by developers  and customers
Support iterative development
Stories are right size for planning
Stories support participatory design
Stories emphasize user’s goals not system attributesWhat are we building?The product shall have a gas engineThe product shall have four wheelsThe product shall have rubber tyre mounted to each wheelThe product shall have a steering wheelThe product shall have a steel body
What if we had stories instead?
Don’t forget the purposeThe story text we write on cards is less important than the conversations we have
User Story Template“As a <Some Role>I want <Some Need>So that <Some Benefit>”
A “real” Story cardAs an <unregistered user of [an online game]>	I want <to setup a trial team>So that <I can try the game without signing up>
Advantages of “As a user, I want” user story templateWith “I want” phrase, person more closely identifies with stories and person’s mind goes instantly to imagining as he or she is such-and-such.Helps in prioritizing story. The product owner is forced to understand the feature, benefits and value (“so that” phrase)This format is a best practice towards executable requirements and a domain specific language
What is criteria for good story?IndependentNegotiableValuable to users or customersEstimableSmallTestable
IndependentIntroduce as little dependencies as possibleBreak up work in vertical layersDependent stories should not be done in same sprint
IndependentBAD
Company can pay for a job posting with a visa  card
Company can pay for a job posting with a master card
Company can pay for a job posting with an American Express
Good
Company can pay for a job posting with a credit card
Also good
Company can pay for a job posting with one type of a credit card
Company can pay for a job posting with two additional types of credit cardsNegotiableNot contractsDescribe what, not howShould be imprecise and open for negotiationShould encourage conversationNot requirements, leads to requirements
ValuableIf we can’t specify value of a story we probably don’t know enough about it
Valuable to purchasers or usersThroughout the development process, the development team will produce documentation suitable for an ISO 9001 audit. -- purchaser
Not
All connections to the database are through a connection pool
All error handling and logging is done through a set of common classes.
If there’s a technical story put it in terms the business can understand
Up to fifty users should be able to use the application with a five-user database license
All errors are presented to the user and logged in a consistent manner.Estimable*“Make login button look ‘cool’” is not estimableIf we can’t estimate a story we cant commit to itLack domain knowledge
Lack technical knowledge
Story is too big* Yes, it is a word!
SmallSize does matterA user can plan a vacation (EPIC)Based on team and capabilities and technology in use.Allows more granular tracking of progressEasier to estimate (less error prone)
TestableIf you can’t test it, how do you knowIt’s done?It’s done right?Should have done criteriaBusiness criteriaTechnical DebtCross-cutting concernsRegression failures allowable?

User Story

Editor's Notes

  • #4 Software requirements is a communication problem.Software Engineer != Construction.Building software is side effect of discovering the customer’s problems.
  • #5 The communication problem is between those who want the software and those who build the software
  • #6 If either side dominates the business loses.
  • #7 The functionality and dates are mandated with little regard for reality or whether the developers understand the requirements.
  • #8 … technical jargon replaces the language of business and developers lose the opportunity to learn from listening.
  • #9 We need a way of working together so that resource allocation becomes a shared problemProject fails when the problem of resource allocation falls too far to one side
  • #12 We cannot predict a software schedule. Estimation is the calculated approximation of a result which is usable even if input data may be incomplete or uncertain (Wikipedia). Estimation is prediction NOT planning. Typical first estimate is off by factor of 4  0.25x to 4x. They should be naturally realigned as we gather more information during the project.
  • #15 Human beings in general are bad at absolute estimates. They are good at relative estimation.
  • #17 We make decisions based on the information we have, but do it often
  • #18 Rather than making one all-encompassing set of decisions, we spread decision making across project
  • #21 Card – Stories are traditionally written on note cards. Cards may be annotated with estimates, notes, etc
  • #22 Conversation – Details behind the story come out during conversations with product owner
  • #23 Confirmation – Acceptance tests confirm the story was coded correctly
  • #28 Stories that are big are called EPIC. They can potentially be broken down into smaller stories. Epics are listed in the product backlog for future sprints / iterations.
  • #29 A collection of related user stories
  • #33 If the requirements are written down then At best the customer will get what was written. Customer may make lot of assumptions while writing the requirements.
  • #35 Stories support and encourage iterative development. Encourage deferring the detail until you have the best understanding of what you really need.
  • #39 Intentionally left blank.Think what points might go in this slide
  • #41 A user story is request for valuable stuffPromise for future conversationIn scrum it goes into product backlog item.
  • #42 Identifies who the user is, what they want to do and why?
  • #44 This mnemonic helps determining whether a story is acceptable or not.
  • #45 If there is lot of dependency it might suggest we are breaking work in horizontal layers (in tiers – Database, db layer, business logic, UI)Agile methodology suggest to breaking work in vertical layers (slice through tiers)If not independent, it make product backlog difficult to manage multiple layers of dependency.If dependency is unavoidable, then prioritize dependent stories after the stories they depend on.Or use mocking architecture, decouple dependency.
  • #47 Story should be request for value.Should not dictate what they want.Advantage is it will avoid biased opinion Eg: By how many runs will England win against India. This mean we are assuming that England will win.Too much detail turns user story into contract which is taking away self-organization capability of scrum team.
  • #48 Identifying value is key part of writing the story.Everything in scrum is value driven.
  • #50 Common reasons why they’re not estimableLack domain knowledgeCan discuss with business people and learnLack technical knowledgeCan spike on the story to learn more about itTwo stories, one for the spike one for the real workStory is too big – cannot commit to big stories.Sometimes useful to write the epic to be a placeholder for some glossed over part of a system.Pulled from thin air estimate!Or break it down.
  • #51 Small stories are easier to estimate.A story that is too big to do in single sprint is an “EPIC”
  • #52 Cross cutting concerns: compliance with corporate needs. External regulations.