Copyright 2003 Nikolas S. Boyd. Permission is granted to copy this document provided this copyright statement is retained in all copies.
Trace Cards |
Nik Boyd |
A new technique for capturing requirements information on index cards is introduced, including policy cards, intelligence quality and quantity cards, and face cards. The origins, purpose and usage of each card type are discussed, and a few representative examples are provided. Some considerations regarding how trace cards may be used in conjunction with CRC cards are also offered.
Software developers need simple ways to capture and share knowledge. Large (4" x 6") index cards provide a convenient form factor for capturing and sharing knowledge. Index cards are convenient from several standpoints:
For these reasons, index cards can facilitate some of the most difficult aspects of software development, including not only solution design, but also problem definition. Just so, trace cards are primarily problem oriented. Trace cards offer a convenient and efficient way to capture and share knowledge about business policies, business intelligence needs, and business activities. They offer a way to keep object-oriented software designs aligned with business policies and priorities.
During the late 1980s, Ward Cunningham and Kent Beck introduced the use of CRC (Class, Responsibility, Collaborator) cards1 as a technique for capturing and sharing object-oriented design decisions. Since then, the technique has become popular among object-oriented software developers, largely due to its simplicity and effectiveness. Just as developers need a convenient way to capture and share design decisions, requirements analysts need simple ways to capture and share knowledge about business policies, business intelligence, and business activities during software development.
Language dominates software development, especially during the earliest phases of a project when the vast majority of time is spent discussing business objectives and the intended effects for a project. Ultimately, all software elements, components and composites are named, and they are often organized based on linguistic affinities, e.g., as objects and sentential expressions in object-oriented designs. So, the words used in discussions about business problems and solutions will naturally have a dramatic and durable impact on the resulting software. Beck and Cunningham emphasized this point with respect to CRC cards:
"The class name of an object creates a vocabulary for discussing a design. Indeed, many people have remarked that object design has more in common with language design than with procedural program design. We urge learners (and spend considerable time ourselves while designing) to find just the right set of words to describe our objects, a set that is internally consistent and evocative in the context of the larger design environment."
"Responsibilities identify problems to be solved. The solutions will exist in many versions and refinements. A responsibility serves as a handle for discussing potential solutions. The responsibilities of an object are expressed by a handful of short verb phrases, each containing an active verb. The more that can be expressed by these phrases, the more powerful and concise the design. Again, searching for just the right words is a valuable use of time while designing."
Perhaps even more so, discovering just the right words is valuable when capturing discussions about business policies, business intelligence, and business activities. This knowledge is the requisite fodder consumed during requirements analysis and solution design, and it establishes the context within which software solutions will be developed and evolved.
How should knowledge about business problems be captured? What kind of residue should remain and be maintained after solution development? These questions often arise during software development projects. Most modern human interfaces are graphical, and so require graphical designs. Also, since the early 1980s, graphical notations have become a popular way to visualize other aspects of software.
Some methodologists have offered elaborate graphical notations for capturing knowledge about business elements and activities, e.g., the UML.2 Such diagrams provide useful overviews and help us visualize the structural relationships between software elements, components, and composites. However, as design artifacts and residues, diagrams are expensive to create and maintain and usually require special tools. Also, they are prone to complexity and (intentionally) limited in their expressiveness.
Because of their rich structure and interconnections, most goals and usage scenarios are best expressed as structured narratives. Narratives are easy to create and maintain and usually require only simple tools. Also, narratives are easier to simplify and provide the full expressiveness of natural language. Given that modern software extensively leverages language metaphors, structured narratives offer a better fit for maintaining the traceability and the expressive proximity of the resultant software to its originating requirements.
Success is rarely accidental. It must usually be planned. This is especially true for software development. Software is a conceptual artifact. Software developers need conceptual leverage, techniques that make tackling the inherent complexity of software solution design tractable. First and foremost, software developers need to ensure that their work products align with the policies and improve the activities of a business.
Software solutions support and improve business activities. Business activities are directed by business policies. Business intelligence provides the management community with data critical to the guidance of business activities and the maintenance of their alignment with business policies.
Trace cards extend conceptual thinking beyond objects into their business origins. They provide ways to capture and share knowledge about business policies (vision and mission), business intelligence (qualities and quantities), and business activities (workflows and solution usage). They also help establish and maintain alignment and traceability across requirements levels.
Solution designs are usually impacted by various forces and constraints outside of the control of a solution designer. Engineers evaluate and attempt to balance the known forces based on their known or discovered effects. To properly evaluate and balance a set of forces, an engineer needs to know not only what these forces are, but also how they relate to each other. Software designers need to know not only what to accomplish and how, but also why. Trace cards provide answers to some of these questions.
Explicitly identifying the nature and level of goals can help us to align technology development with business objectives. In Writing Effective Use Cases,3 Alistair Cockburn identifies several goal levels used for requirements. However, there are certain kinds of business policies that were not included. The following proposed goal levels extend those he offered and continues the metaphor of verticality he used. These levels can also be found in my proposed conceptual model for software requirements.4
|
Business policies establish the ends, means, and central values of a business. These policies traditionally appear in business vision, mission, and value statements. These core business documents originate in the corporate governance community, especially the board of directors, the corporate officers, and the management team.
Policy cards generally derive their focus from business governance policy statements: vision, mission, values. Policy cards provide a way to capture and organize selected business policies on index cards. They can be used:
A policy card should always capture the following information:
A benefit description describes the benefit(s) conferred by the instantiation.
A policy card may also exhibit one of two organizational variations: organized by theme and organized by subject. Card templates (1 and 2) for these two variations can be found in Appendix A.
When policy concerns are organized by theme (see Card Template 1),
When policy concerns are organized by subject (see Card Template 2),
Policy cards can be used to capture ends statements, especially from vision and mission statements. However, ends statements differ from means statements in a subtle but significant way. Ends statements focus on effects rather than efforts. For some further remarks about ends statements and their formulation, see Quality Alignment and Quality Inventories.5
Here's a sample of how an overall corporate vision statement might be captured for Geekcorps (www.geekcorps.org).
Growth and loyalty are common themes that appear in many business mission and value statements. Growth is usually a mission critical quality for any profit-oriented business, while loyalty is often mission central, but not necessarily critical. Cards 2 and 3 list some growth and loyalty quality subjects. For growth, some of the quality instantiations are further broken down into lists of benefits.
Card 2. Growth as a Mission
Theme
|
||||||||||||||||||||||||||||||||||||||||||||||||
Card 3. Loyalty as a
Mission Theme
|
||||||||||||||||||||||||||||||||||||||||||||||||
Software solutions often have several associated service quality concerns, both at the human interface and within the internal workings of the system. While the externally oriented qualities will impact the system users, all of these concerns will likely be relevant to the stakeholders responsible for operational system monitoring (IT, ops). For example, an online accident claim filing service might have the following external and internal quality concerns:
Card 4. Claim Submission
Service Qualities (External)
|
||||||||||||||||||||||||||||||||||||||||||||||||
Card 5. Claim Submission
Service Qualities (Internal)
|
|||||||||||||||||||||||||||||||||||||||||||||
Business intelligence offers management the information needed to guide the business in the directions established by business policies. Business intelligence regards the various business quality concerns, especially the (quantitative) measurement of the relevant business products and activities.
Intelligence cards are generally paired: a quality card with a quantity card. A quality card collects knowledge about a single business quality concern, while the corresponding quantity card collects details about the measurements related to that quality concern. Together, they can be used:
Templates (3 and 4) for these two cards can be found in Appendix A. To link the quality and quantity cards, they both share the following information:
A quality card (see Card Template 3) captures the following additional information:
A quantity card (see Card Template 4) captures the following additional information:
Returning to the customer loyalty issue from Card 3, we can detail the qualities and quantities needed to characterize and measure customer loyalty from the perspective of a customer service manager.
Card 6. Customer Loyalty
Questions
|
||||||||||||||||||||||||||||||||||||||||||||||||
Card 7. Customer Loyalty
Measures and Conditions
|
||||||||||||||||||||||||||||||||||||||||||||||||
Here's another example, this one taken from the GQM literature.6 We can detail the qualities and quantities needed to characterize and measure change request processing speed from the perspective of a project manager.
Card 8. CR Processing Speed
Questions
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Card 9. CR Processing Speed
Measures and Conditions
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The following sample user story was taken from Extreme Programming Installed8 (pg. 27).
"When the GPS has contact with two or fewer satellites for more than 60 seconds, it should display the message "Poor satellite contact," and wait for confirmation from the user. If contact improves before confirmation, clear the message automatically."
Card 10. GPS Position
Sense Stability Questions
|
||||||||||||||||||||||||||||||||||||||||||||||||
Card 11. GPS Position
Sense Stability Measures and Conditions
|
||||||||||||||||||||||||||||||||||||||||||||||||
Face cards derive their name from their dominant focus on interfaces and interactions, the contracts and conversations that take place between interaction participants. Face cards provide a way to capture business activities and their stakeholders as use cases on index cards. A template for face cards can be found in Appendix A (see Card Template 5).
Face cards can be used as a starting point for writing use cases, or subsequently for use case analysis, especially in conjunction with agile software development methods. Detailed discussions of use cases and their components can be found in Writing Effective Use Cases3 by Alistair Cockburn. Face cards intentionally simplify use cases by eliminating some of the details that can be found in a "fully dressed" use case.
A face card captures at least the following information:
A face card may also capture preconditions and postconditions:
There are a few features that distinguish face cards as a medium for capturing use cases. As a form of structured narrative, face cards emphasize the identification of stakeholders and their interests, their expectations, their contractual obligations, and their collaborative responsibilities.
The format of a face card reinforces this by separating the stakeholders (in the left column) from their interests, expectations, obligations, and responsibilities (in the right column). As a result, these descriptions have a distinctive narrative style. Most conditions are expressed using an active verb phrase with present tense. Two exceptions include preconditions and some triggers. Preconditions use an active verb with past tense. Some triggers may also use past tense.
When applied to a business interface, the conditions and actions often describe the business partners and their interests, their expectations, their contractual obligations, and their collaborative responsibilities. But, they may also describe value exchanges, goods exchanges, and information exchanges.
When applied at a human interface, the conditions and actions often describe the business stakeholders and their interests, their expectations, their functional obligations, and their collaborative responsibilities. But, they may also describe information exchanged between a human operator and the system under development.
When applied at a component interface, the conditions and actions often describe the clients and collaborators, and their expectations, their functional obligations, and collaborative responsibilities.
When used at these later, more detailed requirements levels, face cards can serve as an intermediate residue between use cases and design. They can help identify candidate objects and responsibilities at human interfaces and component interfaces. This information can then be fed forward into CRC cards used for responsibility-driven object-oriented design.
The following three face cards were derived from the use case named "Buy Stocks over the Web" in Writing Effective Use Cases3 (pg. 4). The first face card lists the stakeholders with their interests and the scenario postconditions.
Card 12. Stock Purchase
Stakeholders and Postconditions
|
||||||||||||||||||||||||||||||||||||||||||||||||
The second face card shows the main success scenario, including a scenario initiation precondition and a trigger.
Card 13. Stock Purchase
Main Success Scenario
|
The third face card shows the extension scenarios, including their respective triggers.
Card 14. Stock Purchase
Extension Scenarios
|
The following two face cards were derived from the use case named "Get Paid for Car Accident" in Writing Effective Use Cases3 (pg. 5). The first face card shows the stakeholders with their interests, the postconditions, and the main success scenario, including the scenario initiation trigger.
Card 15. Accident Payment
Main Success Scenario
|
||||||||||||||||||||||||||||||||||||||||||||||||
The second face card shows the extension scenarios.
Card 16. Accident Payment
Extension Scenarios
|
From a certain perspective, the prevailing state of software development practice has inverted priorities. Typically, we rush (or are rushed) to implement solutions before we sufficiently understanding the problems we're being asked to solve. Stakeholders tacitly assume that software solutions will improve the quality of their lives and business activities. But, such benefits still elude our collective grasp far too often. Without giving quality due consideration, without spending significant time discussing quality expectations explicitly and systematically, the achievement of satisficing solutions will continue to be accidental and haphazard rather than intentional and sure. The "rubber meets the road" where requirements meet designs.
Historically, the practice of responsibility-driven design with CRC cards has focused primarily on knowledge (noun phrases) and behavior (verb phrases) to the virtual exclusion of qualities (as expressed by descriptive adjectives). The absence of quality responsibilities can usually be traced back to the absence of quality considerations in the original requirements. Quality requirements often receive little or no consideration during requirements gathering, especially in comparison with the emphasis often placed on form and function.
But, the consideration of object responsibilities should properly include qualities in addition to knowledge and behavior. Conceptually, we can understand qualities as expressive of the dimension (and states) of being. So, objects have and ensure qualities in addition to having knowledge and doing behaviors. Objects should know why in addition to what and how. Every object
|
In practice, object-oriented designs entail strong contracts between servers and their clients. So, a server object imposes responsibilities (especially for quality) on its clients as preconditions to the proper usage of its services. Likewise, a server object offers quality guarantees to its clients (as postconditions and invariants). Method preconditions (ensured by clients), method postconditions (ensured by servers), invariants (ensured by servers), constraints, and qualified class names all offer the potential for consideration with respect to quality requirements.
For example, reconsider Card 15 above. This example demonstrates how user stories can be analyzed for their goals, and how apparently simple goals can entail quite elaborate quality and measurement requirements when explored in detail. Notice that the definitions of named quality conditions often relate values, e.g., from measurements, like the following:
- stable position sense =
- ( contacted satellite count >= stable position sense minimum )
During requirements analysis (and during design), it's often useful to explore how quality themes and conditions decompose into value relations and the measurements and metrics needed to test them. Explicitly identifying and naming test conditions also improves the testability of object-oriented designs. Intelligence cards can be used to capture and share the results of such analysis. Thus, identifying and naming quality conditions and their component value relations can play an important part in ensuring software solution quality.
Perhaps this extended understanding of responsibilities can help improve our object-oriented designs, especially in the context of CRC cards. Both client and server responsibilities can be listed on a CRC card. Enumerating only the responsibilities for knowledge and behavior weakens a class design, while also enumerating the respective responsibilities of both a server and its clients strengthens a design into a contract, especially when quality responsibilities are included. This simple practice also increases the testability of the design if the quality conditions are ultimately exposed as test methods in the implementation. So, this practice can serve as a natural adjunct for test-driven development approaches like extreme programming (XP).9
| Card Type | Knowledge | Sources | Traceability Intent | |||
| Policy Card | quality concerns, benefits (value) | governors: board + officers, vision, mission, values | tied to business policy statements: vision, mission, values | |||
| Intelligence Cards | concerns, goals, metrics, measurement linkage | requestors: activity managers, other stakeholders, objectives, goals | ties business intelligence requirements back to business policies and priorities | |||
| Face Card | goals, interests, expectations, obligations, interactions |
expectors: activity participants, users and other stakeholders, business contracts, user stories | ties business activities and activity improvement goals back to business policies and priorities | |||
| CRC Card | responsibilities for: quality, behavior, knowledge | developers: design sessions and decisions | ties solution designs back to business activities and business intelligence requirements | |||
Template 1.
Theme-Oriented Policy Card
|
||||||||||||||||||||||||||||||||||||||||||||||||
Template 2.
Subject-Oriented Policy Card
|
||||||||||||||||||||||||||||||||||||||||||||||||
Template 3.
Intelligence Quality Card
|
Template 4.
Intelligence Quantity Card
|
Template 5. Face
Card
|
||||||||||||||||||||||||||||||||||||||||||||||||