Impractical Python Projects Playful Programming Activities to Make You Smarter 1st Edition Lee Vaughan download pdf
Impractical Python Projects Playful Programming Activities to Make You Smarter 1st Edition Lee Vaughan download pdf
com
https://textbookfull.com/product/impractical-python-
projects-playful-programming-activities-to-make-you-
smarter-1st-edition-lee-vaughan-2/
OR CLICK BUTTON
DOWNLOAD NOW
https://textbookfull.com/product/impractical-python-projects-playful-
programming-activities-to-make-you-smarter-1st-edition-lee-vaughan-2/
textboxfull.com
https://textbookfull.com/product/python-for-kids-a-playful-
introduction-to-programming-1st-edition-briggs/
textboxfull.com
https://textbookfull.com/product/real-world-python-a-hacker-s-guide-
to-solving-problems-with-code-1st-edition-lee-vaughan/
textboxfull.com
https://textbookfull.com/product/python-projects-for-beginners-a-ten-
week-bootcamp-approach-to-python-programming-milliken/
textboxfull.com
Make Your Own Python Text Adventure: A Guide to Learning
Programming 1st Edition Phillip Johnson
https://textbookfull.com/product/make-your-own-python-text-adventure-
a-guide-to-learning-programming-1st-edition-phillip-johnson/
textboxfull.com
https://textbookfull.com/product/efficient-r-programming-a-practical-
guide-to-smarter-programming-1st-edition-colin-gillespie/
textboxfull.com
https://textbookfull.com/product/javascript-for-kids-a-playful-
introduction-to-programming-1st-edition-nick-morgan/
textboxfull.com
https://textbookfull.com/product/bite-size-python-an-introduction-to-
python-programming-1st-edition-april-speight/
textboxfull.com
by Lee Vaughan
San Francisco
IMPRACTICAL PYTHON PROJECTS. Copyright © 2019 by Lee Vaughan.
All rights reserved. No part of this work may be reproduced or transmitted in any
form or by any means, electronic or mechanical, including photocopying, recording, or
by any information storage or retrieval system, without the prior written permission of
the copyright owner and the publisher.
ISBN-10: 1-59327-890-X
ISBN-13: 978-1-59327-890-8
The following images are reproduced with permission: Figure 4-1 courtesy of the
Library of Congress; Figure 7-1 created by vecteezy.com; rat silhouette in Figure 7-2
created by vecteezy.com; door image in Figures 11-1, 11-3, 11-4, 11-5, and 11-6 created
by Dooder at Freepik.com; goat and moneybag images in Figures 11-1, 11-4, 11-5, and
11-6 created by Freepik.com; Figures 10-1, 10-7, 13-1, 14-21, and 15-1 from NASA;
satellite images in Figures 14-13 and 14-24 courtesy of www.aha-soft.com/; output in
Figure 12-5 supplied by ifa.com
No Starch Press and the No Starch Press logo are registered trademarks of No Starch
Press, Inc. Other product and company names mentioned herein may be the
trademarks of their respective owners. Rather than use a trademark symbol with every
occurrence of a trademarked name, we are using the names only in an editorial fashion
and to the benefit of the trademark owner, with no intention of infringement of the
trademark.
The information in this book is distributed on an “As Is” basis, without warranty.
While every precaution has been taken in the preparation of this work, neither the
author nor No Starch Press, Inc. shall have any liability to any person or entity with
respect to any loss or damage caused or alleged to be caused directly or indirectly by
the information contained in it.
For the Accidental Programmers, the Dedicated Non-Specialists, the
Dibblers and Dabblers: all the non-professionals who find themselves
writing code every day. May this help you on your way.
About the Author
Lee Vaughan is a geologist with more than 30 years of experience in the
petroleum industry. As the Senior Technical Professional for Geological
Modeling at a major international oil company, he was involved in the
construction and review of computer models; the development, testing,
and commercialization of software; and the training of geoscientists and
engineers. An advocate for nonprogrammers who must use
programming in their careers, he wrote Impractical Python Projects to
help self-learners hone their skills with the Python language.
About the Technical Reviewer
Jeremy Kun graduated with his PhD in mathematics from the
University of Illinois at Chicago. He writes the blog Math ∩
Programming (https://jeremykun.com/) and currently works on datacenter
optimization at Google.
BRIEF CONTENTS
Acknowledgments
Introduction
Chapter 1: Silly Name Generator
Chapter 2: Finding Palingram Spells
Chapter 3: Solving Anagrams
Chapter 4: Decoding American Civil War Ciphers
Chapter 5: Encoding English Civil War Ciphers
Chapter 6: Writing in Invisible Ink
Chapter 7: Breeding Giant Rats with Genetic Algorithms
Chapter 8: Counting Syllables for Haiku Poetry
Chapter 9: Writing Haiku with Markov Chain Analysis
Chapter 10: Are We Alone? Exploring the Fermi Paradox
Chapter 11: The Monty Hall Problem
Chapter 12: Securing Your Nest Egg
Chapter 13: Simulating an Alien Volcano
Chapter 14: Mapping Mars with the Mars Orbiter
Chapter 15: Improving Your Astrophotography with Planet Stacking
Chapter 16: Finding Frauds with Benford’s Law
Appendix: Practice Project Solutions
Index
CONTENTS IN DETAIL
ACKNOWLEDGMENTS
INTRODUCTION
Who This Book Is For
What’s in This Book
Python Version, Platform, and IDE
The Code
Coding Style
Where to Get Help
Onward!
1
SILLY NAME GENERATOR
Project #1: Generating Pseudonyms
Planning and Designing a Project
The Strategy
The Pseudocode
The Code
Using the Python Community’s Style Guide
Checking Your Code with Pylint
Describing Your Code with Docstrings
Checking Your Code Style
Summary
Further Reading
Pseudocode
Style Guides
Third-Party Modules
Practice Projects
Pig Latin
Poor Man’s Bar Chart
Challenge Projects
Poor Foreign Man’s Bar Chart
The Middle
Something Completely Different
2
FINDING PALINGRAM SPELLS
Finding and Opening a Dictionary
Handling Exceptions When Opening Files
Loading the Dictionary File
Project #2: Finding Palindromes
The Strategy and Pseudocode
The Palindrome Code
Project #3: Finding Palingrams
The Strategy and Pseudocode
The Palingrams Code
Palingram Profiling
Palingram Optimization
dnE ehT
Further Reading
Practice Project: Dictionary Cleanup
Challenge Project: Recursive Approach
3
SOLVING ANAGRAMS
Project #4: Finding Single-Word Anagrams
The Strategy and Pseudocode
Anagram-Finder Code
Project #5: Finding Phrase Anagrams
The Strategy and Pseudocode
The Anagram Phrase Code
Project #6: Finding Voldemort: The Gallic Gambit
Project #7: Finding Voldemort: The British Brute-Force
Strategy
The British Brute-Force Code
Summary
Further Reading
Practice Project: Finding Digrams
Challenge Project: Automatic Anagram Generator
4
DECODING AMERICAN CIVIL WAR CIPHERS
Project #8: The Route Cipher
The Strategy
The Pseudocode
The Route Cipher Decryption Code
Hacking the Route Cipher
Adding a User Interface
Project #9: The Rail Fence Cipher
The Strategy
The Rail Fence Cipher Encryption Code
The Rail Fence Cipher Decryption Code
Summary
Further Reading
Practice Projects
Hacking Lincoln
Identifying Cipher Types
Storing a Key as a Dictionary
Automating Possible Keys
Route Transposition Cipher: Brute-Force Attack
Challenge Projects
Route Cipher Encoder
Three-Rail Fence Cipher
5
ENCODING ENGLISH CIVIL WAR CIPHERS
Project #10: The Trevanion Cipher
Strategy and Pseudocode
The Trevanion Cipher Code
Project #11: Writing a Null Cipher
The List Cipher Code
The List Cipher Output
Summary
Further Reading
Practice Projects
Saving Mary
The Colchester Catch
6
WRITING IN INVISIBLE INK
Project #12: Hiding a Vigenère Cipher
The Platform
The Strategy
Creating Invisible Ink
Manipulating Word Documents with python-docx
Downloading the Assets
The Pseudocode
The Code
Importing python-docx, Creating Lists, and Adding a
Letterhead
Formatting and Interleaving the Messages
Adding the Vigenère Cipher
Detecting the Hidden Message
Summary
Further Reading
Practice Project: Checking the Number of Blank Lines
Challenge Project: Using Monospace Font
7
BREEDING GIANT RATS WITH GENETIC ALGORITHMS
Finding the Best of All Possible Solutions
Project #13: Breeding an Army of Super-Rats
Strategy
The Super-Rats Code
Summary
Project #14: Cracking a High-Tech Safe
Strategy
The Safecracker Code
Summary
Further Reading
Challenge Projects
Building a Rat Harem
Creating a More Efficient Safecracker
8
COUNTING SYLLABLES FOR HAIKU POETRY
Japanese Haiku
Project #15: Counting Syllables
The Strategy
Using a Corpus
Installing NLTK
Downloading CMUdict
Counting Sounds Instead of Syllables
Handling Words with Multiple Pronunciations
Managing Missing Words
The Training Corpus
The Missing Words Code
The Count Syllables Code
Prepping, Loading, and Counting
Defining the main() Function
A Program to Check Your Program
Summary
Further Reading
Practice Project: Syllable Counter vs. Dictionary File
9
WRITING HAIKU WITH MARKOV CHAIN ANALYSIS
Project #16: Markov Chain Analysis
The Strategy
Choosing and Discarding Words
Continuing from One Line to Another
The Pseudocode
The Training Corpus
Debugging
Building the Scaffolding
Using the logging Module
The Code
Setting Up
Building Markov Models
Choosing a Random Word
Applying the Markov Models
Generating the Haiku Lines
Writing the User Interface
The Results
Good Haiku
Seed Haiku
Summary
Further Reading
Challenge Projects
New Word Generator
Turing Test
Unbelievable! This Is Unbelievable! Unbelievable!
To Haiku, or Not to Haiku
Markov Music
10
ARE WE ALONE? EXPLORING THE FERMI PARADOX
Project #17: Modeling the Milky Way
The Strategy
Estimating the Number of Civilizations
Selecting Radio Bubble Dimensions
Generating a Formula for the Probability of Detection
The Probability-of-Detection Code
Calculating Probability of Detection for a Range of
Civilizations
Generating a Predictive Formula and Checking the Results
Building the Graphical Model
Scaling the Graphical Model
The Galaxy Simulator Code
Results
Summary
Further Reading
Practice Projects
A Galaxy Far, Far Away
Building a Galactic Empire
A Roundabout Way to Predict Detectability
Challenge Projects
Creating a Barred-Spiral Galaxy
Adding Habitable Zones to Your Galaxy
11
THE MONTY HALL PROBLEM
Monte Carlo Simulation
Project #18: Verify vos Savant
The Strategy
The vos Savant Verification Code
Project #19: The Monty Hall Game
A Brief Introduction to Object-Oriented Programming
The Strategy and Pseudocode
Game Assets
The Monty Hall Game Code
Summary
Further Reading
Practice Project: The Birthday Paradox
12
SECURING YOUR NEST EGG
Project #20: Simulating Retirement Lifetimes
The Strategy
Historical Returns Matter
The Greatest Uncertainty
A Qualitative Way to Present Results
The Pseudocode
Finding Historical Data
The Code
Importing Modules and Defining Functions to Load Data and
Get User Input
Getting the User Input
Checking for Other Erroneous Input
Defining the Monte Carlo Engine
Simulating Each Year in a Case
Calculating the Probability of Ruin
Defining and Calling the main() Function
Using the Simulator
Summary
Further Reading
Challenge Projects
A Picture Is Worth a Thousand Dollars
Mix and Match
Just My Luck!
All the Marbles
13
SIMULATING AN ALIEN VOLCANO
Project #21: The Plumes of Io
A Slice of pygame
The Strategy
Using a Game Sketch to Plan
Planning the Particle Class
The Code
Importing Modules, Initiating pygame, and Defining Colors
Defining the Particle Class
Ejecting a Particle
Updating the Particle and Handling Boundary Conditions
Defining the main() Function
Completing the main() Function
Running the Simulation
Summary
Further Reading
Practice Project: Going the Distance
Challenge Projects
Shock Canopy
The Fountainhead
With a Bullet
14
MAPPING MARS WITH THE MARS ORBITER
Astrodynamics for Gamers
The Law of Universal Gravity
Kepler’s Laws of Planetary Motion
Orbital Mechanics
Project #22: The Mars Orbiter Game
The Strategy
Game Assets
The Code
Importing and Building a Color Table
Defining the Satellite Class Initialization Method
Setting the Satellite’s Initial Position, Speed, Fuel, and Sound
Firing Thrusters and Checking for Player Input
Locating the Satellite
Rotating the Satellite and Drawing Its Orbit
Updating the Satellite Object
Defining the Planet Class Initialization Method
Rotating the Planet
Defining the gravity() and update() Methods
Calculating Eccentricity
Defining Functions to Make Labels
Mapping Soil Moisture
Casting a Shadow
Defining the main() Function
Instantiating Objects, Setting Up Orbit Verification, Mapping,
and Timekeeping
Starting the Game Loop and Playing Sounds
Applying Gravity, Calculating Eccentricity, and Handling
Failure
Rewarding Success and Updating and Drawing Sprites
Displaying Instructions and Telemetry and Casting a Shadow
Summary
Challenge Projects
Game Title Screen
Smart Gauges
Radio Blackout
Scoring
Strategy Guide
Aerobraking
Intruder Alert!
Over the Top
15
IMPROVING YOUR ASTROPHOTOGRAPHY WITH PLANET
STACKING
Project #23: Stacking Jupiter
The pillow Module
Working with Files and Folders
Directory Paths
The Shell Utilities Module
The Video
The Strategy
The Code
The Cropping and Scaling Code
The Stacking Code
The Enhancing Code
Summary
Further Reading
Challenge Project: Vanishing Act
16
FINDING FRAUDS WITH BENFORD’S LAW
Project #24: Benford’s Law of Leading Digits
Applying Benford’s Law
Performing the Chi-Square Test
The Dataset
The Strategy
The Code
Importing Modules and Loading Data
Counting First Digits
Getting the Expected Counts
Determining Goodness of Fit
Defining the Bar Chart Function
Completing the Bar Chart Function
Defining and Running the main() Function
Summary
Further Reading
Practice Project: Beating Benford
Challenge Projects
Benfording the Battlegrounds
While No One Was Looking
APPENDIX
PRACTICE PROJECT SOLUTIONS
Chapter 1: Silly Name Generator
Chapter 2: Finding Palingram Spells
Chapter 3: Solving Anagrams
Chapter 4: Decoding American Civil War Ciphers
Chapter 5: Encoding English Civil War Ciphers
Chapter 6: Writing in Invisible Ink
Chapter 8: Counting Syllables for Haiku Poetry
Chapter 10: Are We Alone? Exploring the Fermi Paradox
Chapter 11: The Monty Hall Problem
Chapter 13: Simulating an Alien Volcano
Chapter 16: Finding Frauds with Benford’s Law
INDEX
ACKNOWLEDGMENTS
The Code
Every line of code is provided for each project in this book, and I
recommend you enter it by hand whenever possible. A college professor
once told me that we “learn through our hands,” and I have to agree
that keying in code forces you to pay maximum attention to what’s
going on.
But if you want to complete a project quickly or you accidentally
delete all your work, you can download all of the code, including
solutions to the Practice Projects, from
https://www.nostarch.com/impracticalpython/. This site also contains the
book’s errata sheet, in the event of future updates or changes.
Coding Style
This book is about problem solving and beginner-level fun, so the code
may deviate at times from best practices and peak efficiency.
Occasionally, you may use list comprehension or a special operator, but
for the most part, you’ll focus on simple, approachable code that’s easy
to learn.
Keeping things simple is important for the programming
nonprogrammers who read this book. Much of their code may be
“Kleenex code”—used once or twice for a specific purpose and then
thrown away. This is the type of code that might be shared with
colleagues, or thrust upon them during staff changes, so it should be
easy to pick up and understand.
All of the main project code is annotated and explained in a stand-
alone manner, and it generally follows the style recommendations from
Python Enhancement Proposal 8, otherwise known as PEP 8. Details on
PEP 8, and software to help you honor these guidelines, are in Chapter
1.
Onward!
Thanks for taking the time to read the Introduction! You clearly want to
get as much as possible from this book, and you’re off to a good start.
When you reach the other end, you’ll be more adept at Python and
better prepared to solve challenging real-world problems. Let’s get to
work.
Other documents randomly have
different content
“No.”
He turned to go up the staircase, but she caught him back with a little
cry.
“Dick, why aren’t we like we used to be?”
He looked at her almost with dislike. “Isn’t it late for psychological
discussion? What do you mean?”
She faced him with the question which was clamoring in her mind,
tugging at her heart all the time.
“Dick—do you love me?”
It jarred on him unspeakably—this forcing of emotion.
“Isn’t that rather an unnecessary question?”
“I’m afraid it isn’t.”
“I wish you wouldn’t be so high strung all the time, Cecily. I realize
you’ve had a bad time lately; in fact, it seems to me you’ve had a bad time
ever since we were married. But it does wear on me—this atmosphere of
tragedy.”
“Then why must we have it? It wasn’t like that when we were first
married.”
He took an impatient turn up and down the room.
“No. But you can’t maintain a honeymoon attitude all your life, my dear.
I don’t suppose we feel the same way towards each other as we did then.”
That hurt. “But why don’t we?”
“Why, we’re older; people’s emotions cool naturally.”
“But they shouldn’t if they love one another.”
“There you go, you see. You want to have everything your way. You
want to force things. You don’t let life be natural, Cecily. You’re too
romantic.”
The tears in her eyes only irritated him. He went on, thinking that it
might be as well to have it out with her.
“I don’t want to be unkind, but you have the most artificial view of
things sometimes. You can’t tolerate any thing or person that isn’t on a
pedestal.”
“No, it isn’t that, Dick. I just hate to see things slip into cheapness.”
“But almost everything normal to you is cheap.”
“No! All I want is to have you love me and the children—be content
with us.”
“You’re quite absurd, Cecily. I love the children as much as any man
could. If it’s hard to love you it’s because you scare me off by frowning
upon every harmless diversion—by wanting to shut us up together. That
isn’t the way people live nowadays. Marriage isn’t prison. The trouble with
us is that we aren’t congenial in our pursuits. You like one kind of thing. I
like another. And you won’t admit my kind of thing at all.”
“I don’t want marriage to be prison, but if marriage is anything surely
it’s the concentration of two people on making a home and bringing up their
children.” She couldn’t add love.
“It’s a lot more than that nowadays, Cecily. I suppose that used to be all
that was expected of a woman—having her children and keeping her house
clean. Now things have broadened. Men need more, ask more; so do most
women.”
“I suppose,” said Cecily, coldly, “what you mean is that men want a lot
of noise and dissipation and promiscuous flirtations, and that they expect
their wives to tolerate and join them in such things.”
The scorn in her voice drove Dick on. “Well, perhaps the woman who is
willing to do that gets away with marriage better than the woman who
clings to an outworn domesticity. I know your scorn of Della—and of girls
like Della and Fliss. We aren’t any happier than Fliss and Matthew, or Della
and Walter.”
Cecily became purely instinctive. She burst into tears and tried to talk
through them.
“Then the fact that I have three children and they have none doesn’t
make any difference to you?”
“The children are beside the point. I’m glad we have them; so are you.
But you can’t justify everything, excuse all unhappiness, swallow yourself
up, even in children. For God’s sake be reasonable, Cecily. Stick to the
point at issue.”
But she couldn’t. She lost her case, sadly undeveloped as it was, by her
rapidly mounting hysteria. It ended by her being put to bed, being soothed
by Dick, assured of things which he didn’t mean in his heart and which she
knew he didn’t mean—by the sleep of exhaustion and day of shamed
apology which followed for both of them.
CHAPTER XXI
I T could not last too long after that, but they ran the whole gamut of
possible moods. There were times when the antagonism between them
seemed to one or the other so intangible, so imaginary as to be ludicrous;
days when the air seemed cleared of dissension and unhappiness; any
incident could alter the whole shape of things for them. Some new delight
in the progress of the children, some anniversary which it seemed too cruel
to let pass in anger, would make them both happy. But they never quite
relaxed, never quite felt faith in each other. And the most trivial thing could
upset their balance—a fancied slight, a casual statement which was
translated into a criticism. On their guard constantly, neither of them felt
peace.
The days were absorbing for Dick just at this time, too. In July Matthew
had unexpectedly yielded to the pressure upon him to become a candidate
for United States Senator to fill the unexpired term of the incumbent who
had just died. He had refused many political honors and opportunities
before, but this time the political situation looked so black that he could not
justify refusal. He knew his usefulness well in a state where blind
conservatism and dangerous dissatisfaction were in constant ferment; and
his acquaintance and high standing among all kinds of men made his
nomination fairly certain. But his decision left Dick alone and depressed. It
was not that he did not approve of Matthew’s action, but that they had come
to depend upon each other more and more in business. They had worked out
the development of the mines together lately. With Matthew away for even
a part of the year, responsibility would fall very heavily on Dick, and things
were far from satisfactory. A spreading sense of loneliness encompassed
Dick. He tried to satisfy himself in the children, but an hour’s play with
them, refreshing and delightful as it was, did not give him all he sought or
all he needed. Gradually there came silent moods in which he spent most of
his hours of relaxation and which were only broken by a plunge into
business or into the midst of some noisy party at which Cecily might or
might not join him. It did not matter whether she did or not. He was tied to
the sense of her instinctive criticism of many of the things he liked and she
to her sense of failure.
They were both much interested in Matthew’s campaign. That gave them
something to talk about and something to focus a mutual interest upon. But
Cecily was suffering even more from a fear of Matthew’s departure than
was Dick. Since her mother had died, she, like Dick, had been lonely, but
that did not help them to find refuge in each other. Matthew and, curiously
enough, Ellen, were the only people in whom Cecily felt there was
comprehension of her and approval. She had one conversation with Mother
Fénelon when she and Dick reached the breaking point.
“There’s no reason for this,” said Mother Fénelon. “You are a good
woman and your husband is a good man. You have duties to each other.”
“Virtue and duties are the least part of marriage to-day, Mother Fénelon.
You can’t manage with just those things. You have to use the modern
methods. It’s a science to-day to have a husband.”
“Marriage is what it always has been.”
“I’m afraid not. It’s altered with the jazz band and the servant problem
and the ‘keep young’ crusade.”
There was more, but to no purpose. The break came immediately after
Matthew’s election. Reaction helped perhaps, as did the fact that little by
little every one had come to guess that the young Harrisons were unhappy
and Della and Madeline and others had come to give Cecily advice.
“You’ve humiliated me beyond all decency,” Cecily told Dick bitterly.
“There’s no dignity, no privacy left between us.”
“Then I’d better go,” answered Dick.
She weakened then, but it was all useless and in her mind she knew that
Dick must go, that they could not keep on this rending life, which was
exhausting them both. Dick went to his club. He wanted to leave the city,
but with Matthew’s departure imminent he couldn’t. And with Dick’s
definite action bruited about, the young Harrisons became the favorite topic
for discussion—discussion which carried its probing back to tales of the
first unhappy marriage of Mrs. Warner and made strange and foolish
deductions.
Mr. Warner, after listening for an hour to Della, who brought the news
home and philosophized extempore on just what Cecily’s mistake had been,
took his hat and proceeded to Cecily’s house. It was the day on which the
few personal effects which Dick needed had left the house. She met her
stepfather in the living-room, rising from a dusky corner where she was
sitting with her hands in her lap, strangely idle. The soft white silk of her
dress was hardly whiter than her face.
Mr. Warner put his hat and cane down slowly and went towards her,
taking both her hands.
“My poor Cecily.”
She did not show any sign of collapse or tears. It seemed to him that she
was broken, but the impression did not come from her appearance or her
voice.
“Dick thought he’d better go.”
He sat down and tapped on the arms of his chair, an old man habit that
had come over him lately.
“Do you want a divorce from Dick, Cecily?”
“Not now. Neither of us wants that now. We’re too—raw.” She
shuddered.
“And you’re going to live here alone?”
“Here, with the children.”
“How is Dick going to do without the children?”
“I think he can. He can’t bear living with me for the sake of them and I
must have them.”
“Ah, Cecily, this won’t last. You and Dick are a pair of naughty children.
I’ve a notion to go down to the club and bring him home by the ear.”
Cecily stiffened. “Promise me you won’t do anything like that! Don’t
make it begin all over again now. We’ve tried and tried, and we can’t.”
“But what is it? Is this nonsense Della talks about Dick’s wanting to go
out more and your refusing the actual reason you’ve dared to break up your
home?”
“That’s what people will say,” answered Cecily, “but of course that’s just
a symptom of what’s the matter with us. The trouble is that we don’t think
marriage means the same thing; we don’t mean the same thing by it. And
every outward expression of my idea jars on him—and his on me. We’ve
become angry and furtive and quarrelsome and condemning.”
“And yet I’ll bet you will be reconciled within a month. Perhaps sooner.
It may be that this little separation is just what you both need to straighten
out all this trouble.”
“Reconciled! Reconciled!” repeated Cecily. “We’ve been reconciled a
dozen times in the past year. No, father, that won’t do it.”
He sat silent for a while and she watched from the window in a strange,
still way.
“It’s not right nor necessary. I wish your mother were here.”
“I wouldn’t like her to see me a failure,” said Cecily with that note of
complete depression.
“Don’t be foolish. You’re not a failure. How could any one with three
fine, husky children be a failure?”
“It’s not enough to make success.”
She rose after a little and offered him a cigar.
“Some Dick left.”
“He’ll be back after them,” said Mr. Warner.
She smiled, but it was a tragic little smile.
“You’ll have to smile better than that for the children.”
“I will—for them.”
“Then why not for Dick?”
“Dick doesn’t care for me.”
“Dick does.”
She gave the dreariest little gesture of negation.
“You and your mother are curiously alike, Cecily.”
“No.”
“I have often wondered,” he went on ruminatively after a moment, “if
there wasn’t something of a case for Allgate Moore. Of course he treated
your mother badly. She never even told me about it, but we all knew. After I
married your mother—and I was an older man with somewhat cool
judgments, my share of discretion and years of experience—I wondered
about him sometimes. Because I had a hard time understanding your mother
and a hard time being good to her.”
“But you were good to her.”
“After I had learned how; after I had studied and planned how, so that I
might not shock her or frighten her or disgust her or hurt her. You are like
her—fastidious, delicate minded, not delicate only in mood, but delicate
always. You like fine things and beautiful things. So do most men, but most
men like other things too. Your mother could not tolerate in any one what
was unbeautiful or coarse—many human things.”
“But she could, for she told me to be tolerant.”
Mr. Warner moved a little in the shadow which had fallen on his chair.
“That’s what I taught her,—what I tried to teach her so that contacts
would not be too hard for her.”
“What if contacts are hard? Isn’t it better to preserve truth, to live
according to beauty—not to be cheap? I know how silly, how common it all
sounds, will sound; the things they will say about Dick and me. But it isn’t
true that trivialities have made the trouble. It’s big things, basic things. I
don’t want to compromise with an age that seems all wrong in its standards.
I can’t bear to form myself on people like Della and Fliss.”
“It wouldn’t do you any good to try that,” said Mr. Warner with a
chuckle, “but I wish, my dear, that your humor was a little nearer the
surface and that it could come to your assistance when you are unhappy as
well as when you are happy.”
“It’s queer about that. I can only see things black and white—happy or
sad. It’s a great drawback. Sometimes I try to pretend, but it’s always so
easy to see through my pretense.”
Mr. Warner was pursuing his previous line of thought.
“You and your mother are such women as foster the ideals men have
about women—if they have any—making ideals for the home which every
man treasures or respects. But it’s hard for men to live by their ideals alone
and you demand that.”
“I don’t understand it at all,” said Cecily, wearily, “why an effort to keep
things close to the ideal men promise you before they marry you should end
in failure.”
“If it is failure; but I don’t believe it is. I don’t think you’ve hit the real
reason for it. Cecily, is there any third person involved in this?”
“Woman, you mean?”
He nodded.
“Not in the way you mean. We disagree awfully over one woman whom
Dick admires,—Fliss Allenby.”
“He’s not in love with her.”
“No. That makes it all the worse. If he were you could understand his
taking up her defense every time a criticism of her is made. But as a matter
of fact he prefers even her—for whom he doesn’t care and whom I can
remember his scorning when I first took her up after we were married—to
me. He prefers almost anything to me.”
“Don’t get bitter, Cecily.”
“I didn’t know what that word meant except abstractly seven years ago.
Now it seems to express me.”
“Nonsense. Turn on the lights, my dear. We’re too gloomy.”
The conversation became more practical.
“Have you made any money arrangement with Dick?”
“I don’t want any money from Dick. If he’s not living with me, I don’t
want his money. I couldn’t bear to touch it.”
“That’s quixotic, my dear, but if you won’t take his, you must let me
help.”
“I’ve a little of my own, you know,” said Cecily.
“As I remember, very little.”
“Three thousand a year. Lots of people live on that.”
“How much have you and Dick been spending?”
“About twenty-five thousand. But that was with cars and all sorts of
luxuries. We’ll just do without those and I won’t need new clothes for a
long time, nor will the children.”
“And when you do?”
“Well, we’ll have to do without them. Or maybe I could earn some
money. Anyway I will not touch Dick’s money and I won’t take yours
either, father, please. I couldn’t let you support me—and Della.”
“Cecily!”
“That was horrid, wasn’t it? Well, please let me get along as best I can.
Let me be honest with myself.”
“You are making it so hard for Dick.”
“Yes. He seemed to take that part much harder than any other. It was the
only thing that really seemed to worry him—not to be able to salve things
over with money. If he sends me money, I shall send it back.”
Mr. Warner rose.
“I’m going now, my dear. I can’t tell you how sorry I am about this or
how convinced I am that it won’t last. I want you to let me help you. I want
to come and talk to you now and then.”
“Yes, please do that. I shall be lonely once in a while,” she said bravely.
“You don’t mind all the silly talk?”
Cecily shrugged. “I shan’t hear it. No, I don’t think I do, except for Dick
a little.”
“Would you like to go away for the rest of the year?”
“I thought of that, but it doesn’t seem wise to take the children away just
now. And that, too, would be expensive.”
Mr. Warner went down the street slowly, tapping the darkened pavement
with his cane.
T HERE was no doubt that at the start the break meant peace to Cecily.
That was what surprised her so much. She had tortured herself in
advance with the thought of those nervous stresses which she imagined
would follow Dick’s leaving. But they did not materialize. There were a few
very bad nights at first. Then came a sleep of exhaustion and after that a
night when to her surprise she slept naturally and although, when she woke,
the sick feeling of impending trouble and past trouble was still upon her,
she was rested. There were hours of choking hysteria when it took more
courage than she had ever guessed she had to keep from seeking Dick out,
begging him to come back—on any terms—only to relieve the terrible
loneliness without him. Days when she felt strangely light and queer and at
the end of things as if the emptiness of her soul were swallowing her up;
days when the sight of her own strange, strainedly sad eyes and thin face
horrified her. The physical pain and exhaustion which went with the mental
struggle seemed sometimes unbearable. The children looked strange and
seemed remote at times. And yet, little by little, usage, duties, routine began
to pull her back to normal. Her emotions wore themselves out battering
against her resistance and she commenced to live again.
Half life, she told herself, without sparkle, with no joy, but none the less
ordered. She commenced to read a little and the ability to focus her mind on
an impersonal situation came back. Reading was almost her only diversion.
The few people whom she saw at her own home were her only companions
and the only two of those who gave her real companionship were her
stepfather and Agatha Ward, whose literary modernism had a kind of solace
in it because it grouped her case with so many others. Not that she talked
about her trouble to Agatha, but Agatha talked of life and of strange, new,
shifting points of view to her. If Agatha had a point of approach to all the
currents of life other than that of analysis she never showed it. Under her
touch Cecily was able now and then to depersonalize herself, see herself as
a “case”—as a situation created by the turmoil of modern things—and it
invariably gave her some comfort. The moments of intellectual broadening
did not last, but they helped.
Matthew she had not seen. He had written her a note which was brief
and careful, asking her if there was anything that he could do for her and
she had replied briefly:
“Nothing, thank you, Matthew. There is nothing for any one to do except
be sorry for the fact that we are not always brave and wise. Come to see me
when you can. Talking to you always helps me. Faithfully yours, Cecily
Harrison.”
Matthew read that note again and again and then, not putting it into his
pocket, perhaps for fear of the mocking eye of Fliss, he tore it across and
dropped it thoughtfully into the wastebasket. He did not go to see her at
once.
So with the routine, the care of the house and the increasingly interesting
children, a month wore on. At the end of the month a letter from Dick came,
enclosing a check for her usual allowance. She sent it back with a note
which she tried to make not too curt, reiterating that she must live on her
own money and that she had plenty. Then she went into her own room and
there, with her check book and a pencil, made various budgets to figure out
just how she could manage to cut her expenses to a fourth of their usual
amount. That, it appeared, must be done—or if not she would have to take
money from Dick or her stepfather. She wouldn’t do that, she was resolved.
The decision not to take Dick’s money helped her self-respect enormously.
If he was not to live with her she was not going to be supported by him.
Dick’s incensed, insulted arguments on that point—that he had a right to
support his children and that she had no right to prevent him—made no
impression on the fixity of her decision.
“I couldn’t do it, Dick,” she told him, as they were trying to have a
“calm” discussion a few days before he went. “Don’t you see that it would
be shameful? You’re getting nothing from me—nothing from the children
and there’s something in taking money from a man with whom you aren’t
living that puts you in a sordid class.”
“But I did get so much—I did get everything——”
“You don’t owe anything for that; please don’t drag money into it, Dick.
I couldn’t—I couldn’t ever take it. Love is a gift; children are a gift; you
can’t settle for them in——”
“I’m not trying to,” cried Dick, “but don’t you see that for you and for
them to get along without things that they have a right to have is
ridiculous!”
But she was stubborn. She sent back his first check without an instant’s
thought of changing her position, although expenses already were
beginning to trouble her. That strength which her mother had known was in
her had already begun to bolster up her actions and her resolves.
She took counsel with Ellen.
“Do you think that if I did the upstairs work and took all the care of the
children we could get along with just you and a laundress? Now that the
family is smaller and since we shall be very quiet we might be able to
manage it, don’t you think so?”
“I’d be glad,” said Ellen. “There’s not so much work as there used to be
and now that you are taking so much care of the babies those nurses have
time heavy on their hands.”
So the nurse and the housemaid problem was solved for Cecily by her
getting along without them and the extra activity which was necessary for
her helped her to fill many hours which might have been terribly
disconsolate. That saved a hundred dollars a month for her.
She scraped her budget closer and closer. Cards from exclusive shops
showing children’s clothes or gowns for herself went into the wastebasket.
She went to the public library instead of to the booksellers for her books.
Yet, in spite of all she tried to do and all she actually did accomplish she
could not cut far enough to make her little income cover expenses. She was
running behind at the end of the first month. Recalculations made her do a
little better for a week after that. Then the baby had a week’s illness of no
particular seriousness, but Cecily found herself confronting a presumable
bill from the child specialist which would throw her budget into chaos
again. She used the thousand dollars her father had given her for Christmas
to bring her checking account up to normal and that exhausted her cash
reserves.
There was a certain interest and pleasure in working it out, however.
Work was almost her only refuge and it was one which she sought with
redoubled interest and comfort constantly.
The mind which had been latent for so long began to develop as it was
trained upon real problems and as she made herself independent, her own
protector and her own refuge.
The moments when she was panic-stricken for want of a refuge—when
she needed Dick or her mother to solve things, to smooth life over—became
fewer and fewer. It amazed her to find how dependent she had been, to see
how many things Dick had taken off her hands. That he still wanted to do
them she knew, for there were rather pathetic attempts to pay garage bills; a
watchdog was presented to her by her father, but she somehow guessed
from the phrasing of the note that came with it that it had been Dick’s
thought and that her father wanted her to know it. Such things hurt. It
wasn’t that it made her feel more hopeful about herself and Dick. But she
usually wanted to feel that Dick was happy and benefited by leaving her,
and such things made her wonder. Then in the bitter, contradictory hours
when she did not want him to be happy and when the resentment at the
wreck of her own happiness scourged her, she was angry that he should
attempt even anonymous courtesies.
After a little the moods grew less bitter. But one bitterness never grew
less. The sight of such frivolities as had wrecked Dick and herself, the
mention of them, the sight of the people involved in them—could always
bring back a rush of poison through her mind. That had cut her off
completely from Della. Her mother’s house had changed. It was no longer
the spacious, comfortable, somewhat quiet house of Mrs. Warner’s
planning, at least not to Cecily, though a casual observer would have
noticed few changes. Della had pervaded the house with herself. At first
Cecily made a protest here and there, but her protests were against trifles
and it was impossible to explain to her stepfather or to Walter why little
things like irregular hours for meals, like the careless and indiscriminate use
of linens (Della could not waste her time over a lot of sheets and pillow-
cases, she said), were a violation of her mother’s spirit. Cecily felt that the
men thought her trivial and she soon came seldom to the house now ruled
by Della, except to bring the children to see Mr. Warner. Walter and she
were rather definitely estranged. She came in one morning at eleven o’clock
to find Walter eating breakfast in a bathrobe, weary, red-eyed and unshaven.
He explained crossly and with an aggressive note of defense that they had
been up until all hours. Cecily was silent and her glance as she looked at
him and the disordered breakfast room was only discouraged, but it must
have shamed Walter into bravado.
She was standing there when Della came in. Della was wearing an
extravagant negligee and looking untidy, but delightfully pretty. At sight of
Cecily she threw up her hands.
“Good Heavens, Cecily, this is no morning for you to drop in and catch
us at our worst. We’ll shock her, Walter. Now don’t you scold him, Cecily.
He was tired and I let him sleep.”
She settled down on the arm of Walter’s chair and he pushed back from
the table, pulling her down into his arms. Disheveled and laughingly
protesting, Della let him hold her. Cecily turned away, trying to be light.
“Too domestic a party for me. I only wanted to see if I could find the
second volume of a novel father lent me. I’ll hunt for it?”
“Go ahead. Try his room if it isn’t in the library.”
Cecily left them and with the closing of the door, Della settled herself
more comfortably.
“I think we really shocked her, dearie.”
“Nonsense,” said Walter, looking down at the bundle of lace and ribbons
which should have been so alluring. “Nonsense.” He passed a hand over his
chin and kissed her without much interest. “Get up, honey; I’ve got to get
dressed.”
It was such little things which isolated Cecily. She did not go to her
father’s house again for weeks. She was apologetic for being a drawback
and yet she could not enter into so many of the things the others made their
habits. The knowledge, too, that Della felt that Cecily had made a mess of
things and that all her sympathies were with Dick kept her away. The
thought of Della as her critic was intolerable to her pride.
Shut off from her own family, she was equally shut off from Dick’s
mother. Mrs. Harrison had been away at the time of the actual break and she
was humiliated by it all. Most seriously of all was she hurt by the fact that
Dick had gone to his club and not home to her. When he did come to her he
absolutely refused to discuss the situation. So Mrs. Harrison went to Cecily
and found it equally hard to get information from her.
“You’re the talk of the town—you and Dick—and both of you mute.
What is the trouble? Has Dick been misbehaving himself?”
“No,” answered Cecily. “No, indeed, Mrs. Harrison. It is just that we
don’t seem very happy and I thought—we hoped it would be better for us if
we separated.”
“But without a reason!”
“We don’t agree about marriage. It’s so impossible to explain.”
“Is this stuff I hear about your refusing to go into society true? Or is it
true that Dick is enamored of this Mrs. Allenby?”
That struck fire. “It is quite true that Dick and I did not agree about the
kind of society we cared to enter. What there is in any feeling for Mrs.
Allenby is really for Dick to say, Mrs. Harrison.”
“It’s ridiculous. He’s not in love with that young woman.”
“He prefers her type of woman to what he calls the domestic type,”
answered Cecily coldly. There was nothing in this little woman, so annoyed
about scandal, to excite any pity or kindly feeling in her at all.
Mrs. Harrison rose, tapping her fingers nervously on her bag.
“It’s an extremely unfortunate situation. I would be prepared to give you
every support, Cecily, if I believed that Dick had misbehaved himself at all.
But if you have thrown him over, broken up his home for the sake of a—a
theory, it is one of the most cruel and unnecessary things I have ever heard
of. Men are men. They demand a little amusement. If you refuse to allow
him that you must expect——”
“Please, Mrs. Harrison. There’s nothing to be gained by all this, surely.”
The little woman drove off, her angry, alert little head looking straight
ahead through the window of her limousine.
“Didn’t Grandmother Harrison bring me anything?” asked Dorothea,
running in a little too late to speak to her grandmother.
“Not to-day, dear. She was in a hurry.”
“She nearly always does,” said Dorothea, with some disappointment.
Cecily regarded her daughter with some worry as she climbed up to see
if she could catch a glimpse of the departing car from the window. She
often wondered how she was going to explain all this to the children. Would
they understand or would they, like Della, blame her, or, like Mrs. Harrison
and her father, think she was foolish?
“But I didn’t do it,” she protested to herself. “It was Dick who insisted. I
couldn’t keep him from going. Unless I was willing to throw everything in
life which seems worth while to me into the discard. Everything that is
worth while to anybody. The standards of life that must be maintained.” She
thought of Della, a mass of provocative lingerie. She did not want this
sturdy little figure in blue linen to grow up to be like that. If one had to give
up everything to prevent Dorothea’s becoming like that, it was worth it. The
extravagance of her conclusions did not strike her as false just then. She
topped her sacrifice with some self-glorification, and taking Dorothea out
into the garden, played with her until dinner time.
But in the empty evening she found the self-glory fading. She was alone.
She had failed.
It was often like that.
CHAPTER XXIII
M RS. HORTON’S death came just before the time when Matthew had
planned to leave for Washington. A succession of complications had
hastened it. Three days before it came, Fliss knew that it was
imminent and she spent those days sitting beside her mother for long
periods, her face white and drawn, but her courage sustained as it always
was in a crisis.
Death seemed on no great errand here in this shabby little flat, breaking
no heart, effecting no terrible cleavage. Yet the solemnity of the struggle
was not altered by the fact that it was only a commonplace, middle-aged
woman who was fighting for the chance to keep on going to the moving
pictures, gossiping, living in trivialities. Death, disregarding human
gradations of importance, was choosing this soul gravely, solemnly. And
Fliss, shivering a little by her mother’s bed, watched and learned, and
perhaps in her quick, practical way got a firmer grip on life from this first
intimacy with death.
She would have nothing to do with the funeral arrangements. Until the
end she had stayed by her mother, but after it was over and her mother was
gone, Ellen and Mrs. Ellis managed the details of burial. Mr. Horton
remained unobtrusive. Vaguely encouraging his wife, he had also stayed
beside her and she had turned to him rather than to Fliss. Later he went out
and bought a box of red carnations, giving them to Ellen to arrange near his
wife.
“She always liked carnations,” he said.
Fliss was very gentle to him and very anxious to make him comfortable,
but it was soon clear to every one that the boarding house where Mrs. Ellis
lived and where a remnant of friends of his early married life still stayed
was the best solution. He obviously preferred it so and Mrs. Ellis had him
under her charge. In two weeks there was nothing left of the Horton
household in the flat, and Fliss, her spirits rising in their characteristic way,
made her plans for Washington and prepared to close her own house. She
did not see much of Matthew now, for he was absorbed in work that kept
him busy night and day. Much of it she knew was with Dick, but Dick did
not come to her house. They had met once or twice in Matthew’s office
when she had gone in to see her husband, but that was all. Dick had been
carefully casual in his manner, and Fliss flippant as usual. To see the three
of them together for those few moments would never have been to guess at
the clashes and attractions which were between them.
If Fliss wondered whether Matthew had seen Cecily and deliberately
kept herself from inquiring, she was rewarded by his asking her one night a
week before their departure, “Shall we go to see Cecily for a moment to-
night?”
Knowing what he wanted and expected, she answered as he would wish.
“Can’t. I have a caller. But you go.”
He said nothing more. After dinner, though she tried to detain him in
spite of her permission, he went out early. Fliss frowned a little and then
prepared to receive her caller.
CHAPTER XXIV
CHAPTER XXV
W INTER came early that year. Even in November the cold was steady
and relentless. Cecily felt her isolation more as she was shut up with
her children in the house, except for their periods of exercise. She
dreaded the winter, especially the approach of Christmas, and the long
winter evenings, which seemed so endless after the children were abed,
dragged wearily—reading and reading, learning things, thinking things
which her limited activities gave her no chance to put into practice. She had
passed the point where she was in agony about her own troubles. Every
book, every newspaper told her of tragedies much worse. And resolutely
she tried not to think of Dick, although the news of him filtered through to
her now and then. Some one had sent her a marked newspaper, the kind of
paper to which she had no ordinary access, reeking with gossip and scandal.
She did not want to read it, but of course she did, and in the smirking,
veiled allusions, all nameless, she gathered that her story had filtered
through to the public. She heard through Della that Dick was “going a
pace.” She knew from the daily papers that he must be having trouble in the
mining country. The winter had come early there, too, and the price of food
and fuel had soared, fanning into a flame of irritation the discontents which
were always smoldering. There were petty strikes already, with the threat of
a big one hanging fire all the time. Cecily wondered how Dick was going to
tackle all these problems with Matthew away, especially if he were not
living well. It surprised her to find that the personal rancor at the
intimations of Dick’s wildness did not arise. What she felt was rather this
vague uninformed worry about his ability to handle these big affairs if he
were in bad shape. She knew that he and Matthew were rich themselves, but
that they had no great standing in comparison with the great financiers of
the country who had tied up enormous sums of money in these mining
ranges. Her stepfather told her that Dick had his hands full. She hated to ask
further, telling herself that she had deliberately made it none of her
business. But she searched the papers for news, none the less.
Allenby, the little town named for Matthew, where Dorothea had been
born, seemed to be one source of trouble. She wondered sometimes if Dick
went there often and if, when he passed Mrs. Olson’s gaunt little house, he
remembered the time she had spent there. That reminded her of Fliss again.
Her father and Della had asked her to spend Christmas with them, but
she could not make up her mind to do that. The children were to have a
Christmas with the kind of spirit she wanted, even if it would revive all
sorts of painful memories for her. She had decided that and Della had
shrugged her pretty shoulders and regretted and said that she and Walter
would be sorry, for Gerald was going to a house party and wouldn’t be
home and that they wouldn’t bother with a tree if Cecily wasn’t coming and
that she thought that she would give Walter a bathrobe and that she thought
further that Walter was going to get her a platinum wrist watch, which she
knew he couldn’t afford but which she wanted “awfully.” Cecily thought he
probably would. Little use as she had for Della’s methods she was
reluctantly and truthfully admitting that Della had a way of keeping Walter
happy. It reminded her of Fliss’s way with Matthew. Both of them put their
husbands in the foreground, flattered them, coaxed them, played with them.
And as Matthew had been amused and relaxed by such treatment, Walter
was amused and impassioned. He quarreled with Della. That Cecily knew.
But they could quarrel one hour and be absolutely and publicly enamored of
each other during the next. The catastrophe of Walter’s marriage had
somehow not come to pass. And the bitterest drop in Cecily’s cup was that
she, who held marriage in deeper respect than either Della or Fliss, had
been the only one of the three whose husband was left desolate and alone.
Walter was working hard to make money for his Della. In spite of late hours
and concentrated excitement he was making good in his father’s business.
While Fliss was in Washington sending back or having sent back little items
to adorn the social pages of Carrington’s newspapers already. “Senator and
Mrs. Allenby were in attendance at” this and that function. Odd how Cecily
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.
textbookfull.com