Prerequisite Diagnostic
Attempt before the pattern lessons. This checks programming, ownership and contracts already taught in Modules 1–3; it does not require knowing this module's pattern names.
- A function accepts a callback that returns a price. Show how a fake callback records the number of calls. What would two invocations change if the callback had an external effect?
- Two variables refer to the same list. Predict both observations after appending through one name. Then explain a shallow dictionary copy containing that list.
- A constructor opens two resources; the second acquisition raises an exception. Identify what exists and who must release it. A cleanup plan is not an executed cleanup.
- A test asserts only the final total. Explain which ordering, ownership or exception defects could still escape it.
- A command is rejected before any state change. Explain why previously valid undo/redo state should remain intact under the earlier editor contract.
Record independent / with help / needs repair per item. Repair callback contracts in Module 1, characterization tests in Module 2, and lifecycle/history in Module 3. Use one new example after repair. Do not restart a whole earlier module because you cannot name Adapter or Builder yet. Diagnostic calibration is for after the attempt.