0% found this document useful (0 votes)
34 views65 pages

(Ebook) Practical Object-Oriented Design: An Agile Primer Using Ruby by Metz, Sandi ISBN 9780134456478, 0134456475

The document provides information about various eBooks available for download, including titles related to object-oriented design and programming. It highlights features of the eBooks, such as different formats and customization options for reading devices. Additionally, it includes praise for the book 'Practical Object-Oriented Design in Ruby' by Sandi Metz, emphasizing its practical advice and clarity for both novice and experienced programmers.

Uploaded by

kuftawixom6c
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views65 pages

(Ebook) Practical Object-Oriented Design: An Agile Primer Using Ruby by Metz, Sandi ISBN 9780134456478, 0134456475

The document provides information about various eBooks available for download, including titles related to object-oriented design and programming. It highlights features of the eBooks, such as different formats and customization options for reading devices. Additionally, it includes praise for the book 'Practical Object-Oriented Design in Ruby' by Sandi Metz, emphasizing its practical advice and clarity for both novice and experienced programmers.

Uploaded by

kuftawixom6c
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 65

Download the Full Ebook and Access More Features - ebooknice.

com

(Ebook) Practical object-oriented design: an agile


primer using Ruby by Metz, Sandi ISBN
9780134456478, 0134456475

https://ebooknice.com/product/practical-object-oriented-
design-an-agile-primer-using-ruby-11894748

OR CLICK HERE

DOWLOAD EBOOK

Download more ebook instantly today at https://ebooknice.com


Instant digital products (PDF, ePub, MOBI) ready for you
Download now and discover formats that fit your needs...

Start reading on any device today!

(Ebook) 99 Bottles of OOP: A Practical Guide to Object-Oriented Design (JavaScript


Edition) by Sandi Metz, Katrina Owen, TJ Stankus

https://ebooknice.com/product/99-bottles-of-oop-a-practical-guide-to-object-
oriented-design-javascript-edition-33785812

ebooknice.com

(Ebook) Biota Grow 2C gather 2C cook by Loucas, Jason; Viles, James ISBN
9781459699816, 9781743365571, 9781925268492, 1459699815, 1743365578, 1925268497

https://ebooknice.com/product/biota-grow-2c-gather-2c-cook-6661374

ebooknice.com

(Ebook) Practical Object-Oriented Design with UML by Mark Priestley ISBN


9780077103934, 9780077126117, 0077103939, 0077126114

https://ebooknice.com/product/practical-object-oriented-design-with-uml-2424342

ebooknice.com

(Ebook) Object-Oriented Systems Analysis and Design Using UML by Simon Bennett, Ray
Farmer ISBN 9780077125363, 0077125363

https://ebooknice.com/product/object-oriented-systems-analysis-and-design-using-
uml-23610970

ebooknice.com
(Ebook) Object Oriented Modeling and Design Using UML, 2nd Edition by Singh, Ajit &
Anamika, Ms. ISBN B0B9JR5GFM

https://ebooknice.com/product/object-oriented-modeling-and-design-using-uml-2nd-
edition-46354378

ebooknice.com

(Ebook) Building Meaning: An Architecture Studio Primer on Design, Theory, and


History by Tamara Metz ISBN 9781003108191, 1003108199

https://ebooknice.com/product/building-meaning-an-architecture-studio-primer-on-
design-theory-and-history-36684454

ebooknice.com

(Ebook) Matematik 5000+ Kurs 2c Lärobok by Lena Alfredsson, Hans Heikne, Sanna
Bodemyr ISBN 9789127456600, 9127456609

https://ebooknice.com/product/matematik-5000-kurs-2c-larobok-23848312

ebooknice.com

(Ebook) Object-Oriented Software Design in C++ by welcome.html

https://ebooknice.com/product/object-oriented-software-design-in-c-53739670

ebooknice.com

(Ebook) Grokking the Object Oriented Design Interview by educative.io

https://ebooknice.com/product/grokking-the-object-oriented-design-
interview-42476516

ebooknice.com
About This E-Book
EPUB is an open, industry-standard format for e-books.
However, support for EPUB and its many features varies across
reading devices and applications. Use your device or app settings to
customize the presentation to your liking. Settings that you can
customize often include font, font size, single or double column,
landscape or portrait mode, and figures that you can click or tap to
enlarge. For additional information about the settings and features
on your reading device or app, visit the device manufacturer’s Web
site.
Many titles include programming code or configuration
examples. To optimize the presentation of these elements, view the
e-book in single-column, landscape mode and adjust the font size to
the smallest setting. In addition to presenting code and
configurations in the reflowable text format, we have included
images of the code that mimic the presentation found in the print
book; therefore, where the reflowable format may compromise the
presentation of the code listing, you will see a “Click here to view
code image” link. Click the link to view the print-fidelity code image.
To return to the previous page viewed, click the Back button on your
device or app.
Praise for the first edition of Practical
Object-Oriented Design in Ruby
“Meticulously pragmatic and exquisitely articulate, Practical
Object Oriented Design in Ruby makes otherwise elusive
knowledge available to an audience which desperately needs it.
The prescriptions are appropriate both as rules for novices and
as guidelines for experienced professionals.”
—Katrina Owen, Creator, Exercism
“I do believe this will be the most important Ruby book of 2012.
Not only is the book 100% on-point, Sandi has an easy writing
style with lots of great analogies that drive every point home.”
—Avdi Grimm, author of Exceptional Ruby and Objects on Rails
“While Ruby is an object-oriented language, little time is spent
in the documentation on what OO truly means or how it should
direct the way we build programs. Here Metz brings it to the
fore, covering most of the key principles of OO development
and design in an engaging, easy-to-understand manner. This is
a must for any respectable Ruby bookshelf.”
—Peter Cooper, editor, Ruby Weekly

“So good, I couldn’t put it down! This is a must-read for anyone


wanting to do object-oriented programming in any language,
not to mention it has completely changed the way I approach
testing.”
—Charles Max Wood, Ruby Rogues Podcast co-host and CEO of
Devchat.tv
“Distilling scary OO design practices with clear-cut examples and
explanations makes this a book for novices and experts alike. It
is well worth the study by anyone interested in OO design being
done right and ‘light.’ I thoroughly enjoyed this book.”
—Manuel Pais, DevOps and Continuous Delivery Consultant,
Independent
“If you call yourself a Ruby programmer, you should read this
book. It’s jam-packed with great nuggets of practical advice and
coding techniques that you can start applying immediately in
your projects.”
—Ylan Segal, San Diego Ruby User Group

“This is the best OO book I’ve ever read. It’s short, sweet, but
potent. It slowly moves from simple techniques to more
advanced, each example improving on the last. The ideas it
presents are useful not just in Ruby but in static languages like
C# too. Highly recommended!”
—Kevin Berridge, software engineering manager, Pointe Blank
Solutions, and organizer, Burning River Developers Meetup
“This is the best programming book I’ve read in ages. Sandi
talks about basic principles, but these are things we’re probably
still doing wrong and she shows us why and how. The book has
the perfect mix of code, diagrams, and words. I can’t
recommend it enough and if you’re serious about being a better
programmer, you’ll read it and agree.
—Derick Hitchcock, software engineer, Cisco

“Metz’s take on the subject is rooted strongly in theory, but the


explanation always stays grounded in real world concerns,
which helped me to internalize it. The book is clear and concise,
yet achieves a tone that is more friendly than terse.”
—Alex Strasheim, network administrator, Ensemble Travel Group

“Whether you’re just getting started in your software


