Finding the

   

Finding the "Sweet Spot"

One of the most difficult challenges we face in the requirements process is making the requirements detailed enough to be well understood without overconstraining the system and predefining a whole host of things that may be better left to others downstream in the process. ("Do we really have to specify Pantone 287 as the background color in our GUI spec? No? How do you like the color they came up with last time?")

Time after time, our students pose the following question, which represents one of their biggest concerns: " To what level of specificity must I state the requirements in order to avoid any chance of being misunderstood ?" Although many students are hoping for a simple answer, unfortunately , there isn't one. The only answer we can truthfully provide is, "It just depends." For example, as an exercise in requirements writing, we often use the light box exercise (Figure 23-1).

Figure 23-1. Light box exercise

graphics/23fig01.gif

The goal of the exercise is to write clear and simple requirements using natural language or the use-case technique to describe the behavior of this device. In the exercise, the user is available for interviewing, so the requirements writer can refine the specification with clear user input. As an example of an effort in the natural language style, let's look at the following requirements specification [Davis 1993].

After On pushed but before Off pushed , system is termed " powered on."

After Off pushed but before On pushed, system is termed "powered off," and no lights shall be lit.

Since most recent On press, if Count has been pressed an odd number of times, Odd shall be lit.

Since most recent On press, if Count has been pressed an even number of times, Even shall be lit.

If either light burns out, the other light shall flash every 1 second.

This specification is fairly tight and would be quite adequate for most purposes. More important, it reflects the way the device user intended it to work!

However, a programmer who has the task of writing a program to simulate this behavior will discover at least one ambiguity in this exercise almost immediately: What does it mean to flash the bulb every 1 second? Still seem obvious? Let's take a look at the duty cycles in Figure 23-2.

Figure 23-2. Possible lamp duty cycles

graphics/23fig02.gif

If you were the programmer, would you pick duty cycle A or duty cycle B? Although most pick duty cycle B, it becomes clear that the requirement is ambiguous. A requirements-sensitized programmer will recognize this ambiguity and will attempt to resolve it by asking the customer, "Which duty cycle should I use?" But if the programmer is not so savvy, does not recognize the ambiguity, or thinks, "I know what you meant because I know how this thing should work," the behavior of the device when delivered may deviate perceptibly from the customer's stated requirements. Your project may be at risk.

In most potential applications, it probably doesn't matter whether the bulb flashes on for 1 second or 0.25 second. But if this were an electrosurgical device, it would matter a lot . The power delivered to the electrode would be 100 percent higher in duty cycle B than in A, with perhaps unfortunate results.

So, the answer to "What level of specificity must I provide?" is " It depends on the context of your application and on how well those doing the implementation can make the right decisions or at least ask questions when there is ambiguity ."

In the case of the even and odd counting device, the specification as stated is probably adequate. In the case of the electrosurgical device, more investment in describing the requirement would be needed. A timing diagram would be needed, and the specification would probably also have to define such issues as the rise time on the upslope of the "on" current, the precision with which the "on" time must be controlled ( ± x milliseconds ), and other factors; otherwise , the power delivered will not be right, and the device will operate incorrectly. Figure 23-3 summarizes this dilemma.

Figure 23-3. Ambiguity versus understandability

graphics/23fig03.gif

The goal is to find the sweet spot ”the balance point where the investment in requirements provides "just the right amount of specificity" and leaves "just the right amount of ambiguity" for others to resolve further downstream.

As you move to the left from the sweet spot on the curve in Figure 23-3, you lower both ambiguity and understandability. For example, if we provided timing diagrams, complete with timing tolerances, to an unsophisticated user and if we maintained that level of specificity throughout, the user may well not be able to understand the specification at all or might even be unwilling to take the time to read it. Worse, due to your apparent thoroughness, the user might trust you too much and not take the time for a careful review. You are also at the risk of the customer's inability to see the forest for the trees. ("I didn't want a light bulb; I wanted you to turn on the emergency light at the end of the production line.")

