Writing Good Requirements and Stories
Think of your developers as housebuilders. To get the house you want—whether they are building it from scratch or renovating an existing structure, and whether they are using traditional construction materials or putting together a modular home—you must tell them exactly what you want. If you don’t specify where you want the windows and doors, how high the roof should be, and what ready-made fittings (windows, floor coverings, heating, etc.) you want, the builders will build pretty much whatever they want, and it almost certainly will not be what you want. It is obviously not practical to let them build something and if you don’t like it, have them demolish it and start over. Yet that is close to what some software projects do. (The analogy is appropriate, as many software projects cost about the same as building projects.)
It is safe to say that to get the end result you want, you must specify what you want. If you want a double-width entry door, you must say so. Otherwise, if your request is open to interpretation, the builders might give you a single door, or perhaps they will gold-plate their efforts and give you a triple-width door. You also must tell the builders the purpose of what they are building so that they can select the best set of materials and construct the product in the most appropriate way. If you fail to tell them that your building will be used to store heavy machinery, then you might well find that the floors collapse under the weight. Similarly, the environment comes into play: You would like your bedroom to be on the east side of the house to catch the morning sun .
The instructions you give to the builders are parallel with the requirements and stories you give to your developers. They must be clear, be unambiguous, and indicate why whatever it is they specify is needed. Your developers, like the builders, will build you the correct solution if they understand your requirements and understand why they are building it .
Moreover, your requirements must be testable. For the builders, this is straightforward. When you want a window opening, you give them the measurements—6 feet wide by 4 feet high, or 180 by 120 cm. You can measure whatever they build to test for compliance with the specification. Similarly, requirements for software or any other solution must carry a measurement to allow testing. It’s a little more difficult than saying 6 by 4, but the ability to test a requirement is well worth the effort to find the right measurement. We’ll come back to measurements and acceptance criteria (they’re more or less the same thing) in a few chapters .
Over the next few chapters, we look at requirements and stories and explain how you can write better ones. Please note that if you normally write stories, even though the next three chapters appear to be talking about traditional requirements, there is plenty of information that is also applicable to stories .
By the way, writing requirements and stories is not a separate activity. You would be writing them as you discover them during any of the requirements activities .