Get Thinking
A detailed discussion of these questions can be found in the "Appendix A" section on page 480.
Mull It Over
Grouping related code will make its relationships clear. How can we perform this grouping? Which methods document the relationships most strongly?
We should avoid using magic numbers in our code. Is zero a magic number? What should you call a constant value representing zero?
Self-documenting code makes good use of context to convey information. Show how you do this, and give an example of how a particular name would lead to a different interpretation in different functions?
Is it realistic to expect a newcomer to pick up some self-documenting code and understand it totally?
If code is truly self-documenting, how much other documentation ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access