Difference between revisions of "Secrets of defining requirements"
(→Never say never) |
(→Provability) |
||
| (20 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
| + | ==Principles of requirements specifications== | ||
| + | |||
| + | ===The basics=== | ||
| + | |||
| + | A requirement specification is a rule or a piece of work to do, or a collection thereof. A business requirement is often a driver for one or more pieces of work, that adheres to one or more business rules. With such similar definitions, it makes sense to combine them. Their differences are somewhat marginal, and rarely (if ever) improve clarity. So, for brevity and clarity of communication, we simply refer to "requirements" and "rules". | ||
| + | |||
| + | ===Provability=== | ||
| + | |||
| + | Each requirement must be provable or axiomatic. Although a specification may seem self-evident prima facie, it may not hold true for all time and/or after new evidence is presented. Care should be taken to ensure it is true for all time. | ||
| + | |||
| + | * Never say never | ||
| + | * Always avoid always | ||
| + | |||
| + | At any point in the future, someone might challenge the validity of a specific requirement. It must be possible to prove the requirement, or refer to existing evidence. It is not always necessary to provide evidence of a requirement at the time of writing it, but that could be easier than doing so at a later date. | ||
| + | |||
| + | ===Categorisation=== | ||
| + | |||
| + | Categorisation of a requirement is important for communicating them. Abstract categories such as "non-functional" and "functional" should not be used; there are always better categories to use. Also remember that a requirement could exist in multiple categories. | ||
| + | |||
| + | ==Three magic words== | ||
| + | |||
| + | These definitions are provided in [https://www.ietf.org/rfc/rfc2119.txt RFC2199] that indicate '''requirement levels'''. | ||
| + | |||
| + | ===MUST=== | ||
| + | |||
| + | This word, or the terms "REQUIRED" or "SHALL", mean that the definition is an absolute requirement of the specification. | ||
| + | |||
| + | ===MUST NOT=== | ||
| + | |||
| + | This phrase, or the phrase "SHALL NOT", mean that the definition is an absolute prohibition of the specification. | ||
| + | |||
| + | ===SHOULD=== | ||
| + | |||
| + | This word, or the adjective "RECOMMENDED", mean that there may exist valid reasons in particular circumstances to ignore a particular item, but the full implications must be understood and carefully weighed before choosing a different course. | ||
| + | |||
| + | ===SHOULD NOT=== | ||
| + | |||
| + | This phrase, or the phrase "NOT RECOMMENDED" mean that there may exist valid reasons in particular circumstances when the particular behaviour is acceptable or even useful, but the full implications should be understood and the case carefully weighed before implementing any behaviour described with this label. | ||
| + | |||
| + | ===MAY=== | ||
| + | |||
| + | This word, or the adjective "OPTIONAL", mean that an item is truly optional. One vendor may choose to include the item because a | ||
| + | particular marketplace requires it or because the vendor feels that | ||
| + | it enhances the product while another vendor may omit the same item. | ||
| + | An implementation which does not include a particular option MUST be | ||
| + | prepared to interoperate with another implementation which does | ||
| + | include the option, though perhaps with reduced functionality. In the same vein an implementation which does include a particular option MUST be prepared to interoperate with another implementation which does not include the option (except, of course, for the feature the option provides.) | ||
| + | |||
| + | ==Phrases and words== | ||
| + | |||
===Never say never=== | ===Never say never=== | ||
| − | + | You must not use the words '''never''' or '''always''' in specifications. This is because it would take forever to prove the statement true or false and, as that's impossible, it's improvable and thus cannot be used. | |
| − | + | {| class="wikitable" | |
| − | |||
| − | |||
| − | {| | ||
!Incorrect!!Correct | !Incorrect!!Correct | ||
|- | |- | ||
|Users ''never'' want to see their email on the screen||Users do not want to see their email on the screen | |Users ''never'' want to see their email on the screen||Users do not want to see their email on the screen | ||
|} | |} | ||
| + | |||
| + | In the correct form, there is an implicit "at the moment" ensuring it is '''correct at the time of writing''' the specification. | ||
Latest revision as of 15:06, 22 April 2020
Contents
Principles of requirements specifications
The basics
A requirement specification is a rule or a piece of work to do, or a collection thereof. A business requirement is often a driver for one or more pieces of work, that adheres to one or more business rules. With such similar definitions, it makes sense to combine them. Their differences are somewhat marginal, and rarely (if ever) improve clarity. So, for brevity and clarity of communication, we simply refer to "requirements" and "rules".
Provability
Each requirement must be provable or axiomatic. Although a specification may seem self-evident prima facie, it may not hold true for all time and/or after new evidence is presented. Care should be taken to ensure it is true for all time.
- Never say never
- Always avoid always
At any point in the future, someone might challenge the validity of a specific requirement. It must be possible to prove the requirement, or refer to existing evidence. It is not always necessary to provide evidence of a requirement at the time of writing it, but that could be easier than doing so at a later date.
Categorisation
Categorisation of a requirement is important for communicating them. Abstract categories such as "non-functional" and "functional" should not be used; there are always better categories to use. Also remember that a requirement could exist in multiple categories.
Three magic words
These definitions are provided in RFC2199 that indicate requirement levels.
MUST
This word, or the terms "REQUIRED" or "SHALL", mean that the definition is an absolute requirement of the specification.
MUST NOT
This phrase, or the phrase "SHALL NOT", mean that the definition is an absolute prohibition of the specification.
SHOULD
This word, or the adjective "RECOMMENDED", mean that there may exist valid reasons in particular circumstances to ignore a particular item, but the full implications must be understood and carefully weighed before choosing a different course.
SHOULD NOT
This phrase, or the phrase "NOT RECOMMENDED" mean that there may exist valid reasons in particular circumstances when the particular behaviour is acceptable or even useful, but the full implications should be understood and the case carefully weighed before implementing any behaviour described with this label.
MAY
This word, or the adjective "OPTIONAL", mean that an item is truly optional. One vendor may choose to include the item because a particular marketplace requires it or because the vendor feels that it enhances the product while another vendor may omit the same item. An implementation which does not include a particular option MUST be prepared to interoperate with another implementation which does include the option, though perhaps with reduced functionality. In the same vein an implementation which does include a particular option MUST be prepared to interoperate with another implementation which does not include the option (except, of course, for the feature the option provides.)
Phrases and words
Never say never
You must not use the words never or always in specifications. This is because it would take forever to prove the statement true or false and, as that's impossible, it's improvable and thus cannot be used.
| Incorrect | Correct |
|---|---|
| Users never want to see their email on the screen | Users do not want to see their email on the screen |
In the correct form, there is an implicit "at the moment" ensuring it is correct at the time of writing the specification.