development career, or you’ve been coding for years (like I
have), it’s likely that you’ll learn a lot from Ms. Metz’s book. She
does a fantastic job of explaining the whys of well-designed
software along with the hows.”
—Gabe Hollombe, software craftsman, avantbard.com
PRACTICAL OBJECT-ORIENTED DESIGN
An Agile Primer Using Ruby

Second Edition

Sandi Metz

Boston • Columbus • New York • San Francisco • Amsterdam •


Cape Town • Dubai London • Madrid • Milan • Munich • Paris •
Montreal • Toronto • Delhi • Mexico City São Paulo • Sydney •
Hong Kong • Seoul • Singapore • Taipei • Tokyo
Many of the designations used by manufacturers and sellers to
distinguish their products are claimed as trademarks. Where those
designations appear in this book, and the publisher was aware of a
trademark claim, the designations have been printed with initial
capital letters or in all capitals.
The author and publisher have taken care in the preparation of this
book, but make no expressed or implied warranty of any kind and
assume no responsibility for errors or omissions. No liability is
assumed for incidental or consequential damages in connection with
or arising out of the use of the information or programs contained
herein.
For information about buying this title in bulk quantities, or for
special sales opportunities (which may include electronic versions;
custom cover designs; and content particular to your business,
training goals, marketing focus, or branding interests), please
contact our corporate sales department at
[email protected] or (800) 382-3419.
For government sales inquiries, please contact
[email protected].
For questions about sales outside the U.S., please contact
[email protected].
Visit us on the Web: informit.com/aw
Library of Congress Control Number: 2018939833
Copyright © 2019 Pearson Education, Inc.
All rights reserved. This publication is protected by copyright, and
permission must be obtained from the publisher prior to any
prohibited reproduction, storage in a retrieval system, or
transmission in any form or by any means, electronic, mechanical,
photocopying, recording, or likewise. For information regarding
permissions, request forms and the appropriate contacts within the
Pearson Education Global Rights & Permissions Department, please
visit www.pearsoned.com/permissions/.
ISBN-13: 978-0-13-445647-8
ISBN-10: 0-13-445647-5
1 18
For Amy, who read everything first
Contents

Introduction
Acknowledgments
About the Author

1 Object-Oriented Design
1.1 In Praise of Design
1.1.1 The Problem Design Solves
1.1.2 Why Change Is Hard
1.1.3 A Practical Definition of Design
1.2 The Tools of Design
1.2.1 Design Principles
1.2.2 Design Patterns
1.3 The Act of Design
1.3.1 How Design Fails
1.3.2 When to Design
1.3.3 Judging Design
1.4 A Brief Introduction to Object-Oriented Programming
1.4.1 Procedural Languages
1.4.2 Object-Oriented Languages
1.5 Summary
2 Designing Classes with a Single Responsibility
2.1 Deciding What Belongs in a Class
2.1.1 Grouping Methods into Classes
2.1.2 Organizing Code to Allow for Easy Changes
2.2 Creating Classes That Have a Single Responsibility
2.2.1 An Example Application: Bicycles and Gears
2.2.2 Why Single Responsibility Matters
2.2.3 Determining If a Class Has a Single Responsibility
2.2.4 Determining When to Make Design Decisions
2.3 Writing Code That Embraces Change
2.3.1 Depend on Behavior, Not Data
2.3.2 Enforce Single Responsibility Everywhere
2.4 Finally, the Real Wheel
2.5 Summary

3 Managing Dependencies
3.1 Understanding Dependencies
3.1.1 Recognizing Dependencies
3.1.2 Coupling Between Objects (CBO)
3.1.3 Other Dependencies
3.2 Writing Loosely Coupled Code
3.2.1 Inject Dependencies
3.2.2 Isolate Dependencies
3.2.3 Remove Argument-Order Dependencies
3.3 Managing Dependency Direction
3.3.1 Reversing Dependencies
3.3.2 Choosing Dependency Direction
3.4 Summary
4 Creating Flexible Interfaces
4.1 Understanding Interfaces
4.2 Defining Interfaces
4.2.1 Public Interfaces
4.2.2 Private Interfaces
4.2.3 Responsibilities, Dependencies, and Interfaces
4.3 Finding the Public Interface
4.3.1 An Example Application: Bicycle Touring Company
4.3.2 Constructing an Intention
4.3.3 Using Sequence Diagrams
4.3.4 Asking for “What” Instead of Telling “How”
4.3.5 Seeking Context Independence
4.3.6 Trusting Other Objects
4.3.7 Using Messages to Discover Objects
4.3.8 Creating a Message-Based Application
4.4 Writing Code That Puts Its Best (Inter)Face Forward
4.4.1 Create Explicit Interfaces
4.4.2 Honor the Public Interfaces of Others
4.4.3 Exercise Caution When Depending on Private
Interfaces
4.4.4 Minimize Context
4.5 The Law of Demeter
4.5.1 Defining Demeter
4.5.2 Consequences of Violations
4.5.3 Avoiding Violations
4.5.4 Listening to Demeter
4.6 Summary

5 Reducing Costs with Duck Typing


5.1 Understanding Duck Typing
5.1.1 Overlooking the Duck
5.1.2 Compounding the Problem
5.1.3 Finding the Duck
5.1.4 Consequences of Duck Typing
5.2 Writing Code That Relies on Ducks
5.2.1 Recognizing Hidden Ducks
5.2.2 Placing Trust in Your Ducks
5.2.3 Documenting Duck Types
5.2.4 Sharing Code between Ducks
5.2.5 Choosing Your Ducks Wisely
5.3 Conquering a Fear of Duck Typing
5.3.1 Subverting Duck Types with Static Typing
5.3.2 Static versus Dynamic Typing
5.3.3 Embracing Dynamic Typing
5.4 Summary

6 Acquiring Behavior through Inheritance


6.1 Understanding Classical Inheritance
6.2 Recognizing Where to Use Inheritance
6.2.1 Starting with a Concrete Class
6.2.2 Embedding Multiple Types
6.2.3 Finding the Embedded Types
6.2.4 Choosing Inheritance
6.2.5 Drawing Inheritance Relationships
6.3 Misapplying Inheritance
6.4 Finding the Abstraction
6.4.1 Creating an Abstract Superclass
6.4.2 Promoting Abstract Behavior
6.4.3 Separating Abstract from Concrete
6.4.4 Using the Template Method Pattern
6.4.5 Implementing Every Template Method
6.5 Managing Coupling between Superclasses and Subclasses
6.5.1 Understanding Coupling
6.5.2 Decoupling Subclasses Using Hook Messages
6.6 Summary

7 Sharing Role Behavior with Modules


7.1 Understanding Roles
7.1.1 Finding Roles
7.1.2 Organizing Responsibilities
7.1.3 Removing Unnecessary Dependencies
7.1.4 Writing the Concrete Code
7.1.5 Extracting the Abstraction
7.1.6 Looking Up Methods
7.1.7 Inheriting Role Behavior
7.2 Writing Inheritable Code
7.2.1 Recognize the Antipatterns
7.2.2 Insist on the Abstraction
7.2.3 Honor the Contract
7.2.4 Use the Template Method Pattern
7.2.5 Preemptively Decouple Classes
7.2.6 Create Shallow Hierarchies
7.3 Summary

8 Combining Objects with Composition


8.1 Composing a Bicycle of Parts
8.1.1 Updating the Bicycle Class
8.1.2 Creating a Parts Hierarchy
8.2 Composing the Parts Object
8.2.1 Creating a Part
8.2.2 Making the Parts Object More Like an Array
8.3 Manufacturing Parts
8.3.1 Creating the PartsFactory
8.3.2 Leveraging the PartsFactory
8.4 The Composed Bicycle
8.5 Deciding between Inheritance and Composition
8.5.1 Accepting the Consequences of Inheritance
8.5.2 Accepting the Consequences of Composition
8.5.3 Choosing Relationships
8.6 Summary

