I feel that to many people do, perhaps to many. If I where to put some on Christmas what would it look like? Just from the top of my head it must include so many things:
The Christmas SHALL be full of happiness, joy, family gatherings, presents, good food, etc., etc.…
First, One cannot put that requirement on the <Object> “The Christmas”. It is just a word, but it means so much to people. They put in their own emotions, expectations and dreams into it. Second, as a requirements guy I can say that you MUST avoid piling attributes to it like I did in my example. But we all tend to do that, right? I can really imagine the failed verification on my requirement. I hope you can to. I need to relax and back off for a while.
Before you continue reading this, do me a favour. Put down what you’re holding (in your hand or your head)—your shopping lists, your third cup of coffee, your assignments, the phone call you should be making—and sit quietly for just 60 seconds. If you’re at work, don’t worry what your colleagues might think—this time of year everyone would love to contemplate, and more often.
Hello? Anyone there? It felt good to escape for a minute, didn’t it? But come back—it’s that time of year again: the modern miracle known as THE HOLLIDAYS, when into the dark little month of December, we squeeze in a lot of celebrations, from school gatherings, office parties and of cause family celebrations. Throw into that mix a generous dose of unrealistic expectations, budget-busting shopping, dysfunctional family feasts, airplane flights, darker days, colder weather, excess eating and drinking, and no wonder that along with “peace on earth”, come seasonal stress, exhaustion and depression.
So, lets rephrase my Christmas requirement:
The Christmas SHALL mean love for my fellow man.
By that expression (or requirement) I mean that people should get along with one another, have good feelings toward one another, and be nice to one another. It is this humanistic interpretation of Christmas that is celebrated in so many Christmas movies we either love or hate.
So by this I wish you all a Merry, Merry Christmas whatever you do and where ever you are. I end thios blog post with a warning example captured in a poem by Tess Gurney:
Cars and bustle, rush and hustle,
trolley dashing tempers clashing
Christmas cheer to much beer
mistletoe, plastic snow
christmas holly ‘lets be jolly’
christmas pud, do you think we should?
Turkey, stuffing, granny puffing,
fairy lights, men in tights
pantomimes, palour games
christmas cake, belly ache
as yet another piece you take!
Boxing day, in-laws stay!
Endless repeats on the telly, and again from your belly!
No more hassle…the odd brussel!
A pain in the arse!
In the last post Simon looked at the problem of expressing a user need using natural language. He will now continue with part two, the sollution.
User Stories using a structured technique
A technique that has proven to be very useful in reducing errors is patterns. One of the simplest way of expressing a user need is in a User Story, the structure of each story is often based on a pattern as follows:
As a … [stakeholder role] …I want to … [perform an action / record some information] … [With some frequency and/or quality characteristic] … So that … [description of value or benefit is achieved].
As a library_user, I want to search for books by title, with speed and ease-of-use, so that I can find all books with similar titles.
Effective natural language user stories/requirements generally consist of four basic structural elements :- entities, actions, events, and conditions. These elements can be used or modified by various cases such as the following:
Owner. • Actor. • Target. • Constraint.
Owned. • Action. • Object. • Trigger.
Using these concepts, we can re-state the user story template like this:
As a [Actor or Owner – who/what does the action]
I shall [Action – what happens e.g. store, update, send data]
for; [Object – what is acted upon]
on the [Target or Owned – where the output is sent ; recipient or end state]
with [Performance – frequency and/or quality characteristic]
when [Trigger – causes of action; data receipt/user interaction]
unless / even if [Constraint – business rule or limiting factor]
So that [Rationale – description of value or benefit is achieved].
In the example, ‘library_user’ is the actor, ‘search’ is an action, ‘books in the catalogue’ are the object, the ‘computer screen’ is the target, the performance requirements are ’with speed and ease of use’, the ‘provision of the book title’ is the trigger, ‘incompleteness’ is the constraint / qualifier and ‘finding books with similar titles’ is the value achieved. The user story becomes:-
As a library_user I want to search for books in the library catalogue on the computer screen with speed and ease-of-use when I provide a book title even if the book title is incomplete so that I can find all books with similar titles.
I provide a book title and begin a search for books in the library catalogue on the computer screen even if the book title is incomplete.
Benefits with patterns
Many user stories are more complicated than this example and no one single order can suffice but without including these elements the possibility for misunderstanding is significantly increased.
Another benefit of this template is that it enables an estimate of functional size to be made.
Standardized structured user story expression enables comparisons across time, across teams, across projects, and across organisations. Developers, product owners, and their customers thus have a common way of communicating so that end user value can be delivered in an effective way.
 “Writing Effective Natural Language Requirements Specifications” by William M. Wilson
