Tuesday, November 1, 2011

How to do User Stories - easy and fast but effective

Intro type waffle
I think that there are tons of people, developers especially, working in less structured teams, under pressure to get things done ASAP, wishing that they had more experience perhaps, and not really feeling that the project is totally in control or that they are not really getting the whole picture. This text is a quick heads-up on how we can quickly switch to User Stories to help us. User stories are a key concept in SCRUM so it might be worth thinking about getting your company to look at SCRUM. It is very good, it is simple, but it can be deceptively difficult for companies to adopt. But, even without SCRUM User Stories are very helpful in their own right.
  1. We need to stop.
  2. Lookup.
  3. Look around us.
  4. Ask some simple questions.
  5. Then ask some more questions.
  6. You now have some ideas - share them.

Writing stuff down is Good
The pressure to code first, to evolve the ideas on the fly, is big. Just because you do this does not mean you are being Agile. If it's a bit chaotic, don't convince yourself you are doing bits of SCRUM or XP when you're not. Don't give it a name if it doesn't deserve it. Rather, give your work a bit of structure.
Think before you code.

List all the types of people going to use the system
This is very important. It is usually quite quick, it often gives you a slightly different view or appreciation of the project ahead.
Don't really know the answer to this? Excellent. Start talking to the Client or Client representative and any major stakeholder (don't forget the department that might be supporting the completed).
If the Client / Business has names for these users already, then use those names. Don't create your own. Use the Business terminology if you can.
Don't keep this information to yourself. Share it. Even if it's in an email. If you don't have a BA, then make sure people up the management chain understand. Share it with other developers verbally.
Actively avoid using "User" as a role. Should it be, Premium user, Bronze user, Auditor, HR staff,...

The Secret is talking 
Talking, chatting, discussion - this shows that things are going well. There should be constant chatter about requirements and needs. Talking is a function of a successful project.

Core is Key
It really is. Whenever we talk about requirement, the functionality we want, the things the client needs. Keep one eye on it Context. Oh dear, I've mentioned Context without clearing up the meaning of Core. Always consider if the function is Vital to the business. Maybe you want to remember the MoSCoW mnemonic too, if that helps. But discover more about the domain, more about the business, and then discover if the feature is Core to the Business. Knowing this helps prioritise and makes sense of it in context. Context - well that can be any grouping of features or subset of the system or business. Any logical group that helps decompose the big problem.

Requirements - Stories are NOT contracts
Your junior colleagues, the management, the Clients - they will all think that once a requirement is written down it is finished with. They think you will go away and create something and you will return with a working thing. Emphasis to them that this is not the case.
Requirements will always fall short. They will always change or evolve.
The clients must not be scared of this. Embrace discovery.

Use the Business language
Ubiquitous language. Ensure that the developers and the Client Business use the same language. Use the Business terminology in preference to any technical jargon. Sometimes two departments in an enterprise may have slightly different terms for the same thing. Sometimes they are using the wrong term completely. Be aware of this. If you need to create a new term for a category or something, do so WITH the User or domain expert's knowledge.

List the Stories
Get writing the stories. This is quick to start and it will grow. Don't worry about getting it right or wrong, at least you are doing something. Stories are written from the perspective of the USER.
Follow this simple structure:

As a <put user role here> I want <put the feature here> 
so that <put the benefit here>

Divide and conquer the list.
Just start listing these down and keep them short and sweet.
To help get started, in your mind before you write the list, make some sub-headings on how you can break the list into related sections. Do whatever you want and don't think too deeply about it. 
Just get the list down. It will evolve and therefore whatever you write now will be either wrong or incomplete. Don't worry about that, it is good.

The list will not be complete.
Don't think you're going to capture everything if you're pushed for time. Instead, 
  1. Start by listing the easy and obvious User Stories
  2. Stop and think a bit, imagine the system is in use, and imagine who is using it, and note down the use cases that are difficult, risky, or likely to be forgotten by an under pressure developer.
  3. Add some more.
Scope of the thinking
You start with an overview of the future and work down towards the detail. If you are a developer then technology will keep leaping into your mind and you can not avoid trying to implement the system in your imagination. This is natural, but keep it under control. Developers often focus on the technical detail and work up to the daylight of the overview. Don't do this. Imagine you are the Users of the system. 

You can break the scope of the project or the list of the Stories, into areas. Get a happy understanding of any areas that you would like to park and think about another day. 

So there we are. Job done.
Not quite but the work done to get this far is probably the most valuable in the project. 
Make sure you are talking to the people in the know and make sure you share your thoughts with others.

Discuss or think about the stories
They probably hide a lot of information about the system. If a story raises more questions than it answers, then you've hit a rich seam of value. You can break this Story down further and document it, or if you're  happy that the information is not needed on paper and has been captured, then don't. I would suggest writing it if poss. It is rarely wasted time.
At the end I'll give an example of breaking down a User Story and the types of question raised by an initial Story.

Where from here
These stories can now be taken forward and used in project estimation, planning and testing.
(That will be in another blog posting.)
  • We have improved our knowledge of the business.
  • We have greatly improved our chances of success.
  • We have disovered information about the system.
  • We have a feeling for the risky areas of the development project.
  • People are talking.

  1. Writing is GOOD
  2. Start asking question and continue asking questions.
  3. List the Roles of the users.
  4. Divide and conquer the list before you make the list.
  5. As a <put user role here> I want <put the feature here> so that <put the benefit here>
  6. Concentrate on Stories that are risky, likely to be forgotten, difficult.
  7. Use the Client's terminology.
  8. Discuss and discover more hidden in the stories.


A very common user story:
As a user I want get an order notification so that I know my order has been placed.

This is ok as far as it goes and is much better than nothing.
However, thinking about it a bit could raise some questions, such as:
Do staff members, the support staff get to order stuff?

Do the staff members need to create another account?

Can all Customers order everything?

Do we have a category of Customer, say Corporate, or Business, that can access certain areas? 
The answer to this is yes or no or maybe, BUT this question is not relevant to the User Story. It may well though generate another User Story along side of this. Or it might make us alter the list of Roles.

What happens if email is rejected?
How to ensure the email is correct before ordering?
Another email?

There's tons of things to think about.... and it's great fun. The problem is:
  1. How do I record all this new information because I'm lazy and/or busy.
  2. How do I make sure this information is used and acted upon.
Well the answer to #1 is related to #2. I would record it as easily and as quickly as you can and then share it as best as you can. If there is little project control for your project then assert some control around this area. If there is good project control, a Project Manger or team lead, then share with them. If you are the de facto team lead, even of a team of one, then do as you see fit. Communication is KEY.

No comments:

Post a Comment