9 Designing Cost-Effective Tests


9.1 Intentional Testing
9.1.1 Knowing Your Intentions
9.1.2 Knowing What to Test
9.1.3 Knowing When to Test
9.1.4 Knowing How to Test
9.2 Testing Incoming Messages
9.2.1 Deleting Unused Interfaces
9.2.2 Proving the Public Interface
9.2.3 Isolating the Object under Test
9.2.4 Injecting Dependencies Using Classes
9.2.5 Injecting Dependencies as Roles
9.3 Testing Private Methods
9.3.1 Ignoring Private Methods during Tests
9.3.2 Removing Private Methods from the Class under Test
9.3.3 Choosing to Test a Private Method
9.4 Testing Outgoing Messages
9.4.1 Ignoring Query Messages
9.4.2 Proving Command Messages
9.5 Testing Duck Types
9.5.1 Testing Roles
9.5.2 Using Role Tests to Validate Doubles
9.6 Testing Inherited Code
9.6.1 Specifying the Inherited Interface
9.6.2 Specifying Subclass Responsibilities
9.6.3 Testing Unique Behavior
9.7 Summary

Afterword
Index
Introduction

We want to do our best work, and we want the work we do to have


meaning. And, all else being equal, we prefer to enjoy ourselves
along the way.
Those of us whose work is to write software are incredibly lucky.
Building software is a guiltless pleasure because we get to use our
creative energy to get things done. We have arranged our lives to
have it both ways; we can enjoy the pure act of writing code in sure
knowledge that the code we write has use. We produce things that
matter. We are modern craftspeople, building structures that make
up present-day reality, and no less than bricklayers or bridge
builders, we take justifiable pride in our accomplishments.
This all programmers share, from the most enthusiastic newbie
to the apparently jaded elder, whether working at the lightest weight
Internet startup or the most staid, long-entrenched enterprise. We
want to do our best work. We want our work to have meaning. We
want to have fun along the way.
And so it’s especially troubling when software goes awry. Bad
software impedes our purpose and interferes with our happiness.
Where once we felt productive, now we feel thwarted. Where once
fast, now slow. Where once peaceful, now frustrated.
This frustration occurs when it costs too much to get things
done. Our internal calculators are always running, comparing total
amount accomplished to overall effort expended. When the cost of
doing work exceeds its value, our efforts feel wasted. If
programming gives joy it is because it allows us to be useful, when it
becomes painful it is a sign that we believe we could, and should, be
doing more. Our pleasure follows in the footsteps of work.
This book is about designing object-oriented software. It is not
an academic tome, it is a programmer’s story about how to write
code. It teaches how to arrange software so as to be productive
today and to remain so next month and next year. It shows how to
write applications that can succeed in the present and still adapt to
the future. It allows you to raise your productivity and reduce your
costs for the entire lifetime of your applications.
This book believes in your desire to do good work and gives you
the tools you need to best be of use. It is completely practical and
as such is, at its core, a book about how to write code that brings
you joy.

Who Might Find This Book Useful?


This book assumes that you have at least tried to write object-
oriented software. It is not necessary that you feel you succeeded,
just that you made the attempt in any object-oriented (OO)
language. Chapter 1, “Object-Oriented Design,” contains a brief
overview of object-oriented programming (OOP), but its goal is to
define common terms, not to teach programming.
If you want to learn OO design (OOD) but have not yet done
any object-oriented programming, at least take a tutorial before
reading this book. OOD solves problems; suffering from those
problems is very nearly a prerequisite for comprehending these
solutions. Experienced programmers may be able to skip this step,
but most readers will be happier if they write some OO code before
starting this book.
This book uses Ruby to teach OOD but you do not need to
know Ruby to understand the concepts herein. There are many code
examples but all are quite straightforward. If you have programmed
in any OO language you will find Ruby easy to understand.
If you come from a statically typed OO language like Java or
C++ you have the background necessary to benefit from reading
this book. The fact that Ruby is dynamically typed simplifies the
syntax of the examples and distills the design ideas to their essence,
but every concept in this book can be directly translated to a
statically typed OO language.

How to Read This Book


Chapter 1 contains a general overview of the whys, whens, and
wherefores of OO design, followed by a brief overview of object-
oriented programming. This chapter stands alone. You can read it
first, last, or, frankly, skip it entirely, although if you are currently
stuck with an application that suffers from lack of design, you may
find it a comforting tale.
If you have experience writing object-oriented applications and
want to jump right in, you can safely start with Chapter 2. If you do
so and then stumble upon an unfamiliar term, come back and
browse the “Introduction to Object-Oriented Programming” section
of Chapter 1, which introduces and defines common OO terms used
throughout the book.
Chapters 2 through 9 progressively explain object-oriented
design. Chapter 2, “Designing Classes with a Single Responsibility,”
covers how to decide what belongs in a single class. Chapter 3,
“Managing Dependencies,” illustrates how objects get entangled with
one another and shows how to keep them apart. These two
chapters are focused on objects rather than messages.
In Chapter 4, “Creating Flexible Interfaces,” the emphasis
begins to shift away from object-centric toward message-centric
design. Chapter 4 is about defining interfaces and is concerned with
how objects talk to one another. Chapter 5, “Reducing Costs with
Duck Typing,” is about duck typing and introduces the idea that
objects of different classes may play common roles. Chapter 6,
“Acquiring Behavior through Inheritance,” teaches the techniques of
classical inheritance, which are then used in Chapter 7, “Sharing Role
Behavior with Modules,” to create duck typed roles. Chapter 8,
“Combining Objects with Composition,” explains the technique of
building objects via composition and provides guidelines for choosing
among composition, inheritance, and duck-typed role sharing.
Chapter 9, “Designing Cost-Effective Tests,” concentrates on the
design of tests, which it illustrates using code from earlier chapters
of the book.
Each of these chapters builds on the concepts of the last. They
are full of code and best read in order.

How to Use This Book


This book will mean different things to readers of different
backgrounds. Those already familiar with OOD will find things to
think about, possibly encounter some new points of view, and
probably disagree with a few of the suggestions. Because there is no
final authority on OOD, challenges to the principles (and to this
author) will improve the understanding of all. In the end, you must
be the arbiter of your own designs; it is up to you to question, to
experiment, and to choose.
While this book should be of interest to many levels of reader, it
is written with the particular goal of being accessible to novices. If
you are one of those novices, this part of the introduction is
especially for you. Know this: Object-oriented design is not black
magic. It is simply things you don’t yet know. The fact that you’ve
read this far indicates you care about design; this desire to learn is
the only prerequisite for benefiting from this book.
Chapters 2 through 9 explain OOD principles and provide very
explicit programming rules; these rules will mean different things to
novices than they mean to experts. If you are a novice, start out by
following these rules in blind faith if necessary. This early obedience
will stave off disaster until you can gain enough experience to make
your own decisions. By the time the rules start to chafe, you’ll have
enough experience to make up rules of your own, and your career
as a designer will have begun.
Software Versions Used in This Book
The examples in this book were written using Ruby 2.4 and tested
with Minitest 5.10.3. Source code for the examples can be found at
https://github.com/skmetz/poodr2.

Register your copy of Practical Object-Oriented Design, Second


Edition, on the InformIT site for convenient access to updates
and/or corrections as they become available. To start the
registration process, go to informit.com/register and log in or
create an account. Enter the product ISBN (9780134456478)
and click Submit. Look on the Registered Products tab for an
Access Bonus Content link next to this product, and follow that
link to access any available bonus materials. If you would like to
be notified of exclusive offers on new editions and updates,
please check the box to receive email from us.
Acknowledgments

