Clean Code: A Handbook of Agile Software Craftsmanship (Robert C. Martin Series)
Rate it:
Open Preview
3%
Flag icon
First, it is through practice in the small that professionals gain proficiency and trust for practice in the large.
4%
Flag icon
We abandon our code early, not because it is done, but because our value system focuses more on outward appearance than on the substance of what we deliver.
5%
Flag icon
We will never be rid of code, because code represents the details of the requirements. At some level those details cannot be ignored or abstracted; they have to be specified.
6%
Flag icon
But being able to recognize good art from bad does not mean that we know how to paint. So too being able to recognize clean code from dirty code does not mean that we know how to write clean code!
7%
Flag icon
The Boy Scout Rule
7%
Flag icon
Leave the campground cleaner than you found it.5
10%
Flag icon
When constructors are overloaded, use static factory methods with names that describe the arguments.
14%
Flag icon
More than three (polyadic) requires very special justification—and then shouldn’t be used anyway.
14%
Flag icon
When a function seems to need more than two or three arguments, it is likely that some of those arguments ought to be wrapped into a class of their own.
15%
Flag icon
Functions should either do something or answer something, but not both.
15%
Flag icon
When you return an error code, you create the problem that the caller must deal with the error immediately.
16%
Flag icon
Functions should do one thing. Error handing is one thing. Thus, a function that handles errors should do nothing else.
17%
Flag icon
The proper use of comments is to compensate for our failure to express ourself in code.
17%
Flag icon
that the only truly good comment is the comment you found a way not to write.
20%
Flag icon
Rather than venting in a worthless and noisy comment, the programmer should have recognized that his frustration could be resolved by improving the structure of his code.