A few days ago I started reading Robert C. Martin's Clean Code book. According to several reviews at Amazon, it's a must-read for any software developer, and I'll have to agree on that, even though I've only reached 1/10th of the book so far.
Before going into the details of how clean code should look or what we programmers should do to write clean code, the author starts by sharing the answer of some well-known and highly experienced programmers to the question "What is clean code?". It's interesting how their individual insights connect together to get a very complete description of what clean code is. Here are some highlights of their thoughts:
- Bjarne Stroustrup: “Clean code does one thing well.”
- Grady Booch: "Clean code reads like well-written prose."
- “Big” Dave Thomas: "Clean code can be read, and enhanced by a developer other than its original author."
- Michael Feathers: "Clean code always looks like it was written by someone who cares."
- Ron Jeffries: "I focus mostly on duplication. When the same thing is done over and over, it’s a sign that there is an idea in our mind that is not well represented in the code."
- Ward Cunningham: "You know you are working: on clean code when each routine you read turns out to be pretty much what you expected."
All of the above are excerpts From: Martin, Robert C. “The Robert C. Martin Clean Code Collection.
These points are very self-explicative and give us an idea of what we should try to achieve when writing code.