Caffeinated Coder
Book an appointment
Lesson 31 · Designing code

Design patterns

Some design problems come up again and again: swap one algorithm for another, tell many parts of a program that something changed, create an object without hard-coding its class, or make two pieces of code fit that were not written for each other. Design patterns are the named, reusable answers. Watch four of them, Strategy, Observer, Factory and Adapter, each on its own board with a short Python example, and see what each one keeps apart.

12 min8 steps5 questionsIntermediate
Fig 31 · Interactive
Loading figure…
or ← →

Quiz Unlocks after the last step.