Design Patterns Tutorial 0/70 lessons ~6 min read Lesson 65

    Pattern Vocabulary Cheat Sheet

    Pattern vocabulary cheat sheet — print, fold, review before senior interviews.

    Course progress0%
    Focus
    21 guided sections
    Practice signal
    Examples included
    Career prep
    Interview Q&A included

    Introduction

    Pattern vocabulary cheat sheet — print, fold, review before senior interviews. Each entry: name → intent → smell → production example. No UML, no boilerplate — only vocabulary that compounds in design meetings.

    The story

    Candidate kept 1-page cheat sheet pinned 6 months. Five minutes before every design meeting. At promotion review she was the "what should we call this?" engineer. Vocabulary compounds.

    The business problem

    Teams without shared vocabulary debate implementation instead of intent:

    • Duplicate abstractions: same pattern, different names per team.
    • Review friction: can't discuss trade-offs without shared terms.
    • Interview gap: recognize pattern in code but can't name it.
    • ADR quality: "added interface" vs "Repository at persistence seam."

    The problem teams faced

    Cheat sheet covers:

    • GoF creational, structural, behavioral — intent + smell each.
    • Enterprise patterns — Saga, Outbox, CQRS, Gateway, BFF, Strangler.
    • Meta — when NOT to use; refactoring to patterns.
    • Quick composition refs — checkout, notifications, payments.

    Understanding the topic

    Intent: Fast recall of pattern vocabulary for interviews and reviews.

    • Intent — one sentence what it solves.
    • Smell — what triggers considering it.
    • Example — one production anchor.
    • Skip when — one-line when-not.

    Internal architecture

    Sample cheat sheet entries:

    text
    Strategy | Swappable algorithms | Long switch on type | Shipping modes
    Repository | Persistence seam | SQL in domain | OrderRepo port
    Saga | Distributed transaction | Multi-service workflow | Checkout place order
    Outbox | Reliable event publish | Dual-write failure | OrderPlaced → Kafka
    Circuit Brkr | Stop calling dead dependency| Cascade timeout | Payment API
    Adapter | Foreign interface wrapper | Legacy SDK vocabulary | SOAP payment
    When NOT | Skip if 1 impl, prototype | Hypothetical variant | YAGNI / Rule of Three

    Visual explanation

    Three diagrams organize vocabulary by category and composition:

    Creational quick map
    Singleton
    One instance
    Factory Method
    Subclass creates
    Abstract Factory
    Product family
    Builder
    Many optional fields
    Smell: creation complexity or variation at birth.
    Behavioral quick map
    Strategy
    Swappable algorithm
    Observer
    Notify on change
    Command
    Action + undo
    State
    Behavior ∝ state
    Smell: collaboration or algorithm variation at runtime.
    Enterprise quick map
    Saga
    Distributed workflow
    Outbox
    Reliable publish
    Circuit Breaker
    Fail fast
    Strangler
    Legacy migrate
    Smell: distributed failure, legacy, or scale forces.

    Informative example

    Recite drill — Observer:

    text
    NAME: Observer (behavioral)
    INTENT: Notify dependents when subject state changes
    SMELL: "When X happens, also update A, B, C" scattered in code
    EXAMPLE: OrderPlaced → email + inventory + analytics (in-process)
    SKIP: Cross-service sync coupling — use Outbox + async bus instead
    STORY: Notification rebuild — 47 if-branches → Observer + Strategy

    Execution workflow

    1Cheat sheet usage
    1 / 4

    Print one page

    Front: GoF. Back: enterprise.

    Fold into notebook.

    Real-world use

    Staff engineers' printed reference cards; team pattern glossaries in Confluence; ADR templates with pattern name field.

    Production case study

    6-month cheat sheet habit:

    • Practice: 5 min before every design meeting.
    • Outcome: team consultant for pattern naming at promotion review.
    • Lesson: vocabulary compounds — not cramming.

    Trade-offs

    • Pro: fast recall; shared team language; interview confidence.
    • Con: cheat sheet ≠ deep understanding — pair with stories.

    Decision framework

    • Smell → name → confirm force → apply or skip.
    • If can't name smell, probably don't need pattern yet.

    Best practices

    • Handwrite your production example on printed sheet.
    • Include "when NOT" row for top 10 patterns.
    • Update sheet when you remove a pattern — deletion entries.

    Anti-patterns to avoid

    • Cramming night before without stories — hollow recall.
    • Using cheat sheet terms without knowing trade-offs.

    Common mistakes

    • Confusing similar patterns — Decorator vs Proxy vs Adapter.

    Debugging tips

    • Decorator adds behavior; Adapter changes interface; Proxy controls access.

    Optimization strategies

    • 10 patterns you know deeply > 40 patterns shallowly.

    Common misconceptions

    • Cheat sheet ≠ silver bullet — vocabulary enables judgment conversations.
    • Enterprise patterns are interview vocabulary too — not just GoF.

    Advanced interview questions

    Interview Prep

    Practice concise answers, then expand each card for the explanation.

    3 questions
    1IntermediateQuestionQuick: Strategy vs State?+

    Answer

    Strategy: external algorithm choice, usually stable during operation. State: internal state drives behavior and guarded transitions.

    Follow-up

    Smell for each?
    2IntermediateQuestionQuick: Saga vs 2PC?+

    Answer

    Saga: eventual consistency, compensations, microservices. 2PC: strong consistency, blocking, poor cross-service scale.

    Follow-up

    Outbox?
    3IntermediateQuestionQuick: Adapter vs Facade?+

    Answer

    Adapter: translate one foreign interface to expected port. Facade: simplify many interfaces into one easier API.

    Follow-up

    Legacy ERP?

    Summary

    You have a one-page mental model for fast pattern recall. Print the sheet, add your stories, review before interviews — you own Pattern Vocabulary and Interview Mastery.

    Ready to mark this lesson complete?Track your journey across the entire course.