Johnder Perez

Step 3 of 6

SOLID and design patterns, in plain English


S: each module does one job. O: add features by adding code, not by editing working code everywhere. L: a substitute should behave like the original. I: don't force code to depend on things it doesn't use. D: depend on simple interfaces, not specific vendors. Patterns (adapter, strategy, factory) are named, reusable solutions to common shapes of problems.

Why it matters when you build with AI: 'Depend on interfaces' is what lets you swap Stripe for another payment provider, or Supabase for another database, without rewriting your app.

Quick check

Which principle lets you swap Stripe for another provider easily?

← Previous step Next: Code smells and technical debt →