150 likes | 179 Views
Ambiguity and What to Do About It. Ben Kovitz bkovitz@acm.org. Ambiguity. What it is The distinctions in the description fail to guide you when you meet the reality Types of ambiguity: “multiple choice” (syntactic: it’s this or it’s that, which is it?)
E N D
Ambiguityand What to Do About It Ben Kovitzbkovitz@acm.org
Ambiguity • What it is • The distinctions in the description fail to guide you when you meet the reality • Types of ambiguity: • “multiple choice” (syntactic: it’s this or it’s that, which is it?) • “yawning void” (you have no idea what this refers to)
“Multiple Choice” Ambiguity • What it is: • You have a known set of possibilities, and the description allows for more than one • Examples: • “Response time must be fast”—how fast? • “User selects A or B and C or D” • 1 selection, 3 choices: A, B and C, D • 2 selections, 2 choices each: (A or B), (C or D) • 1 selection, 2 choices with a subselection: A, B;if user chooses B, then user also chooses between C, D
“Multiple Choice” Ambiguity (2) • Detect by: • Looking at the description • Repair by: • Ruling out known possibilities: • Ask a specific question: do you want A or B? • Narrow the description
“Yawning Void” Ambiguity • What it is • The relevant things in the world have no place in your conceptual framework • You can’t ask a specific question, only open-ended ones • Reality undermines what you thought your description meant—like djinni stories • Examples: • “Display the name of the road” • “Palomar Airport Road” or “County Route 12”? • “Disconnect service from any customer who does not pay bill within 30 days.” • So, you want to disconnect customers with €0.00 bills?
“Yawning Void” Ambiguity (2) • Detect by: • Mental state: confusion • Surprises from reality • There is no systematic way to find it • Repair by: • Re-forming your conceptual framework • Shake things up: interact with the reality • Compare and contrast examples, observations • Define new conceptual vocabulary, make new distinctions • Now it’s “multiple-choice” ambiguity; repair accordingly
A tempting solution • Write very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very, very precisely.
A tempting solution (2) • Think of every possible interpretation in advance • “Say it right the first time” • Prepare to win the blame game • Why it doesn’t work: • Assumes hostile, infinitely intelligent, infinitely patient reader • Reality is more complex than you can anticipate • “Yawning void” ambiguity dominates in real software development
Ambiguity in Software Development • All software development consists of converting informal descriptions into formal descriptions (programs) • We always start with human ideas • Human ideas can be vague or contain holes or contradictions • In practice, real software development involves vast numbers of details
Providing context is the fundamental tool for resolving “yawning void” ambiguity Solutions that work • Redundancy • Context • Multiple forms of presentation • Repetition • Formal notations • Interaction • Prototypes • Writing code • Real users working with live system
Context • What it is • Context is everything outside your description and its subject matter, that relates to it in any way • Helpful types of context • Examples • Rationale: “Why” • Domain knowledge: describe the problem • Etymology • Structure • Emphasis • Confirmed implications
Context (2) • Context attaches meaning to descriptions • Context enables real human beings to disambiguate • Context fills the “yawning void”
High-bandwidth communication • Informal conversation • Repetition in many conversations • Always needed to supplement documents • Easy: anyone can do it • Interactive • Address problems as they arise • Answers tailored to questions: A self-customizing database • Not too much information at one time • Sometimes not applicable • APIs, languages, standards, protocols
Formal languages • Special notations • Source code • Executable descriptions are best • In every software project, you convert informal descriptions into formal descriptions (programs) • Formal notations are the finish line, not the place where you start
What to Do about Ambiguity • Create it • Temporarily allow requirements to go beyond what we fully understand • Destroy it • Add enough context to anchor the meaning of descriptions to reality in a way that real human beings can understand