Skip to main content

Module 5: Applied Design & Code Review: 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 forWhere it shows upSymptomRepair evidence
Finishing Pattern Integration Lab with only a final answerPattern Integration LabThe 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 Review Workshop with only a final answerCode Review WorkshopThe 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 Design Documentation Clinic with only a final answerDesign Documentation ClinicThe 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 answerCode KatasThe 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 Choosing Patterns as a Response to Design Pressure as vocabulary instead of a toolChoosing Patterns as a Response to Design PressureThe explanation names the concept but cannot decide between two cases.Write one example, one non-example, and the rule that separates them.
Treating Combining Patterns: Decorator + Strategy + Factory in One Feature as vocabulary instead of a toolCombining Patterns: Decorator + Strategy + Factory in One FeatureThe 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.

Pattern Integration Lab

Source: practice/01-pattern-integration-lab.md

Identify the error in each:

  1. "I added a DiscountStrategy interface even though there is only one discount type today, because you might add more later."
  2. "Logging is hand-written in each of the three strategies; the code is identical, but it's faster to copy."
  3. "The factory does a switch on storefront inside PricingEngine.price() instead of in a dedicated class."
  4. "The caching decorator has its own copy of compute_total rather than delegating to the inner strategy."

Design Documentation Clinic

Source: practice/03-design-documentation-clinic.md

Identify the error in each:

  1. An ADR with a "Context" section that reads like a sales pitch for the chosen option.
  2. A design doc with no "Non-Goals" section.
  3. A sequence diagram showing only the happy path.
  4. A design doc and an ADR that disagree about the same decision.
  5. "Alternatives Considered: None." (in an ADR where there are obviously multiple options)

Repair Protocol

For each real mistake:

  1. Reproduce the failure on the smallest example, trace, proof, query, command, or design sketch.
  2. Name the hidden assumption.
  3. Repair the artifact.
  4. Save evidence that changed: failing then passing test, corrected proof step, revised diagram, safer command, benchmark, or review note.
  5. Add one retrieval card beginning with Check... before... or Do not use... when....

Mistake Log

DateMistakeSymptomRoot causeRepair evidenceRetrieval card
StarterPick one radar row aboveExplain how it would fail in this moduleName the assumptionAdd a counterexample or corrected artifactWrite 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.