Software Principles Glossary
DRY, KISS, YAGNI, Separation of Concerns, Composition over Inheritance, Principle of Least Astonishment — the guiding principles of software design.
Pages in this section
DRY — Explained with Examples
DRY (Don't Repeat Yourself) is a software principle that states every piece of knowledge must have a single, unambiguous, authoritative representation.
✓ LiveKISS — Explained with Examples
KISS (Keep It Simple, Stupid) is a design principle that favors simplicity over complexity, avoiding unnecessary sophistication in software systems.
✓ LiveYAGNI — Explained with Examples
YAGNI (You Aren't Gonna Need It) is an extreme programming principle that discourages adding functionality until it is actually needed.
✓ LiveWET — Explained with Examples
WET (Write Everything Twice) is an anti-pattern where code is duplicated across multiple locations, the opposite of the DRY principle.
✓ LiveSeparation of Concerns — Explained with Examples
Separation of Concerns (SoC) is a design principle that divides a program into distinct sections, each addressing a separate concern or responsibility.
✓ LiveComposition over Inheritance — Explained with Examples
Composition over Inheritance is a principle that favors assembling behavior from small, reusable components over inheriting functionality from parent classes.
✓ LiveFail Fast — Explained with Examples
Fail Fast is a design principle that advocates detecting and reporting errors immediately at the point of failure rather than allowing them to propagate.
✓ LivePrinciple of Least Astonishment — Explained with Examples
The Principle of Least Astonishment (POLA) states that a system should behave in ways that least surprise users, following predictable and intuitive conventions.
✓ LiveEncapsulation — Explained with Examples
Encapsulation is an object-oriented principle that bundles data and methods together while hiding internal implementation details from outside access.
✓ LivePrinciple of Least Privilege — Explained with Examples
The Principle of Least Privilege (PoLP) states that every component should operate with only the minimum access rights necessary to perform its function.
✓ LiveDefensive Programming — Explained with Examples
Defensive programming is a practice where code anticipates and handles potential errors, invalid inputs, and unexpected states at every boundary.
✓ LiveRobustness Principle — Explained with Examples
The Robustness Principle (Postel's Law) advises being conservative in what you send and liberal in what you accept from others.
✓ LiveConvention over Configuration — Explained with Examples
Convention over Configuration is a paradigm that reduces decision-making by providing sensible defaults while still allowing explicit overrides when needed.
✓ LiveLaw of Demeter — Explained with Examples
The Law of Demeter (principle of least knowledge) states that a module should only communicate with its immediate neighbors, not with strangers.
✓ Live