intermediate
SOLID, DRY, KISS, YAGNI, and related principles
Use design principles as change-management heuristics for responsibilities, dependencies, duplication, simplicity, and coupling.
SOLID, DRY, KISS, YAGNI, and related principles are vocabulary for trade-offs—not badges to collect. Interviewers expect you to show when a principle helps change and when mechanical application creates overengineering.
Cover SOLID in depth, supporting principles (DRY, KISS, YAGNI, separation of concerns, Law of Demeter, cohesion/coupling), and practice skills (recognizing overengineering, explaining trade-offs, demonstrating principles in code, knowing when to break a rule).
On interviews: pick one principle and walk through a refactor or design decision it motivated, including what you chose not to do.
Common pitfalls: slogan answers, premature abstraction for hypothetical futures, and DRY that merges unrelated concepts.
Checklist:
- State the change pressure each principle addresses.
- Compare alternatives with costs, not labels.
- Show a small code example when asked.
- Admit when simplicity beats a principle.