It is a wonder this book exists; the fact that it does is due to the
efforts and encouragement of many people.
Throughout the long process of writing, Lori Evans and TJ
Stankus provided early feedback on every chapter. They live in
Durham, NC, and thus could not escape me, but this fact does
nothing to lessen my appreciation for their help.
Midway through the book, after it became impossible to deny
that its writing would take approximately twice as long as originally
estimated, Mike Dalessio and Gregory Brown read drafts and gave
invaluable feedback and support. Their encouragement and
enthusiasm kept the project alive during dark days.
A number of reviewers cast their keen eyes on the entire book,
acting as gracious stand-ins for you, the gentle reader. As the first
edition neared completion, Steve Klabnik, Desi McAdam, and Seth
Wax gave it careful readings. The second edition was meticulously
scoured by Will Sommers and Tory Peterschild. Their impressions
and suggestions caused changes that will benefit all who follow.
Late drafts were given careful, thorough readings by Katrina
Owen, Avdi Grimm, and Rebecca Wirfs-Brock, and the book is much
improved by their kind and thoughtful feedback. Before they pitched
in, Katrina, Avdi, and Rebecca were strangers to me; I am grateful
for their involvement and humbled by their generosity. If you find
this book useful, thank them when you next see them.
I am also grateful for the Gotham Ruby Group and for everyone
who expressed their appreciation for the design talks I gave at
GoRuCo 2009 and 2011. The folks at GoRuCo took a chance on an
unknown and gave me a forum in which to express these ideas; this
book started there. Ian McFarland and Brian Ford watched those
talks and their immediate and ongoing enthusiasm for this project
was both infectious and convincing.
The process of writing was greatly aided by Michael Thurston of
Pearson, who was like an ocean liner of calmness and organization
chugging through the chaotic sea of my opposing rogue writing
waves. You can, I expect, see the problem he faced. He insisted,
with endless patience and grace, that the writing be arranged in a
readable structure. I believe his efforts have paid off and hope you
will agree.
My thanks also to Debra Williams Cauley, my editor at
Pearson/Addison-Wesley, who overheard an ill-timed hallway rant in
2006 at the first Ruby on Rails conference in Chicago and launched
the campaign that eventually resulted in this book. Despite my best
efforts, she would not take no for an answer. She cleverly moved
from one argument to the next until she finally found the one that
convinced; this accurately reflects her persistence and dedication.
I owe a debt to the entire object-oriented design community. I
did not make up the ideas in this book, I am merely a translator, and
I stand on the shoulders of giants. It goes without saying that while
all credit for these ideas belongs to others—failures of translation are
mine alone.
And finally, this book owes its existence to my partner Amy
Germuth. Before this project started I could not imagine writing a
book; her view of the world as a place where people did such things
made doing so seem possible. The book in your hands is a tribute to
her boundless patience and endless support.
Thank you, each and every one.
About the Author

Sandi Metz, author of Practical Object-Oriented Design in Ruby and


99 Bottles of OOP, believes in simple code and straightforward
explanations. She prefers working software, practical solutions, and
lengthy bicycle trips (not necessarily in that order), and writes,
consults, speaks, and teaches about object-oriented design.
CHAPTER 1

Object-Oriented Design

The world is procedural. Time flows forward and events, one by one,
pass by. Your morning procedure may be to get up, brush your
teeth, make coffee, dress, and then get to work. These activities can
be modeled using procedural software; because you know the order
of events, you can write code to do each thing and then quite
deliberately string the things together, one after another.
The world is also object-oriented. The objects with which you
interact might include a spouse and a cat, or an old car and a pile of
bike parts in the garage, or your ticking heart and the exercise plan
you use to keep it healthy. Each of these objects comes equipped
with its own behavior, and while some of the interactions between
them might be predictable, it is entirely possible for your spouse to
unexpectedly step on the cat, causing a reaction that rapidly raises
everyone’s heart rate and gives you new appreciation for your
exercise regimen.
In a world of objects, new arrangements of behavior emerge
naturally. You don’t have to explicitly write code for the
spouse_steps_on_cat procedure; all you need is a spouse object
that takes steps and a cat object that does not like being stepped
on. Put these two objects into a room together and unanticipated
combinations of behavior will appear.
This book is about designing object-oriented software, and how
it views the world as a series of spontaneous interactions between
objects. Object-oriented design (OOD) requires that you shift from
thinking of the world as a collection of predefined procedures to
modeling the world as a series of messages that pass between
objects. Failures of OOD might look like failures of coding technique,
but they are actually failures of perspective. The first requirement for
learning how to do object-oriented design is to immerse yourself in
objects; once you acquire an object-oriented perspective, the rest
follows naturally.
This book guides you through the immersion process. This
chapter starts with a general discussion of OOD. It argues the case
for design and then proceeds to describe when to do it and how to
judge it. The chapter ends with a brief overview of object-oriented
programming that defines the terms used throughout the book.

1.1 In Praise of Design


