DEV Community

Cover image for 4 Theories For Clean Code
Ridwan
Ridwan

Posted on

4 Theories For Clean Code

KISS:

Keep It Simple & Stupid: Make your code simple and avoid from complexity

DRY:

Don’t Repeat Yourself : Always avoid boilerplate code.

DIE:

Duplication Is Evil : Every piece of knowledge must have a single representation.

YAGNI:

You Ain’t Gonna Need It : Create code only when its needed, never when you foresee you will need them

Top comments (1)

Collapse
 
fricardi profile image
FRicardi

YAGNI is a big deal most people does not care about in real life, unfortunately. sometimes i see teams trying to create huge structures that are never to be touched again. a well documented software must offer no resistance for that extension to be added later on, remembering the open closed principle.