Note
Kiss Principle
"Keep It Simple, Stupid"—is a design philosophy that emphasizes simplicity and clarity. It encourages avoiding unnecessary complexity and focusing on straightforward solutions that are easy to understand, maintain, and use. Originally popularized in engineering and software development, the principle reminds us that simple systems are often more reliable and efficient than overly intricate ones. By keeping things simple, we reduce the chance of errors and make our work more accessible to others.
Note
YAGNI Principle
You Aren’t Gonna Need It - Don’t implement something until it is necessary. Avoid overengineering.
Note
DRY Principle
Don’t Repeat Yourself - Every piece of knowledge or logic should have a single, unambiguous representation. Reduce duplication.
Note
SOLID Principle
S – Single Responsibility Principle
O – Open/Closed Principle
L – Liskov Substitution Principle
I – Interface Segregation Principle
D – Dependency Inversion Principle
Note
Principle of Least Astonishment
A system should behave in a way that least surprises the user. Consistency is key.
Note
Principle Separation of Concerns
Break a system into distinct sections, each handling a specific aspect or concern.
Note
Principle Occam's Razor
The simplest solution is often the best one—don't multiply complexity beyond necessity.
Note
Focus on solving problems
Code is just a tool. Solving the user or business problem is the real goal.
Note
Simplicity beats cleverness
Code should be simple to understand. Clever code often becomes technical debt.
Note
Don’t fear refactoring
Refactoring improves code quality and adaptability. It's not wasted time; it's investment.
Note
Ask questions early
Early clarification prevents wasted effort and ensures shared understanding.
Note
Write maintainable code
Pretend you'll revisit your code in 6 months. Clarity now saves time later.
Note
Avoid ego
Be humble. Ego blocks collaboration and growth.
Note
Prefer composition over inheritance
Composition leads to more flexible and testable designs.
Note
Design for change
Expect requirements to change. Architect systems that can adapt.
Encapsulate what varies:
Isolate volatile parts to reduce impact when things change.
Note
Comment the why
Focus comments on why something is done, not what is done.
Note
Handle errors explicitly
Always account for what can go wrong. Don’t ignore exceptions.
Note
Avoid globals
Global variables create hidden dependencies and make testing difficult.
Note
Follow conventions
Use community or project standards. Consistency improves readability.
Note
Avoid magic numbers
Use constants or enums instead. Magic numbers reduce clarity.
Note
Avoid premature optimization
Don’t optimize before profiling. Focus on clear code first.