More on this book
Community
Kindle Notes & Highlights
Started reading
January 31, 2017
There are two parts to learning craftsmanship: knowledge and work.
But the fault, dear Dilbert, is not in our stars, but in ourselves. We are unprofessional.
Leave the campground cleaner than you found it.5
The name of a variable, function, or class, should answer all the big questions. It should tell you why it exists, what it does, and how it is used. If a name requires a comment, then the name does not reveal its intent.
If the container holding the accounts is not actually a List, it may lead to false conclusions.1 So accountGroup or bunchOfAccounts or just plain accounts would be better.
A truly awful example of disinformative names would be the use of lower-case L or uppercase O as variable names, especially in combination.
that clarity is king.
A class name should not be a verb.
When constructors are overloaded, use static factory methods with names that describe the arguments.
Modern editing environments like Eclipse and IntelliJ provide context-sensitive clues,
Likewise, it’s confusing to have a controller and a manager and a driver in the same code base.
The first rule of functions is that they should be small. The second rule of functions is that they should be smaller than that.