In a recent Requirements Doctor Blog post, a contributor wrote “We do many short sprints in my project and do not need to spend useless time in the beginning on writing requirements that no one reads anyway”. While I mostly agree with this comment unfortunately it overlooks another, and often much larger, source of waste – and that is the amount of re-work that is done due to incorrect requirements. Again while I embrace the second principle of the Agile Manifesto “Welcome changing requirements, even late in development”, my experience is that the vast majority of change to requirements is a direct result of inconsistency and incompleteness in the original requirements expression.
I have used the word ‘requirement’ so far but for many people this conjures up the idea of ‘shall’ statements, for example “The system shall go fast”, whereas in an evolutionary approach such as Agile Development, User Stories are a more common starting point. Wikipedia provides the following definition of a User Story, “a user story is an informal, natural language description of one or more features of a software system”, and there, in the middle of the definition, is the Achilles Heel of User Stories; they use “natural language”.
This Achilles Heel is shared by many other development methods and so it is not a problem just for the Agile development paradigm, and the problem is brought about by the lack of adherence to the known good practices for requirements, (User Story), expression.
This is not the place to review the extensive literature on the issues of the use of natural language for expressing the needs and wants of users and customers. Put simply, left to their own devices with no guidance, writers of User Stories consistently fail to express themselves correctly, consistently and completely, (the same is true of writers of requirements).
I shall leave the topic of completeness for a later discussion, but put succinctly, I believe it is not possible to have a complete set of user stories / requirements. What I would like to discuss in these articles is the topics of correctness and consistency of user stories / requirements, and more importantly how we might measure correctness and consistency so that when we change a User Story we can ensure that it has been improved.
So when is a natural language user story correct? Well it must follow the syntactic and semantic rules of the language it is expressed in. Natural language syntax is basically about word order and punctuation.
The three words ‘book’, ‘library’ and ‘a’ can be ordered in six ways but only three are syntactically correct, “A library book”, “A book library” “Book a library”; three are not syntactically correct “Library a book”, “Library book a” and “book Library a”.
Natural language semantics on the other hand is concerned with meaning, conveyed by the relationship between words. If we look at the three syntactically correct triads: in “A library book” the word ‘book’ refers to an object and ‘library’ describes a type of book; in “A book library” the meanings have swapped, the word ‘book’ is now the descriptor and ‘library’ is the object being described. Finally, “Book a library” changes the meaning of ‘book’ again, now ‘book’ is an action applied to the object ‘library’! (Book can mean make a reservation).
So when is a natural language user story consistent? Simply when a word is used in a specific context then it must have a single meaning and no other word can have the same meaning. In our previous examples the work ‘book’ is used as a descriptor, as an object and as an action. In each of the triads the meaning of ‘book ’can be inferred by its position relative to the other words; the word ‘book’ is in three different contexts but only one can be correct, two must be inconsistent. Now consider this user story, ‘Book the book from the book library!’ Although this is syntactically and semantically correct I would postulate that this user story has a high potential for being misunderstood due to the inconsistent use of the word ‘book’.
So applying correctness and consistency rules to ‘Book the book from the book library’ I would suggest ‘Reserve the book from the library’ as an alternative that decreases the likelihood of wasteful work.
The final issue is how we might measure correctness and consistency. This is relatively simple, whenever a word or phrase breaks a syntactic or semantic rule then add one to the error count and whenever a word of phrase is used inconsistently then add one to the error count. Here are the scores for the various examples:
Spelling and grammar checkers can be used for syntactical checking, semantic checking is a little trickier but automated checkers do exist.
Next post in this series
In the next part of this discussion I will look at how patterns can help us get it right first time.
About the author
Simon’s experience has been gained in blue-chip companies, and public sector bodies, throughout the world and has a proven track record of helping organisations with their requirement documentation including stakeholder analysis, concepts of operation, requirements development, requirements management and architecture design. Recent clients include: The Russian Atomic Energy Authority – Moscow, The European Spallation Source – Lund, Novo Nordisk – Denmark and the Norwegian Army – Oslo. Simon truly appreciates the separate but related roles of tools, process and people when developing requirement documents. He understands that producing quality deliverables is dependent upon encouraging and sustaining a culture of engagement and commitment.
By starting with the statement “Agile doesn´t work” you really ask for trouble these days. I was attending a conference earlier this week and I meet Agile coaches, Agile Managers, Agile Testers, Agile Requirement Engineers and Agile Evangelists in general. The conference itself was very good and I got the possibility to talk about the requirements role for a successful project. Unfortunately, I needed to leave early so perhaps you might call me an Agile planner?
No, but on the metro back to the office (you know my Agile Schedule) a LinkedIn post by Oleg Vishnepolsky, CTO at DailyMail in UK, caught my attention. It started “Agile does NOT work!”.
He started; “Try telling someone that you are not agile. You might be arrested on the spot. The issue is that the word agile in the eyes of everyone is similar to the word good. Try telling others that you are not good, and they will call for a psychiatrist.”
I continued to read the post with great joy. I think he is spot on!!
Why Agile isn´t a silver bullet
Agile can be defined as “Agile (software) development describes a set of values and principles for software development under which requirements and solutions evolve through the collaborative effort of self-organizing cross-functional teams” (source Wikipedia).
First of all, don’t get we wrong. I don´t like the approach with “analysis paralysis” and so heavy front loading that you never get through the first base of requirements elicitation and definition. Many organizations have historically lacked the ability to say “this is good enough” and moved further in the development chain. If you stop to long the inertia of badly performed Systems Engineering will force the project to continue and start to develop stuff regardless. They have deadlines and a customer to satisfy, AND doing Agile projects makes it easier to skip the boring work of documenting both requirements and design. The team can go right ahead and do the fun stuff..
But is Agile as an opposite the salvation of any badly performing organization with schedule overruns, lost margins, port system quality and unhappy stakeholders?
I would argue not! You have the same people coming to work, but now let’s do the mistakes in an Agile manner instead.
Well, of cause, Agile basic principles are nice and I do like them:
You have customer focus (instead of technology focus)
You divide the work in suitable chunks, and;
You group in teams instead of stove pipes so that you get much better cross pollination of views and ideas. That’s great!
But it is still humans that needs to understand the problem they are there to solve. Perhaps Agile is a way of getting it better, but not getting it right? Could an old Waterfall organization that goes Agile like this approach because it reveals the problems earlier than before? Are they really looking into the root cause of the problems they are facing (which haven’t gone away just because you went Agile).
The common-sense methodology
Mr Vishnepolsky introduces the common-sense methodology and I like that thinking very much. Instead of digging trenches and throwing dirt on anyone not from the right belief, you might like to make a short retrospect and look at yourself before you continue this argument.
I would like to add my small contribution: For god sake, look at the scope and early requirement definition phase and do it with FOCUS and a sence of INFORMATION QUALITY!
Making it right from start so that people understand what you mean
Ok, I might add that you can develop this type of knowledge using an arbitrary methodology, but just for the sake of it say that you write some business or stakeholder requirements to make sure that you understand the problem you are there to solve. After you have agreed with the stakeholders the task at hand (to a reasonable level of detail) you might develop technical requirements using natural language techniques (writing requirements) and/or doing some system modelling to get the system boundary and interfaces in place. You might have read the architecting blog series here by Hillary Sillitto?!
But who do you have in mind when you do this work? You are not doing this because it’s fun or because someone asked you to, you do it to COMMUNICATE with others. The stakeholders need to understand your solution to his/her need AND the next person receiving your information (developers, testers, integrators, etc.) also need to understand what you are proposingSo, please start to do your requirements with some level of curiosity from the team working with them. You really need to understand their role here as drivers of knowledge from one part to the next. They first of all need to be correct and together with their other requirement siblings at the same abstraction level, they need to be complete (to the degree to level risk and avoid costly errors) and also not in conflict with each other so that one says “right” and another “left”.
But primarily, human write requirements for other humans. Perhaps using a second language and communicating through barriers like: culture, development contracts, technology domains and/or business hierarchies.
That’s my contribution to the common-sense discussion. Over and out!