1/74
From Dr. Levine's iCollege decks: Data Dictionaries and Model Consistency; Sequence Diagrams, Interfaces, and Failure; Nonfunctional Requirements and Edge Cases; From Analysis to Specification.
Data dictionary (purpose)
Defines each field's meaning, kind of value, and rules so field names have a shared meaning (Oct 26)
Why "d1: Date" and "flag: Status" is an unhelpful dictionary
It repeats the ambiguity: which date is d1, what does flag = 1 mean, and when may a value be blank?
Seven data dictionary columns
Field, Entity, Meaning, Type/example, Required/blank rule, Key/reference/comparison rule, Source
What a dictionary meaning must NOT do
Restate the field name (e.g., "dueAt: the due date"). A field name alone does not define the event that supplies its value.
loanNumber vs studentNumber
loanNumber identifies one borrowing occurrence (required, unique). studentNumber on LOAN refers to the responsible student (required FK, may repeat across loans).
Same student borrows the same camera again next month
Create a NEW loan record with a new loanNumber; do not edit the old one (E3)
returnedAt (correct definition)
Actual date/time the item returns. Blank while the loan is active; recorded on return; must be at or after checkoutAt. Blank means active, never unknown.
Why "returnedAt: date-time, optional" fails
It doesn't say what it records, when blank is allowed, or what blank means
X1 defect: LOAN 0..* to 1..* ITEM
Lets one loan cover several items, conflicting with E2. Repair: change the ITEM endpoint to exactly 1.
X2 defect: returnedAt required when a loan is created
Conflicts with E6 (blank means active); every new loan would look already returned. Repair: blank while active, set at return.
X3 defect: checkout does not check for an active loan
Conflicts with E4 (one active loan per item); two students could get the same item. Repair: add decision "Active loan for this item?" Yes = block, No = create.
Four parts of a consistency finding
Conflict, consequence, repair, and a concrete check ("a repair is stronger when we can check it")
STUDENT 1 to 0..* LOAN: "a student can have no loans, so a loan can have no student"
FALSE. Read the minimum one direction at a time: a student may have 0 loans, but each loan must refer to exactly 1 student.
Workflow vs sequence diagram
Workflow answers "What happens?" Sequence diagram answers "Who asks whom, in what order?" (time runs downward)
Five questions only a sequence diagram answers
Ordering, blocking, trust boundary, return content, absence
Absence (sequence diagram question)
What happens when the other system sends nothing at all; the most common thing that happens
Trust boundary
Which lifeline belongs to an office you don't control, and what have they promised in writing?
->> (solid arrow, filled head)
A request the sender waits on (synchronous)
-->> (dashed arrow)
A return message, not a new request
--) (dashed, open head)
Fire and forget: nobody waits, and nobody notices if it fails
alt / else
Mutually exclusive paths (used to model failure)
opt
Something that may not happen
loop
Repeats, e.g., retry up to 3 attempts, 2 s apart
The three branches of the eligibility alt fragment
1) Answer within 3 s with both fields: continue. 2) No answer or error: unverified, supervisor. 3) Answer with a field missing: unverified, NOT "no hold."
"A missing field is not a no"
A reply missing a field must be treated as unverified; reading it as "no hold" lends equipment to a student with a hold
Interface
The promise: an agreement about what one system asks and the other does; exists even if unwritten (analysis)
API
One machine-callable way to keep the promise: address, method, request and reply shape (design)
Contract
The promise written down: fields, types, required, meaning, reply, speed, failure handling (the analyst's deliverable)
Six rows of an interface contract
Parties, Trigger, Request, Response, Timing, Failure
Five ways an external system fails (easiest to hardest to notice)
1) Down 2) Slow 3) Succeeds and does nothing 4) Answers twice / duplicates 5) Answers correctly and you misread it
"Succeeds and does nothing"
A reply arrives with a field missing, is read as success, and nobody is ever told
Four responses a contract can choose for a failure
1) Retry, bounded 2) Degrade, and say so 3) Queue and reconcile 4) Refuse, and tell someone the truth
Queue and reconcile
Accept now, deliver later, run a job comparing both sides; the only defense against failures 3 and 5
Option zero
Silence: nobody finds out about the failure. "Handle the error" is not an answer.
Seven consistency checks (M2 component 8)
ERD-domain, ERD-dictionary, interface-dictionary, workflow-data, stories-workflow, sequence-context, contract-assumptions
Sequence to context check
Every system in a sequence diagram must appear on the context diagram with a flow
Functional requirement
What the system does (e.g., "assign a driver"); fails loudly; usually a sprint to add
Nonfunctional requirement
How well and under what conditions; fails quietly; can't be bolted on, usually costs an architecture
Eight NFR categories
Security, privacy, performance, reliability/availability, accessibility, scalability, auditability, concurrency/failure
Security (question)
Who is allowed to see this, and how do you know they are who they claim?
Privacy (question)
Should this record exist at all, for how long, and for what stated purpose?
Performance (question)
How fast, at which percentile, under what load, measured from which event?
Reliability/availability (question)
What fraction of the service window does it work, and what happens while it doesn't?
Accessibility (question)
Who is excluded by this design, and what does the law require of a public university?
Scalability (question)
What happens to every number when demand multiplies on one night?
Auditability (question)
Afterwards, can you reconstruct the sequence from records nobody could edit?
Concurrency/failure (question)
What happens when two things happen at once, or one thing half-happens?
Five-part NFR pattern (on Test 2)
Quality attribute + measurement + threshold + condition + consequence of breach
Threshold with no consequence of breach
A target, not a requirement
The "tell" of a non-requirement
If two competent engineers can both claim they satisfied it and neither can be shown wrong, it's a hope, not a requirement
Two dispatchers, one driver
Concurrency failure: both assignments save and one ride is silently lost; a class diagram can't say "at most one active ride"
What an ERD can't show (privacy)
Retention: no notation for "this row is deleted after 90 days"
Three columns every data dictionary is missing (Week 11)
Sensitivity, owner, lifespan
Privacy vs auditability
The log that reconstructs an incident is the same log counsel can be compelled to produce
Security vs usability
Two-factor at 1 AM on a phone at 4%, for the person the service exists to protect
Availability vs cost
A second server runs all week to protect a few peak hours
Performance vs accuracy
A cached ETA is fast but wrong when a street is closed
Break sentence form (ICA 11)
"If X happens, then Y, and Z is harmed" (input, consequence, victim)
Six lens cards
Malicious User, Busy Night, Down Dependency, Curious Employee, Student With a Disability, Lawyer With a Subpoena
Given / When / Then
Given = precondition stated as fact; When = one trigger with a number; Then = outcome a stranger could observe
Untestable criterion
No number or observable event ("timely," "quickly"); two honest people could disagree whether it passed
Premature design criterion
Names a screen, channel, technology or data structure (e.g., "red banner push notification")
Wrong altitude criterion
Tests a component, not the business outcome (e.g., "service returns HTTP 200")
Missing the exception
Only the happy path has criteria; every process branch needs one
How many acceptance criteria
One for the happy path, one per named exception, one per binding NFR, one per business rule touched; usually 3-7
Five traceability links
Objective, requirement, model element, acceptance criterion, validation evidence
Widow requirement
Promised, but nothing models it (found reading left to right)
Orphan model element
Built, but nobody asked for it (found reading right to left)
Widow objective
An objective with no requirement under it
Ghost criterion
A criterion with no possible evidence (e.g., "students feel safer")
As-is / to-be context diagrams
Draw the context diagram as it is and as it will be, shading what's new (Wang 4.6.1); exposes deletions nobody decided on
"Are we done?" seven checks
Objectives covered, requirements furnished, models accounted for, exceptions criteria'd, stakeholders present, numbers sourced, open questions owned
Open questions list on Dec 4
Must NOT be empty; each needs an owner and a date
Finding severity levels
Blocker, Major, Minor, Question
Author's four legitimate answers to a finding
Accept, Accept with change, Reject with reason, Defer with date ("Noted" is not an answer)