If you want to write clean code, learn these 6 rules:
Separation of Concerns (SOC)
=> Break down a complex program into smaller units.Document Your Code (DYC)
=> Write code for your future self and others.Don't Repeat Yourself (DRY)
=> Don't waste time writing the same code again.Keep It Simple, Stupid (KISS)
=> Simple is hard, but better.Test Driven Development (TDD)
=> Write a failing test first and code to make the test pass.You Ain't Gonna Need It (YAGNI)
=> Build only essential features.
Top comments (0)