OOD Mistake Clinic
Module-Specific Mistake Radar
| Mistake | Discriminating evidence | Repair |
|---|---|---|
| Private field means stable history | Mutate a retained nested element | Specify ownership and element immutability |
| Same signatures prove substitution | Rejected withdrawal changes state | Shared state-machine contract and public trace |
| Every large function needs splitting | A coherent pure kernel and its invariant | Compare comprehension and boundary cost |
| An interface needs two production providers | One real clock plus deterministic testing | Name present benefit and carrying cost |
| Fewer comments is better | Missing units or failure contract after deletion | Preserve useful API documentation |
| Renaming cannot break behavior | Reflective client or persisted key | Compatibility inventory and migration |
| Cleaner extraction preserves behavior | Iterator exhaustion or late failure | Trace effects before and after |
| Repeated field access proves Feature Envy | An intentional serializer | Identify policy ownership before moving code |
| Wrapping a primitive guarantees validity | NaN, Boolean amount or mismatched currency | Explicit construction and operation validation |
Practice Mistake Checks
Use P02 for aliases, P04 for actual parent contracts, P08 for output order, P10 for published compatibility, P14 for one-provider seams and P19 for failure boundaries. Record a real failure or uncertainty, the hidden assumption, repair and changed-case check. Do not invent a mistake quota. The practice feedback follows an independent attempt.