Glossary

DRY, KISS, YAGNI

Three principles of simple, maintainable code that are often violated together and fixed together.

DRY — Don't Repeat Yourself

Every piece of knowledge must have a single, unambiguous representation in the system. Duplicated code means a change must be made in multiple places — and one will inevitably be missed. DRY is about knowledge, not just text: copy-paste is bad, but a shared function for two different concepts is bad too.

KISS — Keep It Simple, Stupid

The simplest solution that solves the problem is the best one. Complex code is hard to read, test, and maintain. Complexity is the enemy.

YAGNI — You Aren't Gonna Need It

Do not implement functionality until it is genuinely needed. Code written "just in case" goes stale, clutters the codebase, and is often never used. Write for today's requirements.