Showing posts with label SCRUM. Show all posts
Showing posts with label SCRUM. Show all posts

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.)
But:
  • 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.

Summary
  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.





Example:

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.

Email? 
Postal? 
Encrypted?
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.


Saturday, October 8, 2011

What really is Agile development anyway

I want to write my thoughts, maybe slightly random though they are, whilst I think about it. This isn't a well researched article, or in fact an article at all. It serves only as an outlet for my thoughts and mild frustration.

Firstly I should say that I am definitely PRO the use of Agile, and definitely PRO the use of SCRUM. I am also VERY much PRO AGILE, without total SCRUM. You'll see what I mean:

I have recently been looking at the job-boards as I decided it was time to move. Now, along with the usual technology buzzwords on the buzzword list, is the now almost ubiquitous requirement for Agile, or SCRUM, and slightly less so, Kanban or XP.
It seems that every job wants Agile. That's pretty good but what do they want and what does it mean?

Some companies I guess are very serious. They are prescriptive and formal with SCRUM. For those it can be applied to everything - ordering the coffee or creating their next geo-stationary satellite. Others are just 'kind of' in the space. They like bits of it, do bits of it, and are doing ok. How do you apply this SCRUM thing to the web-site dev team or perhaps the team doing the cargo shipping management system. The teams have different cultures and dynamics, different feelings, perhaps a different attitude to their trade.

I'm not sure a lot of people know what they are talking about when they talk about Agile. For me, Agile is a general set of ideas that benefit and tend to create successful software projects. I think that Agile is a type of thinking.

A place to start is the Agile manifesto. I'm sure this site will change over time, I hope so, but my first feeling when seeing this is not a good one. Before I even get to the merits of the text and the list of luminaries in the list of Authors, I'm thinking what a hideous thing to look at. I'm also thinking that it has a  bit of a self-righteous feel to it. The Principles is where you should end up really. That's the meat and veg of the site. Forget that it looks like a prayer for some religious order.

The Principles behind the Manifesto 
We follow these principles: 
Our highest priority is to satisfy the customer through early and continuous deliveryof valuable software. 
Welcome changing requirements, even late in development. Agile processes harness change for the customer's competitive advantage. 
Deliver working software frequently, from a couple of weeks to a couple of months, with a preference to the shorter timescale. 
Business people and developers must work together daily throughout the project. 
Build projects around motivated individuals.  Give them the environment and support they need, and trust them to get the job done. 
The most efficient and effective method of conveying information to and within a development team is face-to-face conversation. 
Working software is the primary measure of progress. 
Agile processes promote sustainable development.  The sponsors, developers, and users should be able to maintain a constant pace indefinitely. 
Continuous attention to technical excellence and good design enhances agility. 
Simplicity--the art of maximizing the amount of work not done--is essential. 
The best architectures, requirements, and designs emerge from self-organizing teams. 
At regular intervals, the team reflects on how to become more effective, then tunes and adjusts its behavior accordingly.
Link to the manifesto

This is the heart of it all. This for me, after years of fiddling with projects, is not only the fashionable thinking of our time, but it's the best chance of success.

What about SCRUM, DSDM...? Well for me, these are not what Agile is about. They are ways of playing at Agile for sure, but they're not what Agile is? For me, in a sense, they take away some of the agile ethos, yet they do deliver good projects. I'll explain.

Objectives of Agile
I think that the objectives of Agile are things like quick thinking, quick reactions, the stuff in the principles. It is about getting the right stuff done for the client and knowing that all of us, clients and project producers, will constantly be making mistakes in our understanding and communication.

Methods of being Agile
I think the SCRUM, the XP and the DSDMs of this world are the methods, the prescribed and prescriptive methods to go from the tools and techniques to the result. The result is the product developed by using the objectives.

Techniques for using in our pursuance of Agile
The tools - well I think they're things like TDD, Unit testing, User stories, DDD.

I think the three previous sections are a bit general and debatable, and probably a bit wrong. In a few weeks, if I review what I have written here. I may well change it but I think the principle is correct.

People say that the Agile thing started around '86 when Scrum was first mooted. I don't think it was used then though. It was much later.
I remember using DSDM in the late '90s, and then XP. I'm sure I didn't hear the term Agile though. One day it suddenly became very trendy to talk about Agile. It was an invented term to group these new ways to develop software. Kanban arrived in 2004, a few years before that the manifesto was created.


At one end of the Agile spectrum is the philosophical, the cultural aspect of developing software. At the other end is where the philosophical approach has been distilled and implemented with tools to become a prescriptive process. The prescribed process is something losing it's free spirit. Sounds a bit hippy, but the free spirit is dangerous. In the hands of the careless it is another lost project. In the hands of the lazy its an excuse. That is why we need SCRUM. SCRUM is therefore good. A force for good but it is not, in itself, the thing that is AGILE.