As you move to the right of the sweet spot, ambiguity goes up, but understandability again goes down. For example, at the extreme limit, you might simply say, "Build me an even/odd counting device," and no one could possibly understand what you mean.

Finding the sweet spot is a learned skill. It will depend on the abilities of the team members , the context of the application, and the level of certainty you must provide so that your system works as intended.

Mary Had a Little Lamb

Let's have a little fun with the issue of ambiguity and also see whether we can find some more tips that will help us remove ambiguity whenever and wherever it's necessary to do so. (If you are a fairly formal sort , without much use for the "softer" side of this problem space, you may wish to skip this short section.)

For the rest of us, let's have a little fun, courtesy of Gause and Weinberg [1989], whose book leads us through an exercise that illustrates the ambiguity problem and also provides some serious insights about possible solutions.

Consider the familiar nursery rhyme "Mary Had a Little Lamb." Although it's unlikely that anyone will build an information system based on this sentence , it's nevertheless interesting to ask, "What does it mean?" In order to disambiguate this example, we can perhaps use the keyword or dictionary technique . In this technique, we focus on the keywords in the statement and look at the options, based on various meanings for each. Here we'll focus on the words "had" and "lamb." "Had" is the past tense of "have," so we'll use the definition of "have"; we can use "lamb" directly. Here's what we find for "have."

have 1a: to hold in possession as property . . . 4a: to acquire or get possession of: to obtain (as in "the best to be had") . . . 4c: ACCEPT; to have in marriage . . . 5a: to be marked or characterized by (to have red hair) . . . 10a: to hold in a position of disadvantage or certain defeat . . . 10b: TRICK, FOOL (been had by a partner or friend) . . . 12: BEGET, BEAR (have a baby) . . . 13: to partake of (have dinner) . . . 14: RIBE, SUBORN (can be had for a price) [1]

[1] Adapted from Webster's Seventh New Collegiate Dictionary (Springfield, MA: Merriam Co., 1967).

And here's what we have for "lamb."

graphics/sheep_icon.gif lamb 1a: a young sheep esp. less than one year old or without permanent teeth . . . 1b: the young of various other animals (e.g., smaller antelopes) . . . 2a: a person as gentle or weak as a lamb . . . 2b: DEAR, PET . . . 2c: a person easily cheated or deceived, esp. in trading securities . . . 3a: the flesh of lamb used as food [2]

[2] Ibid.

Accordingly, we could interpret the phrase "Mary had a little lamb" to mean any one of the entries in Table 23-1.

For people who grew up with this nursery rhyme and who read the rhyme to their children each night, this discussion might sound preposterous: "How could any reasonable person interpret such a familiar phrase in so many bizarre, outlandish ways?" But such a complaint is neither fair nor realistic if we expect someone from a different background, and perhaps even a different nationality and culture, to attempt an interpretation based strictly on the dictionary definition of the two keywords. If it can happen with nursery rhymes, surely it can happen with complex software systems the likes of which have never yet been created.

Table 23-1. Lambic Interpretations

"Have"

"Lamb"

Interpretation

1a

1a

Mary held in possession a little sheep less than one year old or without permanent teeth.

4a

1a

Mary acquired a little sheep less than one year old or without permanent teeth.

5a

1a

Mary is the person who owned a little sheep less than one year old or without permanent teeth.

10a

1a

Mary held in a position of disadvantage a little sheep under one year old or without permanent teeth.

10b

1a

Mary tricked a little sheep under one year old or without permanent teeth.

12

1b

Mary gave birth to a little young antelope.

12

2a

Mary is (or was) the mother of a particular small, gentle person.

13

3a

Mary ate a little of the flesh of a lamb.

14

2c

Mary bribed a small person trading in securities who was easily cheated.

   


Managing Software Requirements[c] A Use Case Approach
Managing Software Requirements[c] A Use Case Approach
ISBN: 032112247X
EAN: N/A
Year: 2003
Pages: 257

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net