6 Clean code rules. (Start these now):
1 Separation of Concerns (SOC):
☑ Break down a complex program into smaller units. ☑ Each unit should focus on a specific task.
===
2 Document Your Code (DYC):
☑ Write code for your future self and others. ☑ Explain complex code sections with comments and documentation.
===
3 Don't Repeat Yourself (DRY):
☑ Don't waste time writing the same code again. ☑ Instead use functions, modules, and existing libraries.
===
4 Keep It Simple, Stupid (KISS):
☑ Simple is hard, but better. ☑ Readable code > clever code.
===
5 Test Driven Development (TDD):
☑ Write a failing test first. ☑ Write code to make the test pass. ☑ Then clean up the code without changing behaviour.
===
6 You Ain't Gonna Need It (YAGNI):
☑ Build only essential features. ☑ Don't build features you think you might need later.
===
The bottom line: ☑ Leave the codebase cleaner than you found it.