O'Reilly logo

Code Craft by Pete Goodliffe

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Get Thinking

A detailed discussion of these questions can be found in the "Appendix A" section on page 480.

Mull It Over

  1. Grouping related code will make its relationships clear. How can we perform this grouping? Which methods document the relationships most strongly?

  2. We should avoid using magic numbers in our code. Is zero a magic number? What should you call a constant value representing zero?

  3. 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?

  4. Is it realistic to expect a newcomer to pick up some self-documenting code and understand it totally?

  5. If code is truly self-documenting, how much other documentation ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required