Introduction to Computation and Programming Using Python with Application to Understanding Data 2nd edition Edition Guttag - The latest ebook edition with all chapters is now available
Introduction to Computation and Programming Using Python with Application to Understanding Data 2nd edition Edition Guttag - The latest ebook edition with all chapters is now available
https://ebookfinal.com/download/practical-programming-an-introduction-
to-computer-science-using-python-3-second-edition-paul-gries/
https://ebookfinal.com/download/introduction-to-scientific-
programming-and-simulation-using-r-2nd-edition-owen-jones/
https://ebookfinal.com/download/programming-python-with-cd-2nd-
edition-mark-lutz/
https://ebookfinal.com/download/head-first-programming-a-learner-s-
guide-to-programming-using-the-python-language-1st-edition-david-
griffiths/
Programming Elastic MapReduce Using AWS Services to Build
an End to End Application 1st Edition Schmidt
https://ebookfinal.com/download/programming-elastic-mapreduce-using-
aws-services-to-build-an-end-to-end-application-1st-edition-schmidt/
https://ebookfinal.com/download/problem-solving-in-data-structures-
algorithms-using-python-programming-interview-guide-1st-edition-
hemant-jain/
https://ebookfinal.com/download/introduction-to-computation-and-
modeling-for-differential-equations-2nd-edition-lennart-edsberg/
https://ebookfinal.com/download/understanding-and-using-scientific-
evidence-how-to-critically-evaluate-data-1st-edition-richard-gott/
Introduction to Computation and Programming Using
Python with Application to Understanding Data 2nd
edition Edition Guttag Digital Instant Download
Author(s): Guttag, John V
ISBN(s): 9780262529624, 0262529629
Edition: 2nd edition
File Details: PDF, 8.51 MB
Year: 2016
Language: english
Introduction to
Computation and
Programming Using Python
with Application to Understanding Data
Introduction to
Computation and
Programming Using Python
with Application to Understanding Data
Second Edition
John V. Guttag
10 9 8 7 6 5 4 3 2 1
To my family:
Olga
David
Andrea
Michael
Mark
Addie
CONTENTS
This book is based on courses that have been offered at MIT since 2006, and as
“Massive Online Open Courses” (MOOCs) through edX and MITx since 2012.
The first edition of the book was based on a single one-semester course. Howev-
er, over time I couldn’t resist adding more material than could be fit into a se-
mester. The current edition is suitable for a two-semester introductory computer
science sequence.
When I started working on the second edition I thought that I would just
add a few chapters, but I ended up doing far more. I reorganized the back half of
the book, and converted the entire book from Python 2 to Python 3.
The book is aimed at students with little or no prior programming experi-
ence who have a desire to understand computational approaches to problem
solving. For some of the students the material in this book will be a stepping
stone to more advanced computer science courses. But for many of the students
it will be their only formal exposure to computer science.
Because this will be the only formal exposure to computer science for many
of the students, we emphasize breadth rather than depth. The goal is to provide
students with a brief introduction to many topics, so that they will have an idea
of what’s possible when the time comes to think about how to use computation
to accomplish a goal. That said, this is not a “computation appreciation” book. It
is challenging and rigorous. Students who wish to really learn the material will
have to spend a lot of time and effort learning to bend the computer to their will.
The main goal of this book is to help students become skillful at making pro-
ductive use of computational techniques. They should learn to use computational
modes of thoughts to frame problems and to guide the process of extracting in-
formation from data. The primary knowledge they will take away from this book
is the art of computational problem solving.
This book is not easily slotted into a conventional computer science curricu-
lum. Chapters 1-11 contain the kind of material typically included in a computer
science course aimed at students with little or no programming experience.
Chapters 12-14 contain slightly more advanced material, various subsets of
which could be added to the introductory course if the students are more ad-
vanced. Chapters 15-24 are about using computation to help understand data.
xiv INTRODUCTION TO COMPUTATION AND PROGRAMMING USING PYTHON
They cover the material that we think should become the usual second course in
a computer science curriculum (replacing the traditional data structures course).
In Chapters 1-11, we braid together four strands of material:
• The basics of programming,
• The Python 3 programming language,
• Computational problem solving techniques,
• Computational complexity, and
• Using plots to present information.
We cover most of Python’s features, but the emphasis is on what one can do
with a programming language, not on the language itself. For example, by the
end of Chapter 3 the book has covered only a small fraction of Python, but it has
already introduced the notions of exhaustive enumeration, guess-and-check al-
gorithms, bisection search, and efficient approximation algorithms. We intro-
duce features of Python throughout the book. Similarly, we introduce aspects of
programming methods throughout the book. The idea is to help students learn
Python and how to be a good programmer in the context of using computation
to solve interesting problems.
The examples in this book have been tested using Python 3.5. Python 3
cleaned up many of the inconsistencies in the design of the various releases of
Python 2 (often referred to as Python 2.x). However, it is not backward compati-
ble. That meant that most programs written using Python 2 cannot be run using
implementations of Python 3. For that reason, Python 2.x continues to be widely
used. The first time we use features of Python 3 that differ from Python 2, we
point out how the same thing could be accomplished in Python 2. All of the ex-
amples in this book are available online in both Python 3.5 and Python 2.7.
Chapters 12-13 provide an introduction to optimization, an important topic
not usually covered in introductory courses. Chapters 14-16 provide an introduc-
tion to stochastic programs, another important topic not usually covered in in-
troductory courses. Our experience at MIT is that we can can cover either
Chapters 12-13 or Chapters 15-16, but not both, in our one-semester introducto-
ry course.
Chapters 15-24 are designed to provide a self-contained introduction to us-
ing computation to help understand data. They assume no knowledge of mathe-
matics beyond high school algebra, but do assume that the reader is comfortable
with rigorous thinking and is not intimidated by mathematical concepts. This
part of the book is devoted to topics not found in most introductory texts: data
visualization, simulation models, probabilistic and statistical thinking, and ma-
chine learning. We believe that this is a far more relevant body of material for
PREFACE xv
most students than what is typically covered in the second computer science
course.
We chose not to include problems at the end of chapters. Instead we inserted
“finger exercises” at opportune points within the chapters. Some are quite short,
and are intended to allow readers to confirm that they understood the material
they just read. Some are a bit more challenging, and are suitable for exam ques-
tions. And others are challenging enough to be useful as homework assignments.
The book has three pervasive themes: systematic problem solving, the power
of abstraction, and computation as a way of thinking about the world. When you
have finished this book you should have:
• Learned a language, Python, for expressing computations,
• Learned a systematic approach to organizing, writing, and debugging medi-
um-sized programs,
• Developed an informal understanding of computational complexity,
• Developed some insight into the process of moving from an ambiguous prob-
lem statement to a computational formulation of a method for solving the
problem,
• Learned a useful set of algorithmic and problem reduction techniques,
• Learned how to use randomness and simulations to shed light on problems
that don’t easily succumb to closed-form solutions, and
• Learned how to use computational tools (including simple statistical, visuali-
zation, and machine learning tools) to model and understand data.
Programming is an intrinsically difficult activity. Just as “there is no royal
road to geometry,”1 there is no royal road to programming. If you really want to
learn the material, reading the book will not be enough. At the very least you
should try running some of the code in the book. Various versions of the courses
from which this book has been derived have been available on MIT’s Open-
CourseWare (OCW) Web site since 2008. The site includes video recordings of
lectures and a complete set of problem sets and exams. Since the fall of 2012, edX
and MITx have offered online courses that cover much of the material in this
book. We strongly recommend that you do the problem sets associated with one
of the OCW or edX offerings.
1 This was Euclid’s purported response, circa 300 BCE, to King Ptolemy’s request for an easier way
to learn mathematics.
ACKNOWLEDGMENTS
The first edition of this book grew out of a set of lecture notes that I prepared
while teaching an undergraduate course at MIT. The course, and therefore this
book, benefited from suggestions from faculty colleagues (especially Ana Bell,
Eric Grimson, Srinivas Devadas, Fredo Durand, Ron Rivest, and Chris Terman),
teaching assistants, and the students who took the course. David Guttag over-
came his aversion to computer science, and proofread multiple chapters.
Like all successful professors, I owe a great deal to my graduate students. The
photo on the back cover of this book depicts me supporting some of my current
students. In the lab, however, it is they who support me. In addition to doing
great research (and letting me take some of the credit for it), Guha Balakrishnan,
David Blalock, Joel Brooks, Ganeshapillai Gartheeban, Jen Gong, Yun Liu, Ani-
ma Singh, Jenna Wiens, and Amy Zhao all provided useful comments on various
versions of this manuscript.
I owe a special debt of gratitude to Julie Sussman, P.P.A. Until I started work-
ing with Julie, I had no idea how much difference an editor could make. I had
worked with capable copy editors on previous books, and thought that was what
I needed for this book. I was wrong. I needed a collaborator who could read the
book with the eyes of a student, and tell me what needed to be done, what should
be done, and what could be done if I had the time and energy to do it. Julie bur-
ied me in “suggestions” that were too good to ignore. Her combined command of
both the English language and programming is quite remarkable.
Finally, thanks to my wife, Olga, for pushing me to finish and for excusing
me from various household duties so that I could work on the book.
1 GETTING STARTED
A computer does two things, and two things only: it performs calculations and it
remembers the results of those calculations. But it does those two things ex-
tremely well. The typical computer that sits on a desk or in a briefcase performs a
billion or so calculations a second. It’s hard to image how truly fast that is. Think
about holding a ball a meter above the floor, and letting it go. By the time it
reaches the floor, your computer could have executed over a billion instructions.
As for memory, a small computer might have hundreds of gigabytes of storage.
How big is that? If a byte (the number of bits, typically eight, required to repre-
sent one character) weighed one gram (which it doesn’t), 100 gigabytes would
weigh 10,000 metric tons. For comparison, that’s roughly the combined weight of
15,000 African elephants.
For most of human history, computation was limited by the speed of calcula-
tion of the human brain and the ability to record computational results with the
human hand. This meant that only the smallest problems could be attacked
computationally. Even with the speed of modern computers, there are still prob-
lems that are beyond modern computational models (e.g., understanding climate
change), but more and more problems are proving amenable to computational
solution. It is our hope that by the time you finish this book, you will feel com-
fortable bringing computational thinking to bear on solving many of the prob-
lems you encounter during your studies, work, and even everyday life.
What do we mean by computational thinking?
All knowledge can be thought of as either declarative or imperative. Declara-
tive knowledge is composed of statements of fact. For example, “the square root
of x is a number y such that y*y = x.” This is a statement of fact. Unfortunately, it
doesn’t tell us anything about how to find a square root.
Imperative knowledge is “how to” knowledge, or recipes for deducing infor-
mation. Heron of Alexandria was the first to document a way to compute the
square root of a number.2 His method for finding the square root of a number,
call it x, can be summarized as:
2 Many believe that Heron was not the inventor of this method, and indeed there is some evidence
that it was well known to the ancient Babylonians.
Discovering Diverse Content Through
Random Scribd Documents
modern life made less extraordinary by the fact that one is served by
quiet, intelligent, besatined servants, who glide about and look as if
they had stepped into life straight from the half-fabulous days of
Kubla Khan; and you feel they have always been thus, and always
will be, and you wonder how it is that although the spirit of the
twentieth century is certainly felt in China, it is little seen.
May 27.
To-day we started off on a long tramp, making first the ascent of
Mount Bruce, which was so difficult at times that we could scarcely
accomplish it, and had we not had the help of a young house-
servant, known to us as “Number Three Boy,” I doubt if we could
have reached the summit. The wind whistled round the high peaks of
Mount Bruce to such an extent that Mrs. Squiers and I had to hold on
to each other to keep from being blown off our feet.
From here we could see the Empress-Dowager’s summer palace
and grounds, spread out below us like a toy garden, with its
wonderful landscape effects and its series of artificial waterways.
Then, perched high up on a mountain, we could see a white temple
belonging to the eunuchs of the palace, and reserved solely for their
use during the summer months; and to the west the Feng-tai station
of the Peking-Paoting-fu Railway, winding through the valleys below
us like a piece of grey thread. We then walked through the enclosure
of the temple occupied by the Russian Legation, and in passing
through a half shrine, half summer-house, most unexpectedly came
to a wall upon which was drawn a rough but cleverly executed head
of a lovely young girl. It was done in coloured pastels, and had been
drawn by some artist diplomat. The subject was the Countess
Marguerite Cassini, niece of the Russian Minister, who had been
stationed in Peking some years previous. It was a beautiful bit of
work, and was especially startling when seen surrounded by the
hideous, grinning faces of Buddhist gods.
Heading for our own temple of Linqua Su, we walked miles,
keeping to the top of a ridge, where the views were gorgeous and
the air wonderful, and quite suddenly came upon a shepherd and his
flock. Fancy it, a Chinese shepherd tending his Chinese sheep! His
expression was gentler and happier by far than that of men leading a
like monotonous existence in the mountains of Switzerland or
elsewhere in the West. Could it be that there the shepherd longs to
return to the life in the villages, while here the life of the poorest
classes in the village communities is so hopeless a struggle that
individual members are glad to leave the hopelessness of it and tend
their flocks alone upon the mountains? This fascinating China! you
have been here, and you know it. I must not bore you with my
impressions, for if I attempted such a thing these letters to you would
assume the proportions of an encyclopædia.
May 27 (continued).
Mr. Squiers returned to the American Legation this morning. He
only gets out to the hills twice a week in time to dine and returns to
Peking the following morning. He tells us that the Boxers daily
become more daring, but the diplomats and people in general put
these things down to the usual spring riots which yearly seize
Peking, and are due to hunger and disease, prevalent among the
poorer classes after a long, hard winter. Nevertheless, it was
deemed wise to inform the Tsung-li Yamen (the Foreign Office) that
we were in the hills at the temple of Linqua Su, and would expect
official protection from all rioters or malcontents who might be in this
region, and a guard of twelve Chinese soldiers was promptly detailed
to protect “nos personnes et nos biens.” But such soldiers!—opera-
bouffe mannikins in a Broadway theatre would frighten one with their
martial air compared to these ridiculous apologies for soldiers, which
were sent to us for our protection, their only weapons being dull-
pointed rusty spears!
Clara, the German governess, returned from Peking to-day, where
she had gone to do some shopping, and tells us that all the natives
she passed seemed to be armed, and that in all the temple
enclosures companies of Chinese were being drilled.
Our servants, mostly native Christians, assure us that these
people are all Boxers, most of them flaunting the red sash, the
insignia of that Society, and that they are preparing for a general
uprising when the time shall be ripe—an uprising that has for its
watchword, “Death and destruction to the foreigner and all his works,
and loyal support to the great Ching dynasty.”
May 28.
The peace that settles on one after a long tramp in the mountains
was rudely broken up for us a short while after our return from our
walk yesterday, when we found ourselves thrown into the midst of a
most exciting situation, from which we knew the chances were about
even whether we should escape with our lives.
We could see from our mountain balcony that the railroad station
at Feng-tai, with its foreign settlement, was burning. The immense
steel bridge was gone, too, showing that dynamite and high
explosives had been used to destroy it. The locality was thick with
smoke and the flames sky-high. Our servants told us our highly
picturesque guard of twelve had run away as soon as they were sure
the Boxers were burning Feng-tai, for, they argued, the mob will
surely sack this foreign-devil temple when they finish with Feng-tai.
Since they had begun, they certainly would not desist until
everything foreign this side of Peking was sacked and burned, and
this guard had no desire to pose as the guardians of foreigners, but
thought it much safer to join the so far victorious rabble at Feng-tai.
We also learned that over a hundred men engaged in agricultural
and other peaceful occupations in and around the temples, of which
ours was one, had left during the day to join the Boxers.
Our position now, to say the least, was critical. Not a foreign man
on the place to protect us; a quantity of badly frightened Chinese
servants to reassure; three children, their governesses and
ourselves, to make plans for. We did what women always have to do
—we waited; and our reward came when we saw down in the valley
a dusty figure ambling along on a dusty Chinese pony, coming from
the direction of Feng-tai and making direct for our temple. It was Dr.
Morrison, correspondent of the London Times, and an intimate friend
of the Squierses.
On hearing early in the day of the mob at Feng-tai, and the
burning of the place, he promptly started off in that direction to get as
near as possible to the scene of action, and ascertain for himself if
the wild rumours circulating in Peking were truths before cabling
them to London. Finding the worst corroborated by what he saw from
a point near the mob, yet unseen by it, he started on his return trip to
Peking, hot haste for the cable office, when he became oppressed
with the startling remembrance that we were at the temple, and
probably alone and unprotected. So, instead of returning to Peking,
he promptly came to us. He feared lest Mr. Squiers had not heard of
the burning of Feng-tai, or, if he had heard of it, that possibly the city
gates might be closed against the approaching mob, and he might
be unable to leave the capital that night. The fact that our temple
was directly on the line of march to Peking for the rioters made it
look to Dr. Morrison as a most probable possibility that they would
stop chez nous before proceeding to the capital. In case of such
horrible eventuality he hoped to defend us for a while, and to send to
glory as many Chinese as possible before turning up his own toes!
He was studying a possible defence of our balcony-home when
Mr. Squiers arrived post-haste, bringing with him a Russian Cossack,
whom he had borrowed from the Russian Minister. Plans were now
made to defend the place from attack or incendiaries during the
night. The Chinese servants worked with a will—our successful
defence meant safety for us and life for them. Sentry work of the
most careful sort continued all night, as well as the packing up of our
clothes and valuables.
At 6 a.m. we were en route for Peking—an enormous caravan—
most of us in Chinese carts, some riding ponies, mules, or donkeys,
the forty servants placing themselves wherever they could—
anywhere, in fact—so that they should not be left behind. The three
protectors, heavily armed, rode by us, and three or four of the
Chinese were armed also, and the carts held such a position in the
caravan that in a moment they could be swung round as a defence
in case of an attack.
The fifteen miles through which we travelled were utterly deserted
except for the long, lonely lines of coal-carrying dromedaries. It
seemed as if the country people en masse had deserted their
villages and gone to some rallying-point for a demonstration; and
how anxiously and slowly each half-hour of the trip passed, for, while
it brought us nearer to our Legation, it also brought us nearer to the
possibility that our caravan would run into yesterday’s rioters with
added numbers of to-day’s malcontents.
At 10.30 we reached the American Legation compound, and most
painfully but thankfully we untwisted ourselves from the awful
position we were forced to take in the cart, and joyously grasped the
hands of friends. William Pethick, Li Hung Chang’s private secretary
for twenty years, a person of tremendous influence with the Chinese,
was in the compound, and was on the point of going to the War
Office to demand a regiment to go with him to our rescue out in the
hills. He had feared for us desperately during the night following the
burning of Feng-tai.
May 30.
The times have become so dangerous that no women are allowed
to leave the compound, but, of course, the diplomats and the military
—such as are here—must move about and try to find out what the
situation really is. The people who know the most about it are the
most pessimistic as to what may happen before the marines arrive
from Tien-tsin.
We were glad to hear that the Belgian officials at the Feng-tai
station had heard of the intentions of the Chinese to burn them and
the place, and had escaped to Peking without loss of life.
All the Legations that have battleships at Taku wired some days
ago to them, and we are looking for a total of about three hundred
marines of all nationalities to reach Peking at any moment.
Legations, such as the Belgian and Austrian, which are some
distance from the Legation centre, are forced to do constant sentry
work to guard against thieves and incendiaries; the Ministers’
secretaries, and their foreign servants take turn night and day. They
are so surrounded by small streets and alleys that a few rioters could
rush their Legations easily, and they are forced to keep the most
alert watch. Melotte, the big blonde Belgian secretary, came to tea
to-day, and gave us a most vivid description of the difficulties of their
tiny garrison.
Sir Robert Hart, the beloved Inspector-General of the Customs,
dropped in also, and, while he seems fairly sanguine about the
present situation, I must say the tales of China and the Chinese that
he unfolded to us were quite terrible. Especially the massacre of the
Portuguese at Ning-po in 1870 by the Chinese in retaliation for their
having taken so much of the Yangtse River trade made a stirring
story when coming from his lips.
He was with that fascinating Englishman commonly known as
“Chinese Gordon” when he was the central figure in the history of
China during the early part of this century, and when Sir Robert was
quite a young man. I was so obviously spellbound by these real
reminiscences that, to my surprise and joy, he offered to send me, on
his return to his compound, a photograph of himself taken with
Gordon, marked with the latter’s autograph. I can’t say, however, that
his visit reassured us in our present dangerous situation.
Before leaving he looked at Mr. Squiers’s wonderful collection of
antique Chinese porcelains, which Mr. Pethick, a connoisseur in
these things, has collected for him. The Dana Collection was also
procured by him. Sir Robert is certainly a delightful person, and the
cobalt-blue tie twisted into a most unusual knot around his low collar
gives his personal appearance a tinge of rakishness and eccentricity.
This afternoon Dr. Morrison and some Customs students rode
down toward the station of Magi-poo to take a look at the congested
market-places and collections of angry rioters. Directly they were
seen they were furiously stoned, but as their Chinese ponies were
fleet of foot, they escaped with a few bruises.
May 31.
All day to-day everyone is wondering, “Will the marines get here
to-night?” A wire came through Admiral Kempff, saying they were
entrained. Last night we dined at Sir R. Hart’s, and danced until
twelve. He has two bands, brass and string, of Chinese musicians
whom he has taught. The secretary of the German Legation took me
out to dinner—Von Below, a most soldierly-looking person.
HERBERT SQUIERS
June 1.
Mr. Squiers, secretary of the Legation, and Mr. Cheshire,
interpreter-secretary, met the troops at the station last night at 8.30.
The marines of the United States, England, Russia, France, and
Japan, formed the contingent of 365 men which were sent up from
Tien-tsin by the fleet. They would have arrived earlier in the day, but
the British in Tien-tsin had tried to send 100 marines instead of the
75 for which the Tsung-li Yamen had given them permission. The
Chinese were obdurate, so the delay was caused.
When this polyglot contingent landed at the station in Peking there
was great excitement as to which nationality should lead. Captain
McCalla, who had come up with our fifty marines, hurried his men at
the double-quick to get it, and our troops were the first to march up
Legation Street. There was an enormous mob at the station, but no
demonstration was made except to hurl and howl curses on the
soldiers’ ancestors.
Mr. Squiers, who is one of the most hospitable people in the world,
received Captain McCalla and the marine officers in a delightful
manner, and did everything possible for them in an official and
personal way. He was an officer in the army before entering the
diplomatic service, which makes his help and advice invaluable in
procuring quarters for the marines, and other arrangements.
June 3.
Yesterday Captain McCalla took the eleven o’clock train, with his
secretary, back to Tien-tsin, to join his ship, the Newark, after having
had a long talk discussing the situation with the Minister. We
suppose Admiral Kempff will be up in a day or two, as his visit has
been put off already several times.
The bad and suspicious part of this affair is that the Boxer
outrages are not being punished by the Government, which proves
that they either fear the perpetrators or sympathize with them. One
hears from all sides that the Chinese soldiers are Boxers at heart,
and would not fire on them if ordered to do so. The people who will
suffer first from these riotous fanatics, if they get much worse than
they are now, will be the Chinese Christians.
June 5.
We expected Admiral Kempff yesterday from Tien-tsin, but the
train did not come through, and we do not know whether he was on it
or not. The invitations for a dinner in his honour have been
cancelled.
Mrs. Brent, with whom I am to return to Japan, has sent me word
to be ready to-morrow to take the morning train to Tien-tsin. So far all
the trains from Peking down seem to get through, although the trains
up are irregular. Rumour comes that yesterday two more stations
were burnt, one on the Hankow line and one on the Tien-tsin line,
but the actual tracks are not destroyed.
Everyone feels that this is the time to leave Peking—everyone, at
least, who is not bound to remain to protect interests they have in
charge—and to-morrow surely the exodus will be large. Captain
Myers, in command of the United States marines, and Captain
Strouts, of the British marines, had a long consultation to-day about
these incredibly outrageous Boxers, in case they should dare
impertinences on the Legations. Should we be forced to leave our
American compound, we will go to the Russian Legation, which has
a stronger defensive position than ours.
June 7.
Yesterday I was ready to start with Mrs. Brent, when a letter came
for Mrs. Squiers from Sir Robert Hart, saying he thought the train
would eventually “get through” to Tien-tsin, but that his secret service
agents had informed him that there were rioters and Boxers at
several stations prepared to stone the passenger coaches, and he
urged me not to attempt the trip. He wrote: “Things must get better
soon or very much worse.”
Captain Myers and his men were up all night guarding the
compound. This United States Legation is such a wretched little
irregular place to defend—it could so easily be fired.
The atmosphere of the compound is distinctly exciting. The
quintessence of American interests are discussed right here in the
open air, under a few scattered big trees, by people walking about
gesticulating or standing on scorching hot flagstones, which pave
part of this enclosure, arguing with one another as to how soon the
coup d’état will take place, but all agreeing on one point—that a
cable should be sent immediately to the State Department in
Washington before telegraphic communication is lost; that nothing
but a tremendous armed force can free the Americans in Peking
from a surely approaching massacre; that many of the higher
Chinese officials would try to protect us to the end. But the fact
remains, if the Boxers and rioters continue to increase in numbers
each day as they have been doing for the past week, it will be the
mob we will have to deal with, and not the Tsung-li Yamen.
In nearly every instance the persons who voice these sentiments
are men who have lived in China for years, who know the country,
the language, and the people. They know that the strength of the
Chinese lies in clever cunning and mob violence, that they cannot be
trusted under any circumstances.
These men all agree that China was never before in such a
condition. Mr. Pethick, familiar with every phase of tortuous Chinese
government, forty years a resident in China, and an intimate friend of
half the political leaders, knowing their weaknesses and
wickednesses by heart, urges the Minister to state to Washington the
situation as it is, but all to no avail.
The white dazzling star of optimism is blinding him to facts, and
with the British Minister to stand with him in his position, he says that
the Boxer movement is only a few fanatics, and the mobs and
incendiaries are but slight demonstrations of the yearly spring riots!
Dr. Coltman, a clever American physician of Peking, and a
correspondent for the Chicago Record, is sending to his paper some
strong cables about affairs here, but the United States are so
saturated with yellow journalism that probably his wires will not be
believed. When we complain to the Yamen about the trains running
no longer from Peking to Tien-tsin, as many ladies and children wish
to leave, they smile and say “they regret the present state of affairs,
but that in a few days all will be in working order again.” Mr. Pethick
thinks they are not allowing the trains to leave Tien-tsin because they
don’t want any more foreign troops to come to Peking.
June 10.
A telegram arrived to-day from Tien-tsin, saying the second
contingent that they have been so madly telegraphing for these past
few days had practically seized a train and left at 10.10, that most of
the track is supposed to be all right, but they expect to have difficulty
with an occasional broken bridge. Captain McCalla is again in
command of our marines, and the combined forces of this relief party
number 1,600. We expect the train to arrive to-night, and, owing to
the gates being closed at sundown, they will have to spend the night
outside. To-morrow at daybreak they will be met with twenty carts for
their ammunition and luggage.
June 11.
This morning Mr. Squiers, and Mr. Cheshire, and Captain Myers,
with ten marines, waited at the station for the troops from daybreak
until eleven o’clock, but there was no sign of them. The escort then
returned to the Legation. The telegraph was broken last night. We
have no more communication with the outside world; our world is this
dangerous Peking.
June 12.
Such intense excitement! This afternoon the Japanese Chancellor
of Legation went down to the railway-station in the official Legation
cart to see if there were any sign of the troops. Returning by the
principal gate, he was seized by Imperial troops, disembowelled, and
cut to pieces.
Mr. Squiers had sent about the same hour his maffu (groom) down
to the station with a pony for Captain McCalla in case the troops had
come. This man was also returning, after having waited there some
hours, when they—the Imperial Chinese soldiers—saw that he was
some foreigner’s servant, and tried to seize him, but he lashed both
horses—the one he was on and the one he was leading—and just
escaped. On reaching the Legation, he was so terrified he told Mr.
Squiers he would have to leave his service immediately and try to
save his life by running away to Tien-tsin.
Twenty of our marines have been sent with an officer to guard the
big Methodist mission near the Ha Ta Men Gate, which is still holding
out.
Rumours are the only subject of conversation now. To have them
refuted or confirmed, a Russian bribed a reliable Chinese to go fifty
miles down the track and to report where the troops are. He could
find no sign of them. How very extraordinary! Where are these 1,600
men that left Tien-tsin two days ago? He also reported that the track
was broken in several places.
To-day the house belonging to the British Minister in the hills, very
near our temple, was looted and burnt by the Boxers. Most
fortunately, Miss Armstrong brought the children back yesterday.
A Russian secretary, Mr. Kroupensky, has figures at the end of his
fingers about the number of troops Russia can land in Tien-tsin from
Port Arthur in a few days’ time, etc., and if things get much worse,
the Russians say it is more than probable their people will march on
to Peking by themselves to our rescue. Can we suppose they are
trying to prepare us for a Russian coup d’état?
Dr. A. W. P. Martin, a famous savant in Chinese classics and other
ancient languages, Director of the Imperial University in Peking, has
temporarily become the refugee guest of Mr. Squiers, his own house
being too unsafe for him to remain in. Mr. Pethick is also a guest in
this hospitable house. The British Legation is already crammed with
missionaries and refugees, who in their own quarters feared for their
lives, and were obliged to leave their missions near Peking, and
concentrate at some place capable of defence.
A message that has to be sent to the Tsung-li Yamen always gains
more strength by being sent from each Legation the same day. To-
day the Japanese were requested to join the others with this usual
procedure, but they answered simply: “Impossible. The Chinese
have murdered our Third Secretary of Legation, and Japan can have
no more communication with China—except war.”
June 13.
All last night the sky was bright from the many fires in the Tartar
city—work done by the Boxers and soldiers. The Roman Catholic
Church, the “Tungchou,” was burnt to the ground, and all through the
night the Christian Chinese who lived near it were massacred. Other
less important missions have also been destroyed. Yesterday the
people in the Austrian Legation rescued a Chinese Christian woman
who was being burned to death very near their Legation wall.
June 16.
In the afternoon yesterday we were horrified at the number of big
fires that broke out in so many different parts of the Tartar city, and
when we saw that the Ch’ien Men Gate was blazing, and all the
houses around in the same condition, we felt we were in great
danger. If this got a hold, it would burn up the Legation district of
Peking very quickly. There are two parts of the city—the northern
Manchu city, containing the Imperial palaces and garrison, also the
foreign Legations; and the southern or Chinese city, containing the
trading population, theatres, and markets. Both parts are joined in
the form of the letter T, the leg or largest part being the Manchu city
on the north, with walls 60 feet high, 40 feet wide at the top, loop-
holed parapets 3 feet high at the side, and square bastions 100
yards apart on the outside face. At wide intervals along the inside
face are pairs of inclined roads, 8 feet wide, for mounting the wall.
The total length of this rectangular wall on the four sides of the
Manchu city is about twelve miles. Joined to this great wall on the
south is the much lower and weaker wall of the Chinese or southern
city. All nationalities sent men, even these traitorous Pekingese, to
aid us in extinguishing the fire. The Imperial fire-brigade arrived with
great pomp, and could have furnished charming costumes for some
“extravaganza” in their get-up. They had no idea how to put a fire
out, but fortunately they had some hose, which, when used in the
telling places, proved most efficacious.
Our men fought this terrible fire side by side with the Chinese, and
this goes to show how a common danger levels most things, even
active hostilities. The Cossacks worked exceptionally well. This fire
had been started by the rioters and thieves in the rich bazaar district
of the city, under cover of which they hoped to get much rich booty.
The wind being high, the flames gained great headway, and the
tremendous Ch’ien Men Gate was soon ablaze. By eight o’clock the
fire was somewhat controlled; but it burned all night, and when seen
from the Great Wall it looked like a huge torch.
June 17.
Just one week ago to-day we got the telegram that the combined
forces of England, the United States, France, Japan, etc., now at
Taku, numbering 1,600 men and over, had practically seized a train
at Tien-tsin, and, with workmen on board to mend the track where it
had been derailed, had left at 10 a.m. to go to the relief of the
Legations in Peking. Night and day, ever since that telegram came,
we have been looking for them. The day after we received the news
that they had started the Chinese cut the telegraph-wires, and so for
one week we have been absolutely cut off from all communication.
No messenger has been able to get through the city gates, as they
are carefully watched by the Chinese authorities, except—and I am
proud of this—except that one old man whom Mr. Squiers had been
good to (he used to be an old gardener of theirs) got through to
Captain McCalla, who is with Admiral Seymour, and is in command
of 100 men—Americans. The gardener had been able to deliver to
him notes from Mr. Squiers, giving him most important information
about ways and means to get into Peking in case they meet with
opposition, and to bring back an answer, as well as other notes from
commanders of other nationalities, to their respective Legations in
Peking. From these letters we rather imagine that this “Tower of
Babel” relief party does not agree as well as it might, but then,
whoever expected a “Tower of Babel” to speak and work in unison?
Certainly never before the miracle!
So it is due to Mr. Squiers’s personal management that we or any
other nationality have heard anything from this party of 1,600 men,
which undoubtedly must be but the beginning of large numbers of
troops for what Lord Charles Beresford terms “the break-up of
China.” Our Legation, thanks entirely to Mr. Squiers’s efforts, is the
only one which has been in touch at all with the approaching column,
and, by his minute instructions, when they get here they will be able
to advance into the heart of our district—through the Water Gate—
without having to take any of the city citadel gates. They say that in
all crises, political or otherwise, some one man comes forward, takes
the bull by the horns, so to speak, and does a man’s work. Mr.
Squiers, as far as all the Americans here feel, is the man in Peking.
The fighting, the weak and terrorized Government, the expected
attack on the Legations, the horrible massacre of the Chinese
Christians, the burning of all the missions, churches, and entire
Christian communities, and last, but not least, the continued
attempts—made, we think, principally by Boxers—to “burn the
Legations out,” all go to make these days very extraordinary ones.
Last night there was a scene enacted in our Republican
compound that would be a fitting climax to any Bowery play where
Jake, the villain, is finally run down. A regulation Boxer—red sash
and all—was caught by a Russian sentry in the act of trying to set
fire to the outhouses of this Legation. He was assisted into the
compound by the Cossack who discovered him, with no especial
tenderness of manner, the Chinaman still clutching the picturesque
and glowing torch with which the conflagration was to have been
started. In three minutes coolies, soldiers, gorgeously dressed
Legation servants, the European men in the compound, and we
women, who were in the midst of our dinner, rushed out to see what
it was (as we did fifty times a day, so far as that goes), to find this
poor, writhing creature, who knew that he had nothing to expect but
death in the next half-hour, as he had been caught red-handed. He
was questioned, but to no purpose, and was then turned over to the
Russians, as they had been responsible for his discovery; and,
although we all knew that that nation dislikes prisoners, we were
hardly prepared for the bullet that, in less than ten minutes, whistled
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.
ebookfinal.com