Prerequisite Diagnostic
Attempt before the lessons. Do not use pattern names as answers. For each task, state an observation, a trace and one limitation.
b = afor a mutable list. Mutate b. Explain what a sees and how an outer-list copy differs from copying nested mutable values.- A function validates input, calls a dependency, then saves a result. The dependency raises. Which effects have happened and which have not?
- Two implementations have the same return values but one calls a clock twice. Describe a caller/test that distinguishes them.
- A four-state model has four event kinds. How many state/event cells need a declared outcome? Why is testing each cell insufficient for arbitrary histories?
- A test imports the implementation's expected-value table. Give a defect both could share and propose an independent oracle.
Feedback and repair
- Both names refer to one list. A shallow copy separates its membership but shares contained objects. Repair with S3M1 ownership/alias exercises.
- Validation has completed and the dependency may have partially acted; the later save is skipped. A raised exception is not proof of no effect. Repair with S3M2 failure and uncertain-write traces.
- A fake clock returns different values and records count/order. Repair with S3M2 observation boundaries and extraction exercises.
- Sixteen cells. Stored history, guard data and stale callbacks can distinguish sequences reaching the same label. Repair with finite-state modeling from earlier algorithm work; no prior State pattern knowledge required.
- A wrong table cell agrees with itself. Derive expected behavior from a separately stated matrix or small enumeration. Repair with S3M2 oracle practice.
All five skills are needed. Repair each weak skill, then explain a fresh example without this page. Prior experience can shorten repair time; no aggregate score hides a missing prerequisite. Record assistance separately from independent work.