Software gets built for a reason. The target application—whether a
trivial game or a program to guide radiation therapy—is the entire
point. If painful programming were the most cost-effective way to
produce working software, programmers would be morally obligated
to suffer stoically or to find other jobs.
Fortunately, you do not have to choose between pleasure and
productivity. The programming techniques that make code a joy to
write overlap with those that most efficiently produce software. The
techniques of object-oriented design solve both the moral and the
technical dilemmas of programming; following them produces cost-
effective software using code that is also a pleasure to work on.
1.1.1 The Problem Design Solves
Imagine writing a new application. Imagine that this application
comes equipped with a complete and correct set of requirements.
And if you will, imagine one more thing: once written, this
application need never change.
For this case, design does not matter. Like a circus performer
spinning plates in a world without friction or gravity, you could
program the application into motion and then stand back proudly
and watch it run forever. No matter how wobbly, the plates of code
would rotate on and on, teetering round and round but never quite
falling.
As long as nothing changed.
Unfortunately, something will change. It always does. The
customers didn’t know what they wanted, they didn’t say what they
meant. You didn’t understand their needs, you’ve learned how to do
something better. Even applications that are perfect in every way are
not stable. The application was a huge success, now everyone wants
more. Change is unavoidable. It is ubiquitous, omnipresent, and
inevitable.
Changing requirements are the programming equivalent of
friction and gravity. They introduce forces that apply sudden and
unexpected pressures that work against the best-laid plans. It is the
need for change that makes design matter.
Applications that are easy to change are a pleasure to write and
a joy to extend. They’re flexible and adaptable. Applications that
resist change are just the opposite; every change is expensive and
each makes the next cost more. Few difficult-to-change applications
are pleasant to work on. The worst of them gradually become
personal horror films where you star as a hapless programmer,
running madly from one spinning plate to the next, trying to stave
off the sound of crashing crockery.
1.1.2 Why Change Is Hard
Object-oriented applications are made up of parts that interact to
produce the behavior of the whole. The parts are objects;
interactions are embodied in the messages that pass between them.
Getting the right message to the correct target object requires that
the sender of the message know things about the receiver. This
knowledge creates dependencies between the two, and these
dependencies stand in the way of change.
Object-oriented design is about managing dependencies. It is a
set of coding techniques that arrange dependencies such that
objects can tolerate change. In the absence of design, unmanaged
dependencies wreak havoc because objects know too much about
one another. Changing one object forces change upon its
collaborators, which in turn forces change upon its collaborators, ad
infinitum. A seemingly insignificant enhancement can cause damage
that radiates outward in overlapping concentric circles, ultimately
leaving no code untouched.
When objects know too much, they have many expectations
about the world in which they reside. They’re picky, they need things
to be “just so.” These expectations constrain them. The objects
resist being reused in different contexts; they are painful to test and
susceptible to being duplicated.
In a small application, poor design is survivable. Even if
everything is connected to everything else, if you can hold it all in
your head at once, you can still improve the application. The
problem with poorly designed small applications is that if they are
successful, they grow up to be poorly designed big applications.
They gradually become tar pits in which you fear to tread lest you
sink without a trace. Changes that should be simple may cascade
around the application, breaking code everywhere and requiring
extensive rewriting. Tests are caught in the crossfire and begin to
feel like a hindrance rather than a help.
1.1.3 A Practical Definition of Design
Every application is a collection of code; the code’s arrangement is
the design. Two isolated programmers, even when they share
common ideas about design, can be relied upon to solve the same
problem by arranging code in different ways. Design is not an
assembly line where similarly trained workers construct identical
widgets; it’s a studio where like-minded artists sculpt custom
applications. Design is thus an art, the art of arranging code.
Part of the difficulty of design is that every problem has two
components. You must not only write code for the feature you plan
to deliver today, you must also create code that is amenable to being
changed later. For any period of time that extends past initial
delivery of the beta, the cost of change will eventually eclipse the
original cost of the application. Because design principles overlap
and every problem involves a shifting timeframe, design challenges
can have a bewildering number of possible solutions. 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.
Taking the future into consideration might seem to introduce a
need for psychic abilities normally considered outside the realm of
programming. Not so. The future that design considers is not one in
which you anticipate unknown requirements and preemptively
choose one from among them to implement in the present.
Programmers are not psychics. Designs that anticipate specific future
requirements almost always end badly. Practical design does not
anticipate what will happen to your application; it merely accepts
that something will and that, in the present, you cannot know what.
It doesn’t guess the future; it preserves your options for
accommodating the future. It doesn’t choose; it leaves you room to
move.
The purpose of design is to allow you to do design later, and its
primary goal is to reduce the cost of change.
Discovering Diverse Content Through
Random Scribd Documents
Quarter Mile Dash. The race consists of the letting out and
winding in of a kite on one quarter mile of string. The boys set their
reels ready for the best speed and they group themselves quite close
together, but far enough apart to prevent mix-ups, and at the proper
time are handed their string that has been measured and labeled
which they attach to kite. Each boy in the race is allowed one helper
and the kite may be held by the helper a hundred feet away, ready
to toss it in the air at the sign for starting. When all is ready, the one
in charge of the group calls “ready! go!” The kites are tossed up and
are given the string as fast as it will be taken. The boy with a steady
head will sometimes stop playing out and work his kite up a little to
get more breeze. If there is plenty of breeze, they are fed all the
string as fast as it is pulled out. If a kite drops it may be worked up
again, but it must go to the end of the quarter mile and back. A time
keeper is placed by each contestant, and officers are needed to keep
back the onlookers. As soon as all the string is out the boy slips the
loop on the end of his string over a hook on the reel and winds in as
fast as he can turn. The kite mounts up in the air and is pulled with
great violence toward the reel. If a string breaks, the time keeper
stops the winding until the kite is again attached. No allowance is
made for mishaps. The kite that is jerked down into the reel first is
winner, and the owner is usually a pretty warm boy. The helper can
take turns in winding.
Other races should be similarly conducted. We have had races in
the construction of a tailless kite, including the lashing and stringing
of framework and covering, attaching of bridle and the kite must fly.
In all pulling contests, spring scales are used. In the light weights,
the twenty-five pound scales are best, but the fifty pound is more
serviceable for all around purposes. For very heavy pulling, large ice
scales might be borrowed for the day from some hardware man.
To measure the pull of a kite, the string is looped about the hook
of the spring and the record made. Several records are made of each
kite over a period of about thirty minutes or so. The judges going to
and fro measuring this one and that. The kite should be ascending to
get the best register. It is well in trial events to set the number of
times that each aeroplane may be tried or tests of pulling permitted,
as some will tease for a continual performance.
The art supervisors and teachers are good as judges for the
artistic events. All kites are in the air most of the time, so a general
survey is made of the whole field. It is well to have about five judges
on this group. Less will do the work all right, but it is well to draw
many into the service.
If the director could be on horseback so as to be easily seen, and
also be able to get about easily, it would help out considerably.
Messengers from judges to director or information would be useful.
Badges. For badges, we use a celluloid button, with our own cut,
the ribbon attached has printing in black. The officers get yellow, the
first prize, blue, the second, red. Some years we have used different
colored buttons, this year the buttons were all yellow, the ribbons,
yellow, red, and blue.
See the street car officials in order that they may plan
accommodations for the day. Instructions are posted for the car men
by the officials, that consideration be given to the boys with their
kites and in most cases the men have been very helpful in this
respect. Of course large kites cannot be taken on the street car. A
great many are taken to the field in automobiles.
Just before the tournament it is rather difficult to locate the boys
making their kites, as they work in secluded places, but if you know
of some that are making progress, a photograph by the newspaper
men will add considerable zest to the advertising side of
preparations.
Get your school officials enthusiastic first, and get their
cooperation in encouraging the undertaking, for it is a great school
social gathering and should be made worth while. Then boost for it.
Demonstrate by making or flying a kite, and the boys will take care
of the rest.
A SAMPLE ANNOUNCEMENT.
MANUAL TRAINING OFFICE

Los Angeles City Schools

KITES AND AEROPLANE MODELS.


New Year’s Greeting to the
Kite Makers of Los Angeles:
The Sixth Annual Kite Tournament will be held April 20,
1912, at Exposition Park. The spring vacation will be a good
time to design, construct, and try out new ideas. The model
aeroplanes will have a much larger place than heretofore at
the coming tournament. A number of good plans of kites and
model aeroplanes will be sent out during the coming season.
Spruce sticks can be obtained again this year at 1335 E.
6th St. at the Southern California Box Co., in 25c bundles or
more.
The Goodyear Rubber Co., No. 324 S. Broadway is carrying
string rubber and will have one sixteenth and one eighth inch,
very good sizes. Models propelled by rubber bands should be
from 20” to 30” across. Do not make the planes too wide,
much of the failure of models is due to this mistake.
Two firms in the east are advertising small gasoline motors
for model aeroplanes. Models to carry these motors should be
from 6’ to 8’ or more. Models so equipped are operated by
cords running to the ground. One boy claims to have
succeeded with a storage battery under his arm and an Ajax
motor in his model. If we get our model well under control we
should be able to carry the storage battery on a wheel as
suggested two years ago. No one has reported a success with
the clockspring device. A long coiled steel wire spring has
more promising possibilities.
Look for advertisements in “Popular Mechanics” and other
magazines, for firms carrying parts such as gears, rubber
motors, etc. There will be a few events for commercially
manufactured models, but these are not to compete with
home made.
The usual kite events will be about the same as during the
past two years. The quarter mile dash with the use of reels
will be used; also an eighth mile dash will be listed this year
in which the string is to be wound in by hand.
The “Scientific American” of October 14, 1911, has an
article on “How to make a Model Aeroplane that will fly 700
feet”. Look it up.
Ask at the libraries for Mr. Collin’s books on “Model
Aeroplanes”. There is a second book out by this author that
seems very good.
Look out for ideas in the daily newspapers and at the
Dominguez meet.
Principals please post.
Respectfully,

