Member-only story
A Short Summary On Clean Coding Best Practices
Becoming A Clean Coder
This blog post summarizes the guidelines and best practices for writing high-quality code (a.k.a. Clean Code). These pieces of advice are highly inspired by the book, Clean Code (by Robert C. Martin) and other popular industry practices among software engineers. Hope you will find these guidelines useful in your journey as well.
“Clean code is code that is written by someone who cares”
- Michael Feathers
Clean Code...
> is elegant and efficient
> is simple and direct
> has meaningful names and is self-documenting
> is pleasing to read, and reads like well-written prose
> does one thing well
> does not tempt the developer to write bad code - on the flip side, when others change bad code, they tend to make it worse
> never hides the designer's intent but is rather full of crisp abstractions and straightforward lines of control
> is when each method you read turns out to be pretty much what you expected (Least Astonishment Principle)
> can be read, and enhanced by a developer other than its original author
> has unit and acceptance tests
> is minimal (KISS and YAGNI)
> does not repeat itself (DRY Principle)