Roadmap › SOLID Principles with Examples › Module: Related Principles
Lessons in this course (8)
7. DRY, KISS, YAGNI and separation of concerns
BasicMediumLesson 7 of 8
- DRY — Don't Repeat Yourself: every piece of knowledge has one authoritative place. (Duplicate-looking code that changes for different reasons is not a DRY violation.)
- KISS — Keep It Simple: the simplest design that works is easiest to maintain.
- YAGNI — You Aren't Gonna Need It: don't build for hypothetical future requirements.
- Separation of Concerns: UI, business logic and data access in separate layers.
- Composition over inheritance, Law of Demeter, Tell don't ask.
Interview tip: show balance. "I apply SOLID where change is likely — payment providers, export formats. For a 20-line admin script I keep it simple (KISS/YAGNI)."