Skip to content
Software Principles Glossary

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.

✓ Live

KISS — Explained with Examples

KISS (Keep It Simple, Stupid) is a design principle that favors simplicity over complexity, avoiding unnecessary sophistication in software systems.

✓ Live

YAGNI — Explained with Examples

YAGNI (You Aren't Gonna Need It) is an extreme programming principle that discourages adding functionality until it is actually needed.

✓ Live

WET — Explained with Examples

WET (Write Everything Twice) is an anti-pattern where code is duplicated across multiple locations, the opposite of the DRY principle.

✓ Live

Separation 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.

✓ Live

Composition 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.

✓ Live

Fail 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.

✓ Live

Principle 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.

✓ Live

Encapsulation — Explained with Examples

Encapsulation is an object-oriented principle that bundles data and methods together while hiding internal implementation details from outside access.

✓ Live

Principle 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.

✓ Live

Defensive Programming — Explained with Examples

Defensive programming is a practice where code anticipates and handles potential errors, invalid inputs, and unexpected states at every boundary.

✓ Live

Robustness 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.

✓ Live

Convention 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.

✓ Live

Law 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