User Stories

Everybody who came in touch with Scrum or Agile heard about them, many used them and still there is confusion of what it is and how the Best Practices look like: you’re right, i am talking about User Stories! For the easier writing of this blog post i am talking only about Scrum here. But it fits to other Agile methologies too. Lets dive into the topic!

From theoretical point of view, a User Story is a requirement. User Stories are a subset of requirements. User Stories have a common look and feel, also called a common structure. There are mutiple kinds of structure for User Stories in the english wikipedia article described. Here i will take this classical style:

As … (role/persona) i can … (what) so that … (value/benefit).

For more clarity lets have a look at some easy examples:

  1. As Administrator i can manage users in the backend so that i do not have to insert SQL queries into the database.
  2. As User i can find web pages easily according to key words so that i do not have to rely on web pages which i or my coworkers already know.

As you see, this examples are a bit open. They leave space for the how to reach the goal exactly in many ways: there is no exact description how the user interface has to look, there is nothing said about how to reach the goal technically and finally it is not said how the user is guided to reaching his goal. As a good product owner you leave this level of granularity in your user stories until the team decides to be a bit more detailed to reach several goals:

  1. first of all you want to compare business value of your features, so you want to assure, that no technical or other solution detail distracts you while talking to stakeholders about “What’s more valuable for you, feature A or feature B?”
  2. than there is the part, that the team should be involved as the solution experts they are in the refinement and solution definition.

The first point helps you to keep a vivid Product Backlog. Also it helps the whole Scrum Team to focus (one of the Agile Values) on things which are important. Also it helps you and your Scrum Team to only do the preparation work necessary for the next upcoming Sprints. You don’t want to have a huge set of fully refined User Stories. As you may already have realized, the world sometimes changes. And so the markets do too. Some markets change really fast. The User Story you’ve written today can be invalid in a year or even a month. Or it could be, that it has to be changed on a non-trivial base. So it costs you and your company time, energy and money to maintain a big, fully refined Product Backlog. Somebody will be in a situation where she is remembering that one ticket/User Story which is nearly what is now under debate. But it is hard to find! Once in a while somebody needs to clean up and walk through all the User Stories and decide if they are valid any longer. With valid here is ment if they are not done yet or they are not longer the need of the customer. So my advise to you: there are better things to do with your time than maintaining millions of future maybe items! You’re here (in your company ;)) for only one thing: create value for your customers!

The second point helps the individuals in the team to feel connected to the solution they build. If they are involved early and can freely design the how, they have not only influence on what is going on, they really shape their work. With this said they can feel more self-efficient. And who is not feeling better, if she can build her own surrounding and decide how its done. For the why it doesn’t matter if team members are free to find the best fitting User Experience or the technical solution, both things should lay in the teams decision circle.

Properties of good User Stories

Another good hint into the direction of great User Stories is the “INVEST in Good Stories and SMART tasks“. The things proposed there are a good true north and ment more as a best practice. Often you find different definitions of the letters of the acronyms, so i decided to give you both words in case i heard of them. Lets have a short look what the acronyms meen.

Good User Stories should be:

  • Independent – the perfect set of Stories has no dependency, so we can implement tham in the order we decide. Unluckily it is not always possible…
  • Negotiable/Negotiated – the User Story of our dreams is not finally fixed and not very detailed. We are allowed to leave solution details open.
  • Valuable – that one is easy and hard together: we need value for at least one customer. Without customer value, we should not think about writing down a single letter or loose time and money.
  • Estimable – we need Stories, for which we are able to write down a number. Hopefully it is a Story Point ;)! Seriously: if we can’t say at least “This Story is as big/complex/risky as that Story.” or “This Story is bigger/more complex/riskier than that Story”, we are not able to compare the User Stories. That hinders us from being able to decide how a good Plan for the next Sprints looks like.
  • Small – a story is best, if it is not too big. The size described here is ment in two meanings: the story should be doable in few weeks by one person and it should fit on one card. The few weeks restriction helps us to keep the estimations for the User Stories realistic. The bigger the story, the wider the range of not hitting the real corridor with the estimation. To restrain the written size of the story helps us to not use a whole concept instead of a User Story. It forces us to break down bigger stories and Epics (very big User Stories, our example number one could be one) into fitting ones.
  • Testable – we need realistic stories. One way to achieve this is to think about how the story could be tested. If you have no idea, how you could test the story, than the chances are high, that your User Story is somehow not clear. Sometimes it is likely, that you have non-functional requirements. For example you want your application to be high performant or as small as possible. This things can be added as acceptance criterias like this: “the application should be live usable” or “the application should fit in 5 megabyte”.

