Our Recent Posts

Archive

Tags

Short Stories and Agile Tales


User stories lie at the heart of the Agile process. Well defined stories can mean delivering on your commitments. Poorly written stories can lead to wasted time and carryover. However, writing "good" user stories can challenge even the seasoned software professional. With as pivotal as they are in delivering on your commitments, it's critical to get your user stories right.

So what makes for a good user story? Before we answer that, let's take a look at a simple example: a client wants a system that tracks customer information. They say they're an agile shop, and can provide you with a user story for exactly what they want. Here's what they send you.

Story 1: Manage Customers

  1. User can see customers

  2. User can edit customer details and information

After some initial surprise, you thank them graciously and mention that it's a little vague. They agree, and you all sit down to discuss requirements. After some creative collaboration, you have a much more complete picture of what they need.

Story 1: Manage Customers

  1. User can create a new customer

  2. User can edit the details of an existing customer

  3. Only authorized users can create new customers

  4. Phone numbers have to auto-format to (xxx) xxx-xxxx

  5. Zip codes have to be valid

  6. User can delete an existing customer if authorized

  7. User has to have permission to edit a customer

  8. Customers must have a first name, last name, address, and phone number

  9. The user can enter notes about the customer

  10. A customer can have an email address

  11. There's a list of customers that the user can view

  12. There should be an image to go with each customer

  13. Each customer should have a purchase history

  14. Only authorized users can view customers

  15. The list of customers can be filtered by items purchased, date of purchase, name, phone-number, email or address

Now you have a lot more to go on, but your team doesn't think they can complete the whole thing in one, or even two sprints. They're worried about the size of the story and the number of unknowns. So you decide to break the story apart and focus on the essential functionality first.

Looking at the list of requirements, some areas of functionality start to emerge: create customers, retrieve customers, update customers, delete customers, validation, authorization, purchasing. You realize these are just CRUD operations with validation and authorization. In fact, this is a common pattern of functionality visible in many applications dealing with a collection of data.

The requirements fall under two features: Customers and Purchases. There are no solid requirements around purchasing. After discussing it with your client, it makes sense to tackle Customers first, and then delve deeper into Purchasing. For now, the Purchases feature will be deferred. We'll then use the velocity information we get from developing the Customers feature to help estimate the Purchases feature.

With this new insight, you start to break the requirements for Customers apart into user stories. Your goal is to create small stories which can be developed and tested during a single sprint. We want to minimize carryover.

Story 1: As a User, I need to view all Customers, so that I can manage contacts

  1. User can view existing customers

  2. User can view the first name, last name, image, address, email, and phone number of a customer

Story 2: As a User, I need to filter the Customers, so that I can locate those of interest

  1. While viewing the list of customers, a user can filter the list based on name, phone number, email, and address.

Story 3: As an Administrator, I need to create a customer, so that I can manually add a contact

  1. User can create a new customer

  2. User can enter the first name, last name, address, and phone number of a customer

  3. Only an Administrator can create a new customer

  4. User can enter Notes about the customer

  5. User can select an Image for the customer

  6. Phone numbers have to auto-format to (xxx) xxx-xxxx

  7. Zip codes have to be valid

  8. Changes to the Customer can either be Saved or Cancelled

Story 4: As an Administrator, I need to edit a customer, to keep information up to date