notes blog about

Separate what changes from what stays the same

  1. identify the parts that vary
  2. encapsulate them
  3. later you can change the parts that vary without affecting those that don’t

This is a simple concept but it forms the basis for almost every design pattern. All patterns provide a way to let some parts of the system vary independently of all other parts.

Program to an interface, not an implementation

Source: Head First Design Patterns (2020)