Yet most of the advice presented in this book also applies to small projects. It is typical for a person to start with a small project and then begin to take on larger and more challenging enterprises. Often the scope of a particular project will expand, and what starts out as a small project becomes a major undertaking. The immediate consequences of disregarding good practice in a large project, however, are far more severe than they are for disregarding good practice in a smaller project. Make no mistake, this is an advanced text.
Most people learn by example.
In general, I have supplied examples that illustrate real-world designs. I have avoided examples that illustrate one point but have blatant errors in other aspects of the design. I have also tried to avoid examples that illustrate a detail of the language but serve no other useful purpose. Examples presented in earlier chapters are therefore consistent with all practices recommended throughout the book. A disadvantage of this approach is that you may see code that is written differently from the code you are used to seeing, without yet knowing exactly why.