Preface

 

Between learning how to program and learning about advanced design patterns and principles, there isn’t much educational material for object-oriented programmers. The recommended books are hard to read, and it often proves difficult to apply the theory to your everyday coding problems. Besides, most developers don’t have a lot of time to read a book. What’s left is a gap in programming education materials.

Even without reading books, you will grow as a programmer over time. You’ll learn how to make better design choices. You’ll collect a set of basic rules that you can pretty much always apply, freeing mental capacity to focus on other interesting areas of the code that need improving. So what can’t be learned from reading software books can, in fact, be learned through years and years of struggling with code.

I wrote this book to close part of the education-materials gap and to give you some suggestions that will help you write better object-oriented code. These will be mostly short and simple suggestions. Technically, there won’t be a lot to master. But I find that following these suggestions (or “rules”) helps move your focus from trivial to more interesting aspects of the code that deserve more of your attention. If everyone on your team follows the same suggestions, the code in your project will have a more uniform style.