CHAS. M. MILLER.
MANUAL TRAINING OFFICE
April 12, 1912.
Sixth Annual Kite Tournament at
Exposition Park, April 20, 1912.
TIME:—No kites are to be put up before one o’clock, and judging
is to begin at 2 p. m.
CARS:—Georgia St., University, Grand Ave. to Figueroa Junction,
Vermont Heights or Inglewood on Main to Figueroa Junction.
PLACES:—Bulletin boards will be used as usual—see information,
if you can’t get located.
RAIN:—If the afternoon is stormy, the tournament will be
postponed two weeks.
GIRLS:—All events are open to the girls.
ADMISSION:—No admission fee, and friends invited.
ARTISTIC EVENT:—All kites will be judged for artistic effect no
matter where located—must fly.
BALLOONS:—Boys must bring their own balloon equipment.
STICKS FOR FRAMES:—Any wood, except the hardwoods, may be
used for frames, but spruce is best.
INTERMEDIATE AND HIGH SCHOOL BOYS:—All intermediate boys
are eligible and all high school boys who have been in a grade school
since last tournament, may enter from such school. Look up some of
your kite makers.
KITES:—All should be encouraged to make and fly a kite, even if
not for a prize. Make it a kite flying day for your school.
EXTRA PARTS:—Boys should bring along an extra stick and some
paper in case of accident to kite.
NEW INVENTIONS:—Special new features will be recognized if
they have real merit.
PRIZES:—Ribbon badges and diplomas will be awarded as in
former years.
ORGANIZE:—Distribute your efforts over many events.
REGISTRATION:—Send in registration to Mr. Miller at Grand Ave.
School on Friday. Give names of boys. No one will be kept out for
lack of registration.
MEASURING:—Kite lines for quarter and one-eighth mile dashes
and yacht race will be measured at Grand Ave. School, Thursday and
Friday afternoons, April 18th and 19th.
Come one—come all.
Respectfully,

CHAS. M. MILLER.
CHAPTER XIX.

CONCLUSION.
Kite making and kite flying have been enjoyed for centuries in the
orient and for a good many years in this country, and will continue as
a seasonal sport for perhaps all time. It can be made more
interesting and useful by a little cooperation on the part of the
grown-ups. It may be only expression of appreciation of the effort
put forth by some otherwise idle fellow, or it may be in the form of a
request of teacher to pupil for a nice kite as a gift for a third party, or
it may be the arousing of school spirit for the best showing at a
tournament, it might be assistance rendered in planning a beautiful
kite, and it might be a great many other things that have not been
mentioned. Kite making will not catch and make good every boy,
even with the best efforts of the best teachers, but it will go farther
than any other enticement toward bringing about good comradeship
between teacher and scholar, which is half the battle with uncertain
temperaments in some boys. We need to come shoulder to shoulder
with the boys to help them most.
But the merits of kite making go farther than the social
relationship, it arouses the inventive spirit in the boy, fills in many
otherwise idle hours with good healthy sport that occupies the
children out of doors. It is not wasted time unless indulged in to too
great excess, but new developments bring about new studies of the
kite problems that are as good for the boys as problems of other
subjects like arithmetic and geometry for we must remember that
boys have subject of study not found in text-books.
Someone told me not long ago that “no one could think an evil
thought while looking up”. Some one else has written, “If the outlook
is not good, try the uplook”. This latter has a greater significance
than would be generally applied to boys flying kites, but who knows
what boys are really thinking about; maybe we underestimate their
abilities and inclinations. Our boys often need more persistency of
effort, and must be held to their jobs by much attention on the part
of overseers. Most boys will stick to kite making against great
discouragement and some will continue, for long periods, working
patiently and carefully until they succeed. The string is often a
source of great annoyance, it snarls up and some lads will cut out
the hard knots, but others will tackle the knotty problems and
untangle them, they will do the same with knotty problems in life
later on. It is patience that wins in many a tangled strife. Boys do
not as a rule have as good feeling for color harmony, or so the ladies
think, as the girls; help the boys out a little on their color
combinations on their kites. It may be the first time the boy has had
a problem of his own in color work.
Perhaps the little aeroplane does not go very far, it looks like a
failure. Do you look on and pass on? If the model goes at all by its
own power, that boy has made a something that has overcome the
force of gravity to the extent of traveling transversely to its
downward pull. Recognize it, and encourage the boy. There is a
difference between flinging one so that it will travel for a short
distance, and releasing one that travels by its own power. The former
may be a deception. Give credit where credit is due.
The balloons have very little lifting power, but the force of gravity
has been overcome, two gases of unequal density have been placed
in juxtaposition and the lighter one goes up. So we might go on with
each of the subjects attempted in this book. There has been great
demand for the briefer treatise, and I hope this little book may have
met the expectancy of its readers more than half way.
Remember it is not just the pretty kite soaring high in the sky;
remember there is a BOY at the other end of the kite line. Boost for
him.
CHAPTER XX.

