DEV Community

Cover image for 4 Theories For Clean Code
Ridwan
Ridwan

Posted on

4 1

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.

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay