# 6 Timeless Rules for Writing Clean Code > If you want your code to stay readable, scalable, and maintainable, follow these six principles: **Published by:** [C O M P Ξ Z](https://paragraph.com/@compez.eth/) **Published on:** 2025-09-08 **URL:** https://paragraph.com/@compez.eth/6-timeless-rules-for-writing-clean-code ## Content 1) Separation of Concerns (SOC)Divide your program into small, independent parts.Each part should do one thing well.2) Document Your Code (DYC)Write as if your future self (or another developer) will thank you.Add clear comments and documentation for complex logic.3) Don’t Repeat Yourself (DRY)Avoid duplicating code.Reuse functions, modules, and libraries whenever possible.4) Keep It Simple, Stupid (KISS)Simple > Clever.Readability always beats over-engineered solutions.5) Test Driven Development (TDD)Write a failing test first.Implement the code to pass the test.Refactor without changing behavior. 6) You Ain’t Gonna Need It (YAGNI)Don’t build features you “might” need someday.Focus on what’s essential today.🚀 Clean code isn’t just about elegance — it’s about building software that lasts. ## Publication Information - [C O M P Ξ Z](https://paragraph.com/@compez.eth/): Publication homepage - [All Posts](https://paragraph.com/@compez.eth/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@compez.eth): Subscribe to updates