BIBLIOGRAPHY OF KITES.
Prepared by M. Charlotte Casey, Los Angeles Public School Library.
Adams, J. H. How to make kites and flying gigs.
Woman’s H. C. 31:44
Baden-Powell, B. F. S. Kites, their theory and
practice. J. Soc. Arts 46:359
Baden-Powell, B. F. S. Man lifting kites. National 26:494
Baden-Powell, B. F. S. War-kites. McClure 12:543
Baldwin, T. W. Outlook tower of Beinn Bhreagle.
(Tetrahedral principle.) Sci. Am. 97:242
Beard, D. C. How to make tailless kites. Outing 48:254
Beard, D. C. Two tailless kites and how to make
them. Outing 48:254-6
Beasley, W. L. Picturesque Chinese kites. Sci. Am. 89:408
Bell, A. G. Frost King, a tetrahedral kite; ill. Sci.
Am. S. 63:26264-6
Bell, A. G. Hargrave box-kites and tetrahedral kites
compared; ill. S. Am. 63:26269-74
Bell, H. H. Prof. Bell on construction of kites.
Science, n. s. 18:204
Bell. Tetrahedral kites in wireless telegraphy; ill.
Sci. Am. 94:324
Bell, A. G. Tetrahedral principle in kite structure.
Sci. Am. S. 55:22947-50
Bell, A. G. Tetrahedral principles in kite structure.
Nat. Geog. Mag. 14:219
Bell, A. G. Bell’s kite experiences. Sci. Am. 88:334
Briggs, M. N. Tailless kites, how made. Outl. 58:1026
Claudy, C. H. Scientific kite flying. St. N. 34:1068-72
Clayton, H. H. Alexander Graham Bell on kite
construction. Sci. Am. S. 55:22975
Davis, J. W. The kite as a life saver at sea. Engin.
M. 7:213
Dines, W. H. Kites in meteorological work. Nature 74:35-36
Dines, W. H. Scientific kites—flying. Nature 68:152
Eddy, W. A. Photographing from kites. Cent. 32:86
Eddy, W. A. Science and kite-flying. Ind. 52:2333-4
Eddy, W. A. Experience in gliding flight. Eng. M. 26:3
Fergusson, S. F. International kite ascensions; ill.
Sci. Am. 9 97:97-8
Folding Malay kite; ill. Sci. Am. S. 69:2490
Frankenfield, H. C. Work of the United States
Weather Bureau with kites. Nature 63:198
(Same in Nat. Geog. Mag. 11:55.)
Grovesnor, G. H. Tetrahedral kites of Alexander
Graham Bell. Pop. Sci. 64:131-51
Hatton, J. Kites and pigeons. London, Soc. 21:392, 529
Henderson, C. Bell and his tetrahedral kites. World
To-day 13:1274-7
Hunter, H. C. The modern kite and the
government experiments. Outing 39:43
Investigation of the upper atmosphere by
means of kites. J. Soc. Arts 50:858
Blackw. 179:743
Liv. Age 259:169
Kite, The. Ecl. M. 147:170
Cur. Lit. 32:607
Kite Craft. School Arts Book, Feb. 1910.
Kite excursions. Cur. Lit. 32:607
Kite flying at sea. Science, n. s. 20:848
Kite flying in the East. Cur. Lit. 30:483-3
Kite flying over the Atlantic. Science, n. s. 23:852
Kite flying over the ocean. Science, n. s. 22:882
Kites as used in Meteorological observances.
Sci. Am. 83:226
Kites, Cody’s man-lifting. Science, n. s. 20:64
Kites in life-saving operations. Sci. Am. 96:207
Loomis, C. B. Kite craze. Cent. 74:346
Lorrimer, C. Festival of the lantern kites. Overland,
n. s. 48:251
McAdie. Franklin’s kite experience with modern
apparatus. Pop. Sci. Mo. 51:739
Marvin, C. F. Kite as an instrument of
meteorological research. Frank. Inst. 148:241
Marvin, C. F. Kite meteograph construction and
operation. Sci. Am. S. 49:20166-7
Miller, C. M. Construction and flying of kites.
Manual training 10:200
Miller, C. M. Kite Craft. School Arts Book, Feb.,
1910.
Miller, J. S. Scientific kite-flying. Cent. 32:66
Moffett, C. Scientific kite-flying. McClure 6:379
Mouillard, L. R. Gliding flight. Cosmopol. 16:459
Musical kites. Leis. Hour 37:473
New observation kites invented by S. F. Cody.
Sci. Am. S. 55:22804
Sci. Am. S. 57:23524
Observation war-kites. Sci. Am. 88:445
Results of International kite-flying contests. Sci.
Am. 89:63
Roberts, A. W. Kites. H. Y. P. Vol. 4:475
Roberts, A. W. Novelties in kites. H. Y. P. 5:411
Rotch, A. L. Kites in meteorological observations.
Science, n. s. 14:412
Rotch, A. L. Meteorological observations at sea
with kites. Science, n. s. 14:896
Rotch, A. L. Meteorological observations with kites
at sea. Science, n. s. 18:113
Rotch, A. L. Use of kites in meteorological
observations. Sci. Am. S. 52:21718-20
Rotch, A. L. Use of kites for meteorological
observations, at sea. Sci. Am. 91:479
Serviss, G. P. Kite principle in aerial navigation.
Sci. Am. 88:484-5
Signaling with kites. Sci. Am. 83:232
Tetrahedral kites. Cur. Lit. 37:70
Tindal, M. Kite craze. Cur. Lit. 30:677-8
Traction by kites. Sci. Am. S. 50:20691
Use of flexible bridles on kites. Sci. Am. 83:213
Use of kites in observation. Sci. Am. S. 55:22823
Varney, G. J. Kite flying in 1897. Pop. Sci. Mo. 53:48
Walsh, G. C. Kites in war and peace. Chaut. 29:582
Ward, R. D. Kite flying in Scotland and the cyclone
theory. Science, n. s. 18:155
Ward, R. D. Meteorological results of kite work.
Science, n. s. 21:433
Wise, H. D. Experiments with kites. Cent. 32:78
Wixon, H. H. Principles of soaring flight. Sci. Am.
S. 60:24904
Woglom. On scientific kite flying. Spec. 78:576
Wright, L. How to make a gliding machine. Sci.
Am. S. 61:25353
Zehl, E. Kite flying as a fine art. World To-day 13:1016
kites.
Nugent, M. New games and amusements for
young and old alike. 793:111
Rolch, A. L. Kites. (In his Sounding the ocean of
air, p. 117-174), in 551.5:13
Walker, F. Practical kites and aeroplanes—how to
make and work them. 533.6:10
Woglom, C. T. Parakites: a treatise on the making
and flying of tailless kites 533.6:3
Beard, D. C. American Boy’s Handybook.
Beard, D. C. Outdoor Handybook.
BOOKS for BOYS

Especially Helpful for the Use of Boys


in their Home Shops

BEGINNING WOODWORK, At Home and in School.


By Clinton S. VanDeusen.
A full and clear description in detail of the fundamental
processes of elementary benchwork in wood. This description
is given thru directions for making a few simple, useful
articles, suitable either for school or home problems. The
book contains more than one hundred sketches and ten
working drawings. Price, $1.00.

MANUAL TRAINING TOYS, for the Boys’ Workshop.


By Harris W. Moore.
This book contains a collection of working drawings
illustrating forty-two projects, overflowing with “boy” interest.
It is a popular boy’s book that is truly educational. The
projects are all new in the manual training shop. The text
gives instructions for making each project and treats of tools
and tool processes. Price, $1.00.

The CONSTRUCTION and FLYING of KITES.


By Charles M. Miller.
A book of unusual interest to the boy. It contains seven
full-page plates of drawings of kites and fifteen figures—over
forty kites shown. Details of construction are given and a kite
tournament is described. Full of interesting suggestions. Price,
20 cents.

ESSENTIALS of WOODWORKING.
By Ira S. Griffith.
A textbook written especially for the use of grammar and
high school students. A clear and comprehensive treatment of
woodworking tools, materials, and processes, to supplement,
but not to take the place of the instruction given by the
teacher. The book does not contain a course of models; it
may be used with any course. It is illustrated with
photographs and numerous pen drawings. Price, $1.00.
The “Problems Series” of Working Drawings,
Good for Either Home or School Use

PROJECTS for BEGINNING WOODWORK and MECHANICAL


DRAWING.
By Ira S. Griffith.
A work book for the use of students in grammar grade
classes. It consists of working drawings and working
directions. The projects are such as have proven of
exceptional service where woodworking and mechanical
drawing are taught in a thoro, systematic manner in the
seventh and eighth grades. The aim has been to provide
successful rather than unique problems. The fifty projects in
the book have been selected and organized with the constant
aim of securing the highest educational results. The book is
especially suited for use in connection with “Essentials of
Woodworking” by the same author. Price, 75 cents.

PROBLEMS in WOODWORKING.
By M. W. Murray.
A convenient collection of good problems consisting of
forty plates bound in board covers with brass fasteners. Each
plate is a working drawing, or problem in benchwork that has
been successfully worked out by boys in one of the grades
from seven to nine inclusive. Price, 75 cents.

ADVANCED PROJECTS in WOODWORK.


By Ira S. Griffith.
This book is similar to “Projects for Beginning Woodwork
and Mechanical Drawing,” but is suited to high school needs.
It consists of fifty plates of problems and accompanying
notes. It is essentially a collection of problems in furniture
making selected or designed with reference to school use. On
the plate with each working drawing is a good perspective
sketch of the completed object. In draftsmanship and
refinement of design these problems are of superior quality. It
is in every respect an excellent collection. Price, $1.00.

PROBLEMS in FURNITURE MAKING.


By Fred D. Crawshaw.
This book, revised and enlarged, consists of 43 full-page
plates of working drawings suitable for use in grammar and
high schools and 36 pages of text, including chapters on
design, construction and finishes, and notes on the problems.
Each project is shown in its completed form by a perspective
sketch. Loose leaf, bound in board covers with brass
fasteners. Price, $1.00.

PROBLEMS in WOOD-TURNING.
By Fred D. Crawshaw.
In the first place this is a book of problems—25 plates
covering spindle, face-plate, and chuck turning. In the second
place it is a textbook on the science and art of wood-turning
illustrated by fifty pen sketches. It gives the mathematical
basis for the cuts used in turning. In the third place it is a
helpful discussion of the principles of design as applied to
objects turned in wood. It is a clear, practical and suggestive
book on wood-turning. Price, 80 cents.

PROBLEMS in MECHANICAL DRAWING.


