2.1. Meet Sam

 <  Day Day Up  >  

Systems are not developed in a vacuum . They are created to meet an organization's needs. The client for whom a system is developed is the source of the requirements for the system and is the final decider of whether a system meets those requirements. Sam, the client, represents a composite of clients for whom I have developed systems over the years .

Sam owns the business CD Rental and Lawn Mower Repair. He started out with lawn mower repair and discovered that people who use lawn mowers like to listen to CDs and they prefer listening to a different CD each time they mow. Therefore, Sam came up with the idea of renting CDs. The service started out as a whim, but it has grown dramatically.

Sam contacted me about creating a system for keeping track of rentals in his store. His current system of using cards similar to library cards works, but it is unable to provide him the reports he feels his growing business requires.

Currently Sam has only one store. Since business is booming, he is considering opening several more stores. He wants us to design the system not only so it works in his store today, but so he can change it easily to accommodate multiple stores tomorrow.

2.1.1. Tim the Developer

Tim introduced me to Sam. Tim studied computer science in college and worked summers at Sam's CD Rental and Lawn Mower Repair. He has been working as a programmer for five years, the last couple of years with me. He is back in school getting a master's degree. We still work together, but mostly remotely. He takes courses and does some teaching, so he is often unavailable during the day, when I am talking with Sam.

Tim represents an amalgamation of programmers with whom I have worked. We work together on approaches to solutions, but usually work separately on code due to the remoteness factor. Because of our physical separation, code readability is extremely important.

2.1.2. Sam's Request

Sam came up with some features that he wants to incorporate into his system. They are based on what he already does with his index cards, as well as additional ideas that he developed in his head. He listed them on a sheet of paper:

  • I want to be able to keep track of where each CD is, both when it is in the store and when someone has rented it (including who has rented it).

  • I want the system to report when CDs are overdue.

  • I want a catalog so that customers can see what CDs are available and what songs are on them.

  • When I have multiple stores, the system should show which stores have a particular CD.

  • I want to be able to offer discounts to frequent renters.

  • I want a charge system that enables me to bill customers per month rather than per rental.

2.1.3. Sam's Use Cases

Sam, Tim, and I will develop the system with this list as the informal requirements for the system. We will transform these requirements into use cases . [*] I have found that writing use cases helps both me and the customer understand what the system needs to do. The cases are specified in sufficient detail so that we can appreciate the problem's scope and magnitude. Additional detail can be added later so that when it comes time to design or code, the necessary detail is available. Working through a system's use cases also helps to identify the users who should be consulted when their parts of the system undergo detailed specification and design.

[*] For further information on use cases, see Writing Effective Use Cases by Alistair Cockburn (Addison-Wesley Professional, 2000).

Sam and I explore, in more detail, the first item on his list:

"Sam, who do you want to keep track of CDs?" I asked.

Sam replied, "What do you mean?"

I continued , "Do you want the customers to be able to check out their own CDs?"

"No," he answered , "only the clerk should perform checkout."

"Then let's go through the steps of checking out a CD, since that sounds like a primary use case," I suggested.

"How about returning a CD?" Sam queried.

"That sounds like another one, so why don't you tell me about both of them," I requested .

Sam explained the checkout and return procedures. After some discussion, I put his narration into the following informal use case descriptions. These use cases describe how the new system should work and are based on how the current manual process operates:



Checkout_a_CD

  1. The customer brings a CD case to the clerk.

  2. The clerk retrieves the actual CD corresponding to the case.

  3. The customer presents his CD Store Customer Card. (The customer already has one of these for the manual system.) The clerk types the customer ID into the system.

  4. The clerk types the CD ID into the system.

  5. The system records that the CD is rented to that particular customer. It prints a rental contract.

  6. The customer signs the rental contract.

  7. The clerk files the rental contract in a file box named "Signed Rental Contracts."



Return_a_CD

  1. The clerk types the CD ID into the system.

  2. The system records that the CD has been returned.

  3. The system determines whether late fees apply and informs the clerk if that is the case.

An informal use case description can lead to enlightenment, especially when combined with an examination of what can go wrong at each step. I asked Sam what the clerk did in their current system if a customer did not have his CD Store Customer Card. He said that the clerk looks for the corresponding card in the customer file. We captured this information in another informal case.



Checkout_a_CD (extension if no customer ID)

  1. The customer identifies himself using a photo ID.

  2. The clerk enters information from the ID into the system.

  3. The system searches for the customer ID using the information from the photo ID. If no matching customer is found, the system indicates an error.

The use cases presented so far are informal. They mix user actions with system actions. Some authors (e.g., Larry L. Constantine and Lucy A.D. Lockwood in Software for Use: A Practical Guide to the Models and Methods of Usage Centered Design [Addison-Wesley Professional, 1999]) suggest that the use cases be written in a more technology-independent manner. Actions that are unrelated to system processing will drop out of the flow and appear as comments. For example, the Checkout_a_CD use case might look like this:



Checkout_a_CD

  1. The user enters the customer ID and the CD ID into the system.

  2. The system records the entry. It responds by creating a rental contract for the customer to sign.

Notice that the actual way in which the IDs are entered into the system is not specified. The IDs could be scanned in using a bar code reader, typed in, or spoken and translated by a speech recognition program.

Initial use case descriptions might state exactly how customers expect the system to work. Before implementing the use cases, you can rework them into a more abstract, less-technology-dependent description. Removing the implementation details can help focus on the business policies and procedures that need to be programmed.

2.1.4. The Ilities

The purpose of requirements is not only to validate what the user wants, but also to verify that the implemented systems meet those wants. Requirements include more than just functional specifications as supplied by use cases. These other requirements relate to the software's quality. They are often called the ilities , since many of the terms end in ility . These quality specifications include reliability, testability, deployability , and performance.

Often these quality requirements are not documented for a system. They are implicit, such as in the case of Sam's system. It is assumed that the system will meet reasonable requirements. For example, its performance should ensure that users do not notice a delay.

For larger, more complex systems, documenting these quality requirements is essential. You can find further information on eliciting and documenting requirements in Software Requirements , Second Edition, by Karl E. Wiegers (Microsoft Press, 2003).

 <  Day Day Up  >  


Prefactoring
Prefactoring: Extreme Abstraction, Extreme Separation, Extreme Readability
ISBN: 0596008740
EAN: 2147483647
Year: 2005
Pages: 175
Authors: Ken Pugh

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