Pattern Design Cheat Sheet 2026

The 30 highest-yield Pattern Design facts, distilled from real exam questions. Print it, save it as a PDF, or study it here — free, no sign-up.

  1. The Factory Method pattern delegates object creation to: Subclasses
  2. The 'Spaghetti Code' anti-pattern results from: Lack of structure, excessive control flow jumps, and unclear responsibilities
  3. The Composite pattern is most useful for representing: Tree-structured hierarchies of objects
  4. The 'Poltergeist' anti-pattern describes classes that: Have very limited roles and are instantiated only to invoke methods on another class
  5. A behavioral object-level pattern is the ___ pattern. Strategy
  6. The Builder pattern is most useful when: An object requires many optional parameters to construct
  7. Extract Method refactoring is applied when: A code fragment can be grouped and named as its own method
  8. The Decorator pattern differs from inheritance because it: Adds behavior dynamically at runtime
  9. In Abstract Factory, adding a new product variant requires: Adding a new method to all factory interfaces and concrete factories
  10. In concurrent programming, what is a Future (also called a Promise)? A placeholder object representing a result that will be available asynchronously
  11. Establishes an interface for object creation but leaves it up to the subclasses to choose the class to instantiate. It let subclasses' instantiations to vary. Factory Method
  12. Facade pattern differs from Adapter in that Facade: Simplifies an interface rather than converting one interface to another
  13. Lazy initialization in the Singleton pattern means: The instance is created only when first requested
  14. What problem does the Singleton pattern primarily solve? Uncontrolled instantiation of a class
  15. A virtual proxy is used to: Delay creation of an expensive object until it is actually needed
  16. In the Mediator pattern, a potential drawback is: The mediator can become a God object that is too complex
  17. The 'Feature Envy' code smell describes a method that: Seems more interested in the data of another class than its own
  18. The Decorator pattern must implement the same interface as the component it decorates because: Clients must be able to use decorated and undecorated objects interchangeably
  19. Which pattern uses a shared queue to pass work items between threads that produce data and threads that consume it? Producer-Consumer
  20. Technical debt most commonly accumulates from: Deliberate shortcuts taken to meet deadlines that are never paid back
  21. The Backend for Frontend (BFF) pattern creates: A dedicated API layer tailored for each specific frontend client
  22. The Unit of Work pattern tracks: All changes to objects during a business transaction and writes them in one batch
  23. Dynamically assign extra responsibilities to an object. It offers a versatile substitute for subclassing when it comes to extending functionality. Decorator
  24. When should you prefer the Bridge pattern over simple inheritance? When both abstraction and implementation need to be extensible independently
  25. The 'Golden Hammer' anti-pattern occurs when: A familiar solution is applied to every problem regardless of fit
  26. Which technique used in concurrent data structures divides the structure into independent segments, each guarded by its own lock, to reduce contention? Lock Striping
  27. The 'Dead Code' anti-pattern refers to: Code that is never executed because it is unreachable
  28. The Builder pattern's fluent interface style allows: Chaining method calls for readable object construction
  29. In a Composite pattern, the Component interface typically defines: Operations common to both leaf and composite objects
  30. The Strangler Fig pattern is used in software architecture to: Incrementally replace a legacy system by routing traffic to new code