Back to Basics: Design Patterns
summary
Fixes a screensaver bug by replacing hardcoded spawn bounds (300×300) with a singleton configuration manager implemented via a C++11 static-local instance so one source of window width/height exists; wraps a third‑party Text class with an object adapter that forces uppercase green text without changing the original library; replaces fixed for loops (100 pushes) with STL-style iterators and scales to 1,000 circles rendered with SFML. Notes thread‑safety and copy‑semantics caveats and tradeoffs for each pattern.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 2:22Running Example
- 3:16Bug Hunting
- 7:26Design Patterns
- 12:11Singleton Pattern
- 18:50Pros and Cons
- 27:34Structural Patterns
- 30:33Adapter Patterns
- 33:41Pros Cons of Adapter Patterns
- 38:02Behavioral Patterns
- 38:40Iterator Pattern
- 39:59Iterator Pattern Example
- 43:37Pros Cons
- 45:02Summary
- 46:04UML
related talks
56mIdentifying Common Code Smells
50mReusable C++ Code, Reusable C++ Data Structures
01h 20mBetter Code: Relationships
01h 07mDesign Patterns in Modern C++
01h 40mDesign Patterns: Examples in C++
01h 05mAbstraction Patterns: Making Code Reliably Better Without Deep Understanding
51mKeynote: There Is No Silver Bullet to Solve All C++ Software Problems
55mIdentifying Common Code Smells (In C++)
