More on this book
Community
Kindle Notes & Highlights
by
Metz Sandi
Read between
July 9, 2019 - August 9, 2022
This book is about designing object-oriented software, and how it views the world as a series of spontaneous interactions between objects.
Your job is one of synthesis; you must combine an overall understanding of your application’s requirements with knowledge of the costs and benefits of design alternatives and then devise an arrangement of code that is cost effective in the present and will continue to be so in the future.
Another way to home in on what a class is actually doing is to attempt to describe it in one sentence. Remember that a class should do the smallest possible useful thing. That thing ought to be simple to describe. If the simplest description you can devise uses the word “and,” the class likely has more than one responsibility. If it uses the word “or,” then the class has more than one responsibility and they aren’t even very related.
“What is the future cost of doing nothing today?”
When the future cost of doing nothing is the same as the current cost, postpone the decision. Make the decision only when you must with the information you have at that time.
Because comments are not executable, they are merely a form of decaying documentation.