By Charles A. Bennett. With drawings made by Fred D.
Crawshaw.
This book consists of 80 plates and a few explanatory
notes, and is bound in board covers with brass fasteners. Its
purpose is to furnish teachers of classes beginning mechanical
drawing with a large number of simple, practical problems.
These have been selected with reference to the formation of
good habits in technique, the interest of the pupils, and the
subjects generally included in a grammar and first-year high
school course. Each problem given is unsolved and therefore
in proper form to hand to the pupil for solution. Price, $1.00.
Some Choice Books for Home or
School Libraries

HANDWORK in WOOD.
By William Noyes.
A handbook for teachers and a textbook for normal school
and college students. A comprehensive and scholarly treatise,
covering logging, sawmilling, seasoning and measuring, hand
tools, wood fastenings, equipment and care of the shop, the
common joints, types of wood structures, principles of joinery,
and wood finishing. 304 Illustrations—excellent pen drawings
and many photographs. Price, $2.00.

WOOD and FOREST.


By William Noyes.
A companion volume to “Handwork in Wood,” by the same
author. Especially adapted as a reference book for teachers of
woodworking. Not too difficult for use as a textbook for
normal school and college students. Treats of wood,
distribution of American forests, life of the forest, enemies of
the forest, destruction, conservation and uses of the forest,
with a key to the common woods by Filibert Roth. Describes
67 principal species of wood with maps of the habitat, leaf
drawings, life size photographs and microphotographs of
sections. Contains a general bibliography of books and articles
on wood and forest. Profusely illustrated with photographs
from the United States forest service and with pen and ink
drawings by Anna Gausmann Noyes and photographs by the
author. 309 pages. Price, $3.00.
DESIGN and CONSTRUCTION in WOOD.
By William Noyes.
A book full of charm and distinction and the first to give
due consideration to the esthetic side of wood-working. It is
intended to give to beginners practice in designing simple
projects in wood and an opportunity to acquire skill in
handling tools. The book illustrates a series of projects and
gives suggestions for other similar projects together with
information regarding tools and processes for making. A
pleasing volume abundantly and beautifully illustrated. Price,
$1.50.

THE MANUAL ARTS PRESS


PEORIA, ILLINOIS
Transcriber’s Note:
Words may have multiple spelling variations or inconsistent
hyphenation in the text. These have been left unchanged, as were
obsolete and alternative spellings. Misspelled words were corrected.
Obvious printing errors, such as partially printed letters and
punctuation, were corrected. Final stops missing at the end of
sentences and abbreviations were added. Duplicate words at line
endings were removed.
Figure 143 is missing in the original.
Missing words [in brackets] added to text:

... kite would be adjusted [as in] Fig. 92, ...


... A biplane is shown [in] Fig. 211 ...
*** END OF THE PROJECT GUTENBERG EBOOK KITECRAFT ***

Updated editions will replace the previous one—the old editions


will be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States
copyright in these works, so the Foundation (and you!) can copy
and distribute it in the United States without permission and
without paying copyright royalties. Special rules, set forth in the
General Terms of Use part of this license, apply to copying and
distributing Project Gutenberg™ electronic works to protect the
PROJECT GUTENBERG™ concept and trademark. Project
Gutenberg is a registered trademark, and may not be used if
you charge for an eBook, except by following the terms of the
trademark license, including paying royalties for use of the
Project Gutenberg trademark. If you do not charge anything for
copies of this eBook, complying with the trademark license is
very easy. You may use this eBook for nearly any purpose such
as creation of derivative works, reports, performances and
research. Project Gutenberg eBooks may be modified and
printed and given away—you may do practically ANYTHING in
the United States with eBooks not protected by U.S. copyright
law. Redistribution is subject to the trademark license, especially
commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the


free distribution of electronic works, by using or distributing this
work (or any other work associated in any way with the phrase
“Project Gutenberg”), you agree to comply with all the terms of
the Full Project Gutenberg™ License available with this file or
online at www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand,
agree to and accept all the terms of this license and intellectual
property (trademark/copyright) agreement. If you do not agree
to abide by all the terms of this agreement, you must cease
using and return or destroy all copies of Project Gutenberg™
electronic works in your possession. If you paid a fee for
obtaining a copy of or access to a Project Gutenberg™
electronic work and you do not agree to be bound by the terms
of this agreement, you may obtain a refund from the person or
entity to whom you paid the fee as set forth in paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only


be used on or associated in any way with an electronic work by
people who agree to be bound by the terms of this agreement.
There are a few things that you can do with most Project
Gutenberg™ electronic works even without complying with the
full terms of this agreement. See paragraph 1.C below. There
are a lot of things you can do with Project Gutenberg™
electronic works if you follow the terms of this agreement and
help preserve free future access to Project Gutenberg™
electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright
law in the United States and you are located in the United
States, we do not claim a right to prevent you from copying,
distributing, performing, displaying or creating derivative works
based on the work as long as all references to Project
Gutenberg are removed. Of course, we hope that you will
support the Project Gutenberg™ mission of promoting free
access to electronic works by freely sharing Project Gutenberg™
works in compliance with the terms of this agreement for
keeping the Project Gutenberg™ name associated with the
work. You can easily comply with the terms of this agreement
by keeping this work in the same format with its attached full
Project Gutenberg™ License when you share it without charge
with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside
the United States, check the laws of your country in addition to
the terms of this agreement before downloading, copying,
displaying, performing, distributing or creating derivative works
based on this work or any other Project Gutenberg™ work. The
Foundation makes no representations concerning the copyright
status of any work in any country other than the United States.

1.E. Unless you have removed all references to Project


Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project
Gutenberg™ work (any work on which the phrase “Project
Gutenberg” appears, or with which the phrase “Project
Gutenberg” is associated) is accessed, displayed, performed,
viewed, copied or distributed:

This eBook is for the use of anyone anywhere in the United


States and most other parts of the world at no cost and
with almost no restrictions whatsoever. You may copy it,
give it away or re-use it under the terms of the Project
Gutenberg License included with this eBook or online at
www.gutenberg.org. If you are not located in the United
States, you will have to check the laws of the country
where you are located before using this eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is


derived from texts not protected by U.S. copyright law (does not
contain a notice indicating that it is posted with permission of
the copyright holder), the work can be copied and distributed to
anyone in the United States without paying any fees or charges.
If you are redistributing or providing access to a work with the
phrase “Project Gutenberg” associated with or appearing on the
work, you must comply either with the requirements of
paragraphs 1.E.1 through 1.E.7 or obtain permission for the use
of the work and the Project Gutenberg™ trademark as set forth
in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is


posted with the permission of the copyright holder, your use and
distribution must comply with both paragraphs 1.E.1 through
1.E.7 and any additional terms imposed by the copyright holder.
Additional terms will be linked to the Project Gutenberg™
License for all works posted with the permission of the copyright
holder found at the beginning of this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files
containing a part of this work or any other work associated with
Project Gutenberg™.

1.E.5. Do not copy, display, perform, distribute or redistribute


this electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1
with active links or immediate access to the full terms of the
Project Gutenberg™ License.

1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if
you provide access to or distribute copies of a Project
Gutenberg™ work in a format other than “Plain Vanilla ASCII” or
other format used in the official version posted on the official
Project Gutenberg™ website (www.gutenberg.org), you must,
at no additional cost, fee or expense to the user, provide a copy,
a means of exporting a copy, or a means of obtaining a copy
upon request, of the work in its original “Plain Vanilla ASCII” or
other form. Any alternate format must include the full Project
Gutenberg™ License as specified in paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™
works unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or


providing access to or distributing Project Gutenberg™
electronic works provided that:

• You pay a royalty fee of 20% of the gross profits


you derive from the use of Project Gutenberg™
works calculated using the method you already use
to calculate your applicable taxes. The fee is owed to
the owner of the Project Gutenberg™ trademark, but
he has agreed to donate royalties under this
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebooknice.com

You might also like