Module 4: Structural & Creational Patterns: Mistake Clinic
This clinic turns wrong moves into reusable judgment. Use it after each practice page and again before the quiz or checkpoint.
Module-Specific Mistake Radar
Start with these traps. Replace or extend them with real mistakes from your own work.
| Mistake to look for | Where it shows up | Symptom | Repair evidence |
|---|---|---|---|
| Finishing Creational Patterns Lab with only a final answer | Creational Patterns Lab | The work has no failed case, trace, test, proof gap, or design stress point. | Add the smallest broken example and show the repair that changes the result. |
| Finishing Interface Bridging Workshop with only a final answer | Interface Bridging Workshop | The work has no failed case, trace, test, proof gap, or design stress point. | Add the smallest broken example and show the repair that changes the result. |
| Finishing Composition and DI Clinic with only a final answer | Composition and DI Clinic | The work has no failed case, trace, test, proof gap, or design stress point. | Add the smallest broken example and show the repair that changes the result. |
| Finishing Code Katas with only a final answer | Code Katas | The work has no failed case, trace, test, proof gap, or design stress point. | Add the smallest broken example and show the repair that changes the result. |
| Treating Factory Method as vocabulary instead of a tool | Factory Method | The explanation names the concept but cannot decide between two cases. | Write one example, one non-example, and the rule that separates them. |
| Treating Abstract Factory as vocabulary instead of a tool | Abstract Factory | The explanation names the concept but cannot decide between two cases. | Write one example, one non-example, and the rule that separates them. |
Practice Mistake Checks
Pull any miss from these checks into your mistake log.
Creational Patterns Lab
Source: practice/01-creational-patterns-lab.md
For each statement, identify the error:
- "We have a class with one concrete subclass, so we introduced a Factory Method to stay flexible."
- "Our
Configis a Singleton because we only ever have one configuration per run." - "Our
OrderBuildervalidates each field as it is set." - "An Abstract Factory is just a Factory Method with more methods."
- "Prototype means
deepCopy()."
Interface Bridging Workshop
Source: practice/02-interface-bridging-workshop.md
For each statement, identify the error:
- "We wrapped the Stripe SDK in an Adapter that also handles the business rule for failed charges."
- "Our Facade hides the subsystem so no one can use it directly."
- "We added a Bridge because we expect a second renderer someday."
- "Since the Adapter wraps the adaptee, it's the same as a Decorator."
- "This class implements both the target and the adaptee interface, so it's a clean object adapter."
Composition and DI Clinic
Source: practice/03-composition-and-di-clinic.md
For each statement, identify the error:
- "We use a Decorator to translate our HTTP response into domain objects."
- "This class is a Proxy because it just forwards calls to another object."
- "Our
OrderServicelooks up itsPaymentGatewayfrom a service locator so we can swap it in tests." - "Constructor injection is too verbose, so we made all dependencies public fields and set them after construction."
- "Our composition root is a class that every service imports."
Repair Protocol
For each real mistake:
- Reproduce the failure on the smallest example, trace, proof, query, command, or design sketch.
- Name the hidden assumption.
- Repair the artifact.
- Save evidence that changed: failing then passing test, corrected proof step, revised diagram, safer command, benchmark, or review note.
- Add one retrieval card beginning with Check... before... or Do not use... when....
Mistake Log
| Date | Mistake | Symptom | Root cause | Repair evidence | Retrieval card |
|---|---|---|---|---|---|
| Starter | Pick one radar row above | Explain how it would fail in this module | Name the assumption | Add a counterexample or corrected artifact | Write the card before closing the page |
Completion Standard
- At least five real mistakes are logged.
- At least two mistakes include a counterexample or failing test.
- At least one mistake connects to an older semester skill.
- At least one correction changes code, a proof, a diagram, a command transcript, a query, or a design decision.