Module 2: Architecture Patterns & Modular Monoliths: 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 Style Selection Lab with only a final answer | Style Selection 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 Modular Monolith Boundaries Workshop with only a final answer | Modular Monolith Boundaries 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 Microservices Decomposition Clinic with only a final answer | Microservices Decomposition 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 Architecture Pattern Katas with only a final answer | Architecture Pattern 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 Layered Architecture: The Default, Its Pros and Sinkholes as vocabulary instead of a tool | Layered Architecture: The Default, Its Pros and Sinkholes | The explanation names the concept but cannot decide between two cases. | Write one example, one non-example, and the rule that separates them. |
| Treating Pipeline Architecture: Pipe-and-Filter for Data Transforms as vocabulary instead of a tool | Pipeline Architecture: Pipe-and-Filter for Data Transforms | 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.
Style Selection Lab
Source: practice/01-style-selection-lab.md
For each statement, identify the error in 2 sentences:
- "We are modernizing the stack, so we are moving to microservices."
- "Our monolith is slow. We will split it into services to make it faster."
- "We can share the database across our microservices to keep things simple."
- "We use Kafka, so our architecture is event-driven."
- "Each service has one REST endpoint. We are very granular."
- "We started with microservices because we will need them eventually."
Modular Monolith Boundaries Workshop
Source: practice/02-modular-monolith-boundaries-workshop.md
Identify the issue in each code/structure fragment (2-3 sentences each):
- A package named
shared.utilswith 23 files and Ca = 18, Ce = 12. - A Java service class
CheckoutServicewith methodscreate_order,send_marketing_email,export_for_audit,lookup_gdpr_consent. - A Python codebase where
checkout/domain/pricing.pyimportscatalog.persistence.product_repo. - A Ruby Packwerk config with
enforce_dependencies: falsefor a package that imports 9 others. - An ArchUnit rule that checks nothing because the
should().onlyDependOnClassesThat()clause is missing. - A "modular monolith" whose CI has no architecture test; boundaries are documented in a wiki page only.
Microservices Decomposition Clinic
Source: practice/03-microservices-decomposition-clinic.md
For each scenario, identify the anti-pattern in 2-3 sentences and prescribe the fix:
- "Our 12 microservices each have their own schema, but they all live in the same Postgres cluster and freely join across schemas in reports."
- "Every deploy to the order-service requires a coordinated deploy to the customer-service and the billing-service."
- "A request to view a single order touches 9 services."
- "We have 40 services; each one exposes 1-2 endpoints."
- "Our observability story is 'we tail logs from 18 hosts in tmux.'"
- "We extracted 6 services but have no platform team. The CI pipelines were copy-pasted from the monolith."
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.