Single Responsibility
Domain: Design Principles
π― Motivation
Every class or function should have one reason to change. When code does too many things, fixing one bug can break something unrelated, making maintenance risky and confusing.
π Concrete Example
A User class that also sends emails violates this principle. Split it into User for data and EmailService for sending, so each can evolve independently.
π Analogy
Like a Swiss army knife with 30 tools β it is hard to use any single tool well. A dedicated chefβs knife cuts better because it is designed for one purpose.