Good Tasks should be :

  • Specific – hmm, that one is easy and hard at the same time: the tasks in a User Story should not be “design” or “implement”. That should be done latest in the Sprint Planning. They should be something like “implement the method save of the user controller”. So you see, we need very granular information what should be done here. Important side note: the team should decide what tasks to do, not the Product Owner or the Scrum Master. The later one can and should point out better ways and should not let the team get away with the given weaknesses. But he never should force the team to one specific solution.
  • Measurable – the example from the last point is very good measurable: either the method is implemented or not. “Fix the bugs” is a bit harder to measure. This comes from its unspecific formulation. Which bugs are ment? All known? All existing? Only a subset like “the new introduced”? Here the measurable is often tied to the “specific” property.
  • Achievable/Attractive – here we have two properties in the smart acronym, which point to slightly different directions. On one side a task should be doable in one Sprint and overall, that’s what we call achievable. On the other hand it should be meaningful for the customer, the team or the company. So there should be a sense behind everything we do.
  • Relevant/Realistic – this is another two-sided part of the smart acronym. As the attractive of the last letter, the relavant is pointing to the sense. We don’t want to have useless work done. This would be also called a waste of time and money. So we focus on relevant things. The realistic is somehow pointing to the achievable. With a task like “make the rendering of the finished, postprocessed animation movie happen in under a second” will not be reachable without huge preprocessing or huge computing power.
  • Time-boxed – There should always be the wish to finish the task in a given time. In Scrum this is easy: we want the User Stories done in this Sprint. Therefor all their subtasks and all other tasks should be finished in the Sprint too. Hopefully your Sprints are time-boxed too :)!

Now we have seen how the User Stories and tasks should look like. Lets take a short step into why, when and how to split things. As often the aim is to reach a reasonable granularity. We want our stories as small as necessary. This helps us to get to the point where we can estimate them very accurate. On the other side we don’t want to break them into too small pieces. So we want them as big as possible, to not have to deal with five thousand User Stories per Sprint, which is in the most environments a huge administration overhead.

How to refine User Stories

How can we go from the first version of our User Story to an adequate, good-sized final version? About that topic you can find plenty (quick) guides and advices spread all over the web. I like the Quick Reference Guide for Splitting User Stories from the agilelearninglabs for its conciseness and its powerful tools. It is a good starting point for a best practise for your team. It consists of these steps:

  1. Split, when you see conjunctions (and, or,…).
  2. Replace generic words with specific ones.
  3. Write down acceptance criteria, they:
    • are pass/fail conditions, that prove story is done or not
    • can become smaller stories
  4. Do a timeline analysis:
    • pretend the story is done
    • What sequence of events happen while the usage?
    • each event can be an own, smaller story

Lets go through this steps with the example User Story #1. You don’t have to scroll up all the way again, here we have it again:

As Administrator i can manage users in the backend so that i do not have to insert SQL queries into the database.

First question of a team member could be “What is ment with manage Users?”. As you see, in the first iteration we skipped the step one, cause there is no conjunction, and proceeded with step two. The Product Owner can answer now “create, edit and delete Users”. So we end up with the

As Administrator i can create, edit and delete users in the backend so that i do not have to insert SQL queries into the database.

Now we have the conjunction “and” and are able to split the Story into three smaller ones:

  • As Administrator i can create users in the backend so that i do not have to insert SQL queries into the database.
  • As Administrator i can edit users in the backend so that i do not have to insert SQL queries into the database.
  • As Administrator i can delete users in the backend so that i do not have to insert SQL queries into the database.

For brevity we only look at the third story from here on. It has no conjunctions and deleting is not very generic. Now we can proceed with the third step. An acceptance criteria could be as following: “the user is permanently unavailable from the whole system”. The team members can now ask, if they should remove the user completely from the database (step four starts: timeline analysis). Than the Product Owner can ask his lawyer and answer that the user data have to be stored for the timespan X and afterwards should be deleted completely. With that information the story can for example be refined to 

As Administrator i can delete users in the backend so that i do not have to insert SQL queries into the database.

Acceptance criteria:

  • the data of the user isn’t removed when the user is deleted
  • the data of the user is kept for at least for the timespan X after deletion
  • after the timespan X after the deletion of a user the data are automatically and completely

For now this one looks well defined and razor sharp.

Another example splitting

Lets have a look at the second example User Story. Here it is again

As User i can find web pages easily according to key words so that i do not have to rely on web pages which i or my coworkers already know.

The first refinement step, looking for conjunctions is not getting us further. There is only one between “i or my coworkers”. So we go directly to the generic word “find“. Here we can split the Story into the search and the results display like this (for brevity we leave the benefit in an abbreviated form):

As User i can insert my key words easily for a web search so that i do not have to …

As User i can view the result web pages easily according to my key words so that i do not have to …

A short note: if we oversee the generic word find, we could and would come to the same result in the timeline analysis in the fourth step. Back to the next step: the acceptance criteria. Lets clarify them only for the third story:

As User i can view the result web pages easily according to my key words so that i do not have to …

Acceptance criteria:

  • the searched key words are written prominently on the result page
  • the result web pages are listed with a link and a short description

Lets go with the timeline analysis. While thinking of the users timeline, for me two things pop up. Firstly i am not sure if all the billions of maybe results should show up and secondly i am not sure, if the result page should be immediately shown or if there can be a link send by email when things are ready. Asking our virtual Product Owner brings us to this additional two acceptance criteria:

  • the web page is loaded in realtime (< half a second)
  • the result web pages are paginated results per page

Lets have a look at the complete User Story:

As User i can view the result web pages easily according to my key words so that i do not have to …

Acceptance criteria:

  • the web page is loaded in realtime (< half a second)
  • the result web pages are paginated results per page
  • the searched key words are written prominently on the result page
  • the result web pages are listed with a link and a short description

The acceptance criteria can become new User Stories. Here the first sounds really like a huge thing (not forgetting to scan the whole web ;)) and should be extracted to standalone User Story.

Lets have a look on the INVEST properties with the result User Story:

  • Independent: the “maybe extracted” realtime story is not independent of the view results web pages story, which is not independent of the insert key words story… we have sometimes to deal with that.
  • Negotiable: all the result User Stories in this example seem for me to be 
  • Valuable: overall for every result User Story there is the value given by the why of the first one. Sure it can be written more clearly, but for demonstration it is enough to have it a bit raw here.
  • Estimable: the two result User Stories (inserting the key words and viewing the results) can be estimated. They are not vague. The realtime story carries a huge risk: we don’t know what we have to do to reach this. That one is nearly unestimable.
  • Small: like in the estimable point the two result User Stories fit the small condition too. Also the realtime User Story is here not really tangibly. 
  • Testable: for our result User Stories we can write real easy acceptance/front end tests. Also for the realtime User Story those tests are written easily and fast.

As you already realized, this User Stories describe the Google internet search page. The stunning part is, that we have enough space for the how part. The main benefit of this is, that the Team now has the freedom to ask questions about the wished solution, can be creative in the how and feel really connected to what they build. With this benefit we reach a situation, where they can go deep into being proud: they helped the organization to build something which gives value to the world. And i guess i don’t have to tell you that people with a why and allowed to build it how they want, tend to stay longer intrinsic motivated. So it is a real profit for the customers, the organization and the team.

Conclusion

We looked at what a User Story is, how good ones look like and how to refine them in an easy process. But this is only the tip of the iceberg. There are plenty other descriptions all over the web. For instance Richard Lawrence wrote a stunning article about Patterns for Splitting User Stories. I personally have good experience with the techniques i presented here to you. I love how concise and easy they are. For me they are best practices and i found them useful to start with and afterwards reflect what is fitting better to the team and the surrounding.

 

Leave a Reply

Your email address will not be published. Required fields are marked *