Beginning Cloud Native Development with MicroProfile, Jakarta EE, and Kubernetes: Java DevOps for Building and Deploying Microservices-based Applications 1st Edition Tarun Telang instant download
Beginning Cloud Native Development with MicroProfile, Jakarta EE, and Kubernetes: Java DevOps for Building and Deploying Microservices-based Applications 1st Edition Tarun Telang instant download
https://ebookmeta.com/product/beginning-cloud-native-development-
with-microprofile-jakarta-ee-and-kubernetes-1st-edition-tarun-
telang/
https://ebookmeta.com/product/cloud-native-devops-with-
kubernetes-building-deploying-and-scaling-modern-applications-in-
the-cloud-2nd-edition-justin-domingus-john-arundel/
https://ebookmeta.com/product/beginning-helidon-building-cloud-
native-microservices-and-applications-1st-edition-dmitry-
kornilov-2/
https://ebookmeta.com/product/social-media-marketing-for-
dummies-4th-edition-shiv-singh/
READY FOR C1 ADVANCED Student's book with key 4th
Edition Amanda French
https://ebookmeta.com/product/ready-for-c1-advanced-students-
book-with-key-4th-edition-amanda-french/
https://ebookmeta.com/product/the-wills-eye-manual-office-and-
emergency-room-diagnosis-and-treatment-of-eye-disease-kalla-
gervasio/
https://ebookmeta.com/product/exploring-the-syntax-and-semantics-
of-south-asian-languages-1st-edition-reena-ashem/
https://ebookmeta.com/product/pragmatics-pedagogy-in-english-as-
an-international-language-1st-edition-zia-tajeddin/
https://ebookmeta.com/product/easton-s-crime-a-second-chance-1st-
edition-audrey-north/
Ergodesign Methodology for Product Design: A Human-
Centered Approach 1st Edition Marcelo M. Soares
https://ebookmeta.com/product/ergodesign-methodology-for-product-
design-a-human-centered-approach-1st-edition-marcelo-m-soares/
Beginning Cloud Native
Development with
MicroProfile, Jakarta EE,
and Kubernetes
Java DevOps for Building and Deploying
Microservices-based Applications
—
Tarun Telang
Beginning Cloud Native
Development with
MicroProfile, Jakarta EE,
and Kubernetes
Java DevOps for Building and
Deploying Microservices-based
Applications
Tarun Telang
Beginning Cloud Native Development with MicroProfile, Jakarta EE, and
Kubernetes: Java DevOps for Building and Deploying Microservices-based
Applications
Tarun Telang
Hyderabad, India
Introduction������������������������������������������������������������������������������������������������������������xix
vi
Table of Contents
vii
Table of Contents
viii
Table of Contents
ix
Table of Contents
x
Table of Contents
Index��������������������������������������������������������������������������������������������������������������������� 253
xi
About the Author
Tarun Telang is a hands-on technologist with extensive
experience in the design and implementation of multitiered,
highly scalable software applications. He has been part of
several well-known companies, including Microsoft, Oracle,
Polycom, and SAP. He has over 17 years of experience in
architecting and developing business applications.
He began his career as an enterprise Java developer at
SAP, where he developed distributed application software for
big firms. He got his start with enterprise session beans and
message-driven beans, as well as instrumenting enterprise
applications’ configuration and management using the Java Management Extensions
(JMX) technology.
He quickly mastered various enterprise technologies, including the Enterprise
Beans, Java Management Extensions, Servlets, and Server Pages technologies, and
in his first year as a developer, he became a Sun Certified Programmer for the Java
Platform, Standard Edition 6, and an SAP Certified Development Consultant for the SAP
NetWeaver Java Web Application Server (which was a Java EE 5-compliant application
server).
He also gained expertise in XML technologies like XSLT and XSD. He developed
several solutions using session beans and message-driven beans to handle message-
oriented communications across numerous systems. In 2007, Tarun was named an
SAP Mentor and Community Influencer for his articles and blog posts on emerging
technologies and for promoting innovative solutions in the SAP Developer Community.
He frequently writes articles on Java and related technologies. Tarun has also authored
multiple online courses, including a best-selling course on the YAML data serialization
language.
He has presented technical lectures at several developer conferences, including
SAP TechEd and the Great Indian Developer Summit. He has been presenting at
conferences for more than 15 years and actively publishes technical papers and blogs to
assist everyone in grasping the fundamentals of software technology. Tarun developed
xiii
About the Author
xiv
About the Technical Reviewers
Massimo Nardone has more than 25 years of experience
in security, web/mobile development, cloud, and IT
architecture. His true IT passions are security and Android.
He has been programming and teaching others how to
program with Android, Perl, PHP, Java, VB, Python, C/C++,
and MySQL for more than 20 years. He holds a Master of
Science degree in computing science from the University of
Salerno, Italy.
He has worked as a CISO, CSO, security executive, IoT
executive, project manager, software engineer, research
engineer, chief security architect, PCI/SCADA auditor,
and senior lead IT security/cloud/SCADA architect for many years. His technical skills
include security, Android, cloud, Java, MySQL, Drupal, Cobol, Perl, web and mobile
development, MongoDB, D3, Joomla, Couchbase, C/C++, WebGL, Python, Pro Rails,
Django CMS, Jekyll, Scratch, and more.
He was a visiting lecturer and supervisor for exercises at the Networking Laboratory of
the Helsinki University of Technology (Aalto University). He also holds four international
patents (in the PKI, SIP, SAML, and Proxy areas). He is currently working for Cognizant
as head of cybersecurity and CISO to help clients in areas of information and
cybersecurity, including strategy, planning, processes, policies, procedures, governance,
awareness, and so forth. In June, 2017, he became a permanent member of the ISACA
Finland Board.
Massimo has reviewed more than 45 IT books for different publishing companies and
is the co-author of Pro Spring Security: Securing Spring Framework 5 and Boot 2-based
Java Applications (Apress, 2019), Beginning EJB in Java EE 8 (Apress, 2018), Pro JPA 2 in
Java EE 8 (Apress, 2018), and Pro Android Games (Apress, 2015)
xv
About the Technical Reviewers
xvi
Another Random Scribd Document
with Unrelated Content
Before going on to investigate this playful rivalry it may be useful to
inquire into its social significance. G. Tarde, in his interesting
sociological study, Les lois de l’imitation,404 attempts to prove that
imitation is the mainspring of social evolution. But along with the
peaceful operations of imitation, the fighting instinct, too, makes
itself felt in manifold ways, as a principle of progress (as I remarked
above in discussing combativeness), in conjunction it is true with
imitation and usually under the form of rivalry. It is evident that
social progress would be slow indeed if men only imitated and never
opposed what is done in their presence. Rivalry in ownership, power,
and authority is the force which urges each to do his utmost in the
struggle for life, and which has produced the most advanced
civilizations. A people without ambition is lost; not merely stationary,
but actually decadent. As in art bald imitation of even the best
models results in weakness, so in society. Men must will to do better
in order to do as well.
In spite of their variety we can very quickly review the physical
imitative games, since under movement-plays we have already
noticed a considerable number belonging to this class, and since it is
their psychological side alone that chiefly appeals to us. The
following examples, then, are merely chosen to show by means of
their variety the great importance of imitation in human play.405
Children learn most of their bodily movements by such play in a way
which clearly illustrates the mingled effects of imitation and
emulation. When one child jumps off the second step, another child
who sees him immediately tries to cover three; and when boys are
practising their leaps each makes a mark in the sand beyond the
others as his goal. To lift a heavier weight, to throw farther, to run
faster, to jump higher, to make a top spin longer, to stay longer
under water, to shoot higher, farther, and with better aim than his
comrades can, is the burning wish of every childish heart. In order
to see the same enthusiastic rivalry in physical prowess exhibited by
adults, we must turn to the half-civilized peoples to whom such
acquirements are of surpassing value in the struggle for life. Among
the ancient Germans, for example, such contests were carried to the
highest degree of perfection, and, in spite of their avowedly playful
character, conducted with such seriousness that they often became
matters of life and death. Skill, prowess, and endurance in leaping,
running, lifting and throwing huge stones, the use of bow and arrow,
diving and swimming, riding and rowing, were all the subjects of
contest, and each victor sought to surpass the achievements of the
former one. All warlike peoples of whom ethnology is cognizant
show much the same picture, and highly civilized nations, too,
accord an important position to athletic contests, as the Greek and
Roman games bear witness, as well as the championships and
records of our own day. Rivalry enters, too, into such games as
tenpins, billiards, croquet, golf, etc., all of which are favourite
amusements. The pleasure they afford is complicated, including
display of one’s own strength and skill, the pleasure of watching
others, the stimulus of rivalry and the satisfaction of overcoming an
opponent. Sometimes, and especially in croquet and billiards, the
contest closely approaches fighting play, since the participants not
only try to attain the object of the game, but are apt to engage in
direct hostilities.
We now turn to some examples that are better calculated to exhibit
the many-sidedness of rivalry, which is, of course, an element in all
the games of skill which we have mentioned. We are not so well
prepared to find it in games requiring patient effort, yet even the
Eskimos, in their Fadenfiguren, indulge in fierce emulation,406 and a
play as peaceful as kite-flying is not exempt. “The Hervey Islanders
believe that once the god Tane challenged the god Rongo to a kite-
flying contest, in which the latter won because his cord was
longer.”407 In drinking there is rivalry in the effort to withstand the
power of alcohol, and students have a time-honoured tradition that
the man is a fine fellow and worthy of all respect who can drink the
rest of the company under the table. It is more charitable to
attribute this practice to rivalry rather than to love of
drunkenness.408 The instance of the two boys holding burning
matches illustrates how readily the ability to suppress any
manifestation of pain lends itself to rivalry. The old Germans tested
their endurance by sitting at feasts after their battles, and when they
were covered with wounds. In a grotesquely exaggerated saga it is
related of the wounded sons of Thorbrand: “Thorodd got such a
blow in the neck that his head hung sideways; his hose were all
bloody and would not meet. Snorri could see and feel that a sword
was sticking in his thigh, but Thorodd said nothing. Among the
gayest of the gay is Snorri, son of Thorbrand, who sits with the
others at table, but eats little and looks white. When asked what ails
him he says, ‘When the vulture has won the fight he is not in haste
to eat.’ Then Gode looks at his neck and finds an arrow head at the
root of his tongue.”409 The jeering of Walthar and Hagen, who vie
with one another in mocking at their wounds, is another case in
point. Finally, the passion for making collections, which is so strong
in both children and adults, may be considered as a form of
competitive rivalry which reaches its climax in the miser.
4. Mental Rivalry
The space devoted to the more general kinds of emulation has
purposely been curtailed in order to devote more to the special case
of gaming, as much of the ground has been covered already.
Children are fond of displaying their mental acquirements even
before they are old enough to go to school, but it is there, of course,
that the best opportunity is afforded them. Colozza tells us how the
Italian children use their recess time for contests over the
multiplication table.410 During school hours recitation is easily
transformed to emulation which can be turned to account by the
judicious teacher with better results than are attained by one who
tries to draw the line too rigidly between work and play.
The intellectual rivalries of adults are exceedingly varied. Music
offers unlimited opportunities when people are far enough advanced
to have any sort of society, and even primitive tribes indulge in this
sort of entertainment. Among the Eskimos the contestants compete
in public for the prize for singing, and then fall into actual combat,
thus combining the two forms of rivalry. Grosse quotes from Rink the
following musical dialogue between two East Greenlanders. “Savdlat:
‘The south, the south, oh, the south over there! As I stood on the
headland I saw Pulangitsissok, who had grown fat upon halibut. The
people of this land know not how to speak. Therefore they are
ashamed of their language. They are dumb over there; their speech
is not like ours. In the north we speak in one way, different from
those in the south. Therefore we can not understand their talk.’” To
this challenge Pulangitsissok responds: “‘There was a time, as
Savdlat knows, when I was a good sledger, when I could take a
heavy load on my kajak. Four years ago he found this out. That was
the time when Savdlat bound his kajak to mine for fear he might
capsize. Then he could carry a good load on his kajak, too. As I was
tugging along you cried out pitifully, and were afraid and almost
overturned. I had to hold on to my ropes to keep us up.’”411 Such
sarcastic dialogue often leads to direct contests, in which the singers
try to rout one another by means of their witty improvisations. A
later form is the contest in oratory and song on an assigned theme,
opening with a direct challenge between the contestants. The poem
of Wartburg-Krieg is especially famed, while Plata’s symposium may
be instanced as a fine example of competitive oratory on a given
theme.
Other kinds of rivalry frequently arise in social gatherings, such as
recounting experiences in love, hunting, and battle, as was pre-
eminently the custom among the ancient Germans. “One after
another,” says Weinhold,412 “boasted of his prowess and sought to
prove it by tales of his wonderful deeds. To heighten the effect, each
chose an opponent worthy of his mettle. Thus it happened that
Eystein and Sigurd, the crusader, both Norwegian kings, once had a
controversy in court. Eystein advanced the proposition that it was
impossible to live aright in society, and called on his brother to
sustain the contrary. Then the travelled warrior Sigurd, who had
filled all lands with the fame of his deeds, and the peace-loving,
home-staying Eystein, each related what he had done and could do:
the one his battles, his fame in the East; the other that he had built
huts for poor fishers, made roads over rugged mountains, opened
harbours, widened Christendom, and strengthened the Church—in
short, extended his kingdom by every peaceable method. The talk
became warm, and the silence which followed was ominous, but as
they were both noble-hearted no harm came of it.” Very
characteristic, too, is the Harbardhslied in the Edda, where the gods
Wotan (under the name Harbardh) and Donar emulously recount
their achievements:
Donar: “Do you ask what I did to Rungner,
The giant with sturdy heart and head of stone?
I felled him then, he lies at my feet.
And what did you, Harbardh, the while?”
Fable makes animals wager in the same way; the old tale of the hare
and the hedgehog is found even in Africa, although there the
hedgehog has become a tortoise.417
The stakes are not always, however, on one’s own ability, but quite
as often on the performances of others, or on the speed and
endurance of animals. This is indeed the most popular form of the
sport, doubtless because the agreeable tension of expectation is
thus prolonged until the very moment of the dénouement, as it is
not likely to be in the more personal contests. In riding, rowing,
sailing, and running contests spectators, as well as participants, bet
on the result.418 “Betting on races,” says E. v. Hartmann, “is the
most dangerous and exciting form of gambling, being dependent
purely on chance, and yet offering a false appearance of being
essentially influenced by intelligence and judgment. The custom is
fostered of raising the stakes at the last moment under the influence
of artificial stimulation to interest during the race itself. Immature
boys, sons of respectable labourers, are thus initiated in the
fascinations of the passion for gaming who would otherwise have
little inclination for it.”419 In various parts of the world wagers are
laid on the result of fights between animals. In ancient Greece
gamecocks were bred with special care, and Tanagra, Rhodes,
Chalcis, and Delos were famous for the achievements of their
respective breeds. The birds were fed with garlic before the fight to
augment their excitement, and were armed with artificial spurs. The
stakes were often enormous.420 Cock-fights in which betting seemed
to be the principal feature were held during the middle ages in most
European cities, and in some localities have survived to the present
day. Malays are especially devoted to this sport. It only remains to
add in conclusion that lifeless things, too, may be the subject of
bets. The Gilbert Islanders set two sailboats, about four feet long,
afloat, and bet as to which will sail fastest.421 This is very near to
being play with pure chance, and the wager of Canning with an
English duke is even more so. They staked a hundred pounds on the
question of who should meet most cats on a certain road.
There is but one opinion as to the origin of games of pure chance—
namely, that they grew out of the serious questioning of Fate in the
form of oracles, and colour is given to the theory by the custom of
jesting with the oracle. The Greek custom of pouring wine into a
metal cup and from the sound it made reading one’s prospects in
love, drawing straws—a practice which Walther von der Vogelweide
has made famous—the various flower oracles, counting the cuckoo
calls, observing the flight of birds—as, for example, how many times
the kite circles—and many other such customs422 were originally
conducted seriously, with a view to gaining some knowledge of the
future, and even when playfully practised smack of superstition.
Tylor says, in his admirable study of this subject: “Soothsaying and
games of chance are so closely allied that the instruments of each
are used interchangeably, as among the clever Polynesian magicians
cocoanuts are skilfully rolled about in a circle. In the Tonga Islands
the chief use made of a holiday is to inquire whether the sick will be
cured. They offered loud prayers to the family deity that he would
place the nuts aright, then spun them, and from their position
judged of the god’s will. Under other circumstances, when the
cocoanuts are rolled simply for amusement, no prayer is offered and
no significance attached to the result. The Rev. G. Turner found the
same custom in the Samoan Islands in another stage of
development. There a company sits in a circle, the nuts are rolled
about among them, and the oracle’s answer depends on whether the
monkey face of the nut is turned toward the questioner when it
stops rolling. The Samoans formerly used this method to detect a
thief, but now it is a forfeit game.”423 In this sort of play with chance
there is nothing special at stake, yet it is no doubt closely connected
with those forms which have this feature.
Another of the earliest of the manifold forms of chance games is the
casting of lots. New Zealand wizards decide the fortunes of war by
throwing staffs. If the stick which represents their own tribe falls on
that of another, then a favourable outcome may be confidently
expected to the battle. The Zulus have a similar ceremony, and the
Hindus cast lots before the temple and supplicate the gods for
victory. In the Iliad the crowd prayed with outstretched hands while
the dice in Agamemnon’s helmet decided who should be the first to
fight Hector. Tacitus tells us that the German priests tossed three
dice on a white cloth before they attempted to reveal the future.424
The origin, then, of the use of dice in games of chance is
indubitable. The ancient form of backgammon common in India and
Mexico was played with lots instead of dice, as was also the case
with the Arabian Tâb. Some Indian tribes use the simple casting of
lots for gambling purposes. The Arabian does not throw, but draws
lots as a substitute for the Meisir forbidden in the Koran.425 The
complicated Chinese game lotto is well known, and Bastian found a
similar one used in Siam.426 E. von Hartmann refers repeatedly in
his Tagesfragen to our European lottery, combating the popular idea
that it is reprehensible, and should not be fostered by the state. He
sees in a well-conducted state lottery the best means of directing
the ineradicable tendency to play games of chance into harmless
channels. Money speculation is, as a rule, little different from a
lottery, since the great majority of speculators have no more
intimation of the outcome than is furnished by the law of
probabilities which governs pure games of chance. Returning now to
simpler manifestations, we find many which are closely related to
the use of lots. North American Indians, who are zealous gamblers,
use marked or coloured stones, seeds, and teeth, and stake their
clothing, furniture, weapons, and, in fact, all that they possess. In
Burmah a favourite game is played with beans, and in many of the
villages a thrashing floor is erected for the express purpose of
supplying the demand.427 In Siam the children play with shells, and
everything depends on whether the opening falls up or down.428 A
similar game was known to the Greeks, and in Rome a coin was
tossed with the cry, “Caput aut navis!” equal to our “Heads or tails!”
We must suppose that such play by children is derived from adult
games of chance.
Astragalus and dice were the implements used in many such games.
The former are peculiarly shaped bones from the ankles of sheep,
goats, or calves, and their use for such purposes is very ancient.
They are capable of resting on any one of four sides which may vary
in value, as the six sides of dice. The Schliemann collection in the
Berlin Museum contains some of them which were found in the
“second city.” In ancient Greece four astragali were used in the
games of adults, and were thrown either from the free hand or from
a cup. Special names were given to the various throws, such as
Aphrodite, Midas, Solon, Euripides, etc., and the worst throw was
called, there as in Rome, the dog. The children of antiquity also
played with these bones a game partly of chance and partly of skill,
and Hellenic children use them to this day. Ulrichs saw them at
Arachola on Parnassus. “The children there,” he says, “play with the
astragalus, which is a small four-sided bone rounded at the end and
so shaped as to be capable of resting on any of its sides. In the
game the uppermost side is read, the commonest throw being that
which brings the round end up and is called the baker or the donkey.
Then follow the thief, the vizier, and, rarest of all, the king, the side
which looks like an ear and is opposite the vizier.”429
The name vizier seems to point to Mohammedan influence, and
indeed the children of Damascus have a special game of chance with
astragalus in which the terms vizier and thief are both used.430
Some think that ordinary dice are derived from the astragalus, but it
would be difficult to prove, though their imitation in other materials
seems to suggest it, as in the case of the oblong dice used by the
Romans with cubical ones, and several hundred prehistoric dice
found in Bohemia are of similar form. The Berlin Museum, too, has
oblong dice from India and China, showing that they were widely
used in the Orient, and Hyde points out in his history of games of
chance that the Greek word κύβος is related to the Arabic Kab,
which meant simply made of lamb’s bones. On the other hand,
cubical dice with spots like ours are found in Theban graves, so that
we can not be positive as to the priority of the astragalus.
Possibly cocoanut rolling was the primitive form of roulette as we
have seen it used in half-religious, half-playful manner by the South
Sea Islanders. The Berlin Museum has Chinese rolling dice through
which a peg passes, projecting on each side or with the peg on one
side only, and the ball tapering to a point on the other. According to
Egede, Greenlanders have a sort of roulette, an oblong ball about
which the players sit with the stake before them.431 Another form of
chance game is the morra, which was probably known to the ancient
Egyptians, and was in all likelihood at first a clever method of
calculating.432 As a play the hands of all the players are thrown
simultaneously into the air, and each must guess at the number of
outstretched fingers without taking time to count. This amusement,
still very popular among Italian peasants, was called by the Achæans
“micare digitis.” In China, where it is zealously cultivated, it bears the
name of “tsoey-moey.”433 The North American Indians have a
modification of it in their cane guessing—namely, the effort to locate
a small object passed quickly about in a company. It is used for
gambling purposes, the Indians staking all that they have, even to
their wives sometimes.434 The “Kyohzvay” play is taken quite as
seriously in Burmah. For this a stick is fixed among the folds of a
tightly wrapped cord, and the game is won or lost435 according as it
is or is not successfully concealed.436 The various games of cards
afford by far the most important instances of play with chance, and
their name is legion. We have not time even to glance at such
games as faro, lansquenet, rouge et noir, trente et quarante, etc.,
except to say that they all depend on a combination of reason with
chance, and so more speedily put an end to suspense as to who is
the victor than do purely chance plays. We are now confronted by
the difficult question of what it is that constitutes the demoniacal
charm of gaming, whose power is demonstrated by the value of the
stakes with which a man will tempt Fate. Every one is familiar with
Tacitus’s description of the ancient Germans who, when they had
lost everything else, staked their freedom and their life on the last
throw. H. M. Schuster gives a long list of examples of Germans
staking freedom, wife, and children, the clothes on their backs, life
itself, yes, even their souls’ salvation when their passion for play was
at its height. That this is a universal Aryan trait is shown by the
Indian poem of Nala and Damayanti. The former, under the power of
a hostile demon, loses at play with Pushkara his ornaments, jewelry,
horses, wagons, and clothes. In vain his wife and followers seek to
restrain his madness; for many months the ruinous play goes on
until Nala has lost all his property and even his kingdom. Then as
Pushkara, with loud laughing at the unlucky fellow, cried out that
now he must put up his wife Damayanti, Nala rose from the table
and walked away with his faithful wife, stripped as he was of all else.
The Chinese, Siamese, and Burmese, too, are all passionate
gamblers, and the Malays are famous for their wagers on animal
fights. This is sufficient to show that the wonderfully strong
attractive power of gaming, “le jeu-passion, dont le rôle tragique est
vieux comme l’humanité,”437 is the result of numerous causes whose
aggregate, according to Fechner’s principle, is far greater than their
numerical sum. Taking account of the essentials only, we still have a
threefold phenomenon; these are, desire to win the stake, the
stimulus of strong effects, and the impulse given by the fighting
instinct.
Winning the stake is so important that without it games of chance
become very flat and most unimpressive, as forms of entertainment.
How is this to be explained? Sometimes it appears as veritable
cupidity, the “fascination d’acquérir d’un bloc, sans peine, en un
instant.”438 The seductive chink of gold pieces is heard and visions
of new names of wealth open before us, promising to deliver us
from all burdens and dangers which in spite of their distance and
vagueness we strive to get possession of by a single turn of
Fortune’s wheel; the gold fever is at home in gambling dens. Yet—
and I think this is important—as a rule, it is not mere greed for gain
as such, but a feeling more refined. It is boundless delight in sudden
good fortune that makes the unearned winnings so enticing. That
inward striving after the absolute, which is so deeply rooted in the
human breast, is concerned in the longing to experience at least one
moment of exhilarating joy with which a single stroke of Fortune’s
wand sets our hearts aflame:
“From the clouds it must fall,
Such is the gift of the gods;
And the strongest power of all
Is that which belongs to the moment.”
It would be misleading to suppose that all wagers in a game of
chance are attributable to a desire to win, even in this refined sense.
In so far as it is the chief motive, there is no real play at all, for it
constitutes a serious aim wholly outside the sphere of play. There
must be some other meaning to the intense delight in winning, and
Lazarus, as usual, puts his finger on it. “Even for an onlooker, not
pecuniarily interested, the charm increases with the value of the
stake.”439 The stake serves not only to enhance the thought of
winning the game, but intensifies the decisive moment.440 A
gambler must have excitement at any price, and he also wants to
risk something; betting satisfies both demands.
The need for intense stimuli which we are so constantly
encountering in the course of this inquiry appears as the second
motive in our classification, and it is met by a storm of effects which
betting excites. Consequently gambling is pre-eminently suited to
supply this demand. I have already pointed out that betting on the
performances of others is an especially popular form of gambling,
since in this way alone can the excitement be enjoyed unimpaired by
personal considerations. So, too, in games of pure chance, which
relegate the player to comparative inactivity and impart a feeling of
externality among its other effects. By far the most important of
these effects is the contrast of the emotions of hope and fear, and
often this simultaneous action of opposing passions is sufficient to
stir the soul to its depths, since, as Lazarus penetratingly remarks,
the result is in either case positive; the question is not, winning or
not winning, it is winning or losing. This is another point which
renders games of chance peculiarly fit for the production of exciting
effects. Also besides fear and hope there is the tension of
expectation and the shock of surprise to render the mental agitation
more intense and varied. This explains why gambling is the last
resort of the dissipated, worn-out man who needs sharp stimuli to
arouse his exhausted powers.441
Gambling is, moreover, a fighting play, and this is doubtless one of
its most important phases. There is no other form of play which
displays in so many-sided a fashion the combativeness of human
nature and with so slight expenditure of time and strength. There is
the charm of danger as such, enjoyment of bold betting which in the
changing course of the game is constantly renewed, and further
indirect as well as direct battle with an opponent, for he who makes
the best throw gets the best card. Besides all this there is the desire
to win his wager, and by means of the steady augmenting of stakes
it differs from all other fighting plays in affording at the last moment,
when all seems lost, an opportunity of retrieving everything by a
sudden overwhelming victory. And finally there is the defiance of the
power of chance, or rather, if a religious rearing makes one scruple
to put it in this form, we may call it a struggle with the powers of
darkness.
The question now arises whether this is properly called a fight when
the player can not influence the outcome, but must submit
absolutely to the incalculable hazards of fortune. What right has he
to congratulate himself on a victory for which he is in no way
responsible? To this it may be answered that in addition to this
subjective, psychological condition there is an active contest; for an
illusion exists in connection with every game of chance that in some
way the outcome is dependent on the capacity of the player, and a
little reflection will show that this is characteristic of human nature.
How else arises our naïve sense of worth or of shame? Are we not
vain of physical beauty, of inherited advantages, and of riches which
we have not earned? Does not the consciousness of deformity,
stupidity, weakness, awkwardness, or even a lowly origin impart a
feeling of shame and a sense of responsibility for our own
shortcomings? We feel as if we had had a voice in the fashioning of
our bodies and souls and a choice of our position in life—in short, as
the vulgar saying has it, as if we had not been careful enough in the
choice of our parents. Just in the same way we are proud of our luck
in play. Luck is genius, and he whom it smiles upon is a hero.442
This failure to discriminate between fortunate circumstance and
personal merit is shown in a striking manner in popular poetry. Its
heroes are often armed with magic weapons or directly assisted by
higher powers who lend them supernatural strength or work ruin to
their enemies. Such advantage is thus given them that the reflecting
person has some difficulty in regarding their exploits as especially
praiseworthy, yet the average hearer is undisturbed by such
considerations. For instance, consider the invulnerability of Achilles
and Siegfried’s Tarnkappe, which gave him in the fight with Brunhild
“the strength of twelve men.”
In the case which we are considering, however, this habit of mind
has a twofold significance: First, there is the personification of
chance as fate, with whom the player struggles. Lazarus says:
“Instead of blind chance, he pictures before him a reasoning
intelligence whose laws he tries to fathom, and in the face of many
failures and mistaken conclusions he persists in attempting to
calculate his chances and to count on them, forgetting that the
reckoning of probabilities is useful only in generalities and is
practically worthless when applied to a single case. By and bye he
endows luck with moral qualities as well. He will risk everything on a
single card, and either can not believe that Fate will be inexorable,
that his faith and perseverance must at last be rewarded, or else
assumes an attitude of defiance to a hostile being.”443 In the second
place, the gambler regards the implements of his trade as does the
magician among primitive peoples the means of performing his
incantations. It is actual fetich worship in which personification
assumes proportions quite different from those it bears in the
general idea of fate. Demons who sometimes obey the player’s will,
and sometimes mockingly defy him, seem to dwell in the dice and
cards, transforming play into a contest in magic arts. This is perhaps
not so strongly felt by cultivated people of the present day as I have
represented it, yet it is present in a more or less rudimentary form in
all devotees of the game. While some scoff at it, even they avoid
those things which are traditionally supposed to bring ill luck. Thus,
when I was a student, in our games with dice which were very
popular, the following rules were rigidly observed: In order to throw
double sixes, the player took the dice cup in his right hand, placed
the left over it and shook it solemnly three times up and down
before making the final throw. If low numbers were desired, the
inverted cup was held slantingly and drawn carefully back on the
table so that the dice glided out rather than rolled. For medium
throws there was a choice between two methods over whose
comparative efficacy there was serious controversy: either to rise
from the table and empty the cup from a height, or to propel the
dice suddenly by a sidelong movement from the cup, held at a slant.
Was all this mere joking? To a certain extent certainly it was, yet the
boys half believed in it and had a poor opinion of beginners who did
not know how to handle the dice. Among the lower classes,
however, and among peoples of less advanced civilization this
fetichism is much stronger. Konrad von Haslan, says Schuster,
testifies to having seen and heard “how on the one hand dice are
honoured, greeted, and kissed, and have offerings of booty made to
them, while on the other they were beaten and abused as if they
possessed life. Often the player who has lost by them takes revenge
by picking out the spots or smashing the dice with a stone or biting
them in two to make them suffer.”444 All these circumstances
combine to make gaming a fighting play not alone with men, but
also with supernatural powers whose inscrutable decisions possess a
peculiar power and whose favour lends to the fortunate player a
special nimbus, while the vanquished does not suffer in his own
esteem as if he had been conquered by a human foe.
Finally, we should note that gaming has various mental connections
with experimentation, since enjoyment of the excitation of hope and
fear and the feeling of suspense as well as the shock of surprise is
experimental in every case. With this is combined great activity of
attention and imagination to whose agency the personification of
which we have spoken must be ascribed; reason’s part in the
process is displayed in the complex calculation of probabilities, and
that of the will most conspicuously in the effort to appear outwardly
calm while the wildest excitement reigns within, and hope and
despair surge in alternate waves across the soul.
It is difficult to say which of these stimuli ought to be placed at the
head of the list, but two appear to me to be rather more important
than the others. First, the combative impulse, whose influence is
particularly strong here; and, second, pleasure in intense effects, as
when the “gold fever” takes the form of longing for a supreme
moment which shall fill the soul to the brim, something which will
transcend all other transporting agents. Both find their satisfaction at
the gaming table, owing to the suddenness and importance of its
revelations. In concluding, it may be remarked that the extraordinary
persistence of gamblers, who sometimes sit all night at the table, as
if hypnotized, may be at least partly explained by the law of
repetition taken in conjunction with the independent attractions of
the game. The performance of the last part of a mechanically
repeated action tends to lead to the production of the first part
again.
6. Teasing451
The fighting instinct of mankind is so intense that all the playful
duels, mass conflicts, single combats, and contests which we have
described, do not satisfy it. When there is no occasion for an actual
testing of their powers, children and adults turn their belligerent
tendencies into a means of amusement, and so arise those playful
attacks, provocations, and challenges which we class together under
the general name of teasing. The roughest if not the earliest form of
such play is that of bodily attack, such as is often observed among
animals. A female ape which Brehm brought to Germany loved to
annoy the sullen house dog. “When he had stretched himself as
usual on the greensward, the roguish monkey would appear and,
seeing with satisfaction that he was fast asleep, seize him softly by
the tail and wake him by a sudden jerk of that member. The enraged
dog would fly at his tormentor, barking and growling, while the
monkey took a defensive position, striking repeatedly on the ground
with her large hand and awaiting the enemy’s attack. The dog could
never reach her, though, for, to his unbounded rage, as he made a
rush for her, she sprang at one bound far over his head, and the
next moment had him again by the tail.”452 We all know how
children delight in just such teasing. To throw an unsuspecting
comrade suddenly on his back, to box him or tickle and pinch him, to
knock off his cap, pull his hair, take his biscuit from his hand, and if
he is small hold it so high that the victim leaps after it in vain—all
this gives the aggressor an agreeable feeling of superiority, and he
enjoys the anger or alarm of his victim. When I was in one of the
lower gymnasium classes our singing on one occasion was suddenly
broken into by a shrill scream. One of the pupils had found a pin
which he energetically pushed into an inviting spot in the anatomy of
the boy in front of him. The culprit could only say in palliation of his
offence that he did it “without thinking,” which excuse was received
rather incredulously. Schoolboys often pull out small handfuls of one
another’s hair, and it is a point of honour not to display any feeling
during the process. Becq de Fouquières records an ancient trick of
this kind, consisting of a blow on the ear in conjunction with a
simultaneous fillip of the nose. Cold water is a time-honoured
instrument of torture. To duck the timid bather who is cautiously
stepping into the pond, to empty a pitcher on a heedless passer-by,
to place a vessel full of water so that the inmate of a room will
overturn it on opening the door—these are jokes familiar wherever
merry young people are found. The lover of teasing naturally seeks
such victims as are defenceless against him, especially those who
are physically weak or so situated as to be incapable of revenge. Yet
there are ways of annoying the strong and capable. A good-natured
teacher is apt to be the subject of his pupils’ pranks, though in this
case they seldom take the form of physical assaults. It is not an
unheard-of thing, however, for a paper ball to hit his head or for his
seat to be smeared with ink or perhaps with glue as in
Messerschmidt’s Sapiens Stultitia.453
Youths and grown men are little behind the children in such jests.
There is, for instance, the christening on board ship in honour of
crossing the line which Leopold Wagner thinks is derived from the
ancient religious ceremony celebrated on passing the pillars of
Hercules.454 Tossing in a blanket, which made such a lasting
impression on Sancho Panza, was known to the Romans by the
name of sagatio. Such rough sports were practised in the time of the
Roman emperors by noble youths. Suetonius relates of Otho that the
future emperor as a young man often seized, with his companions,
upon weak or drunken fellows at night, and tossed them on a
soldier’s mantle (distento sago impositum in sublime jactare).455 In
popular festivities fighting with pigs’ bladders is a fruitful source of
amusements to which tickling with a peacock’s feather is a modern
addition, and lassoing with curled strips of paper which cling about
the neck. Students make a specialty of such pranks. A favourite one
was crowding, when the streets had only a narrow pavement for
pedestrians, while in bad weather the rest of the road was a mass of
unfathomable mud; another was to deal a hard blow on the high hat
of some worthy Philistine, plunging him suddenly into hopeless
darkness, or tracing a circle on the bald head of a toper asleep over
his wine, etc. In an inn in Giessen there is still in existence a bench
through whose seat a nail projects when a hidden cord is pulled—a
pleasant surprise for the unsuspecting guest who reclines upon it.
On entering the gymnasium I was initiated in an æsthetic little
practice which is of ancient date and serves as an instance of the
coarse jesting that is so common there. One of the company secretly
fills his mouth with beer and reclines on two chairs. With a
handkerchief spread over his face he plays the part of The
Innkeeper’s Daughter. They all sing the familiar song, and two
accomplices play the rôle of two of the peasants while the novice is
asked to be the third. The veil is thus twice withdrawn from the
daughter’s face, and twice replaced without any suspicious
revelations, but when the innocent third lover arrives he is greeted
with the stream of stale beer full in the face. A suitable companion-
piece to this decidedly disgusting trick is this incident related by
Joest as occurring among the Bush negroes of Guayana: “As I was
tending the wound of a young negress whose breast was badly cut,
she wearied of the operation, and suddenly seizing it in both hands
she sent a stream of warm milk into my face and fled laughing
away.”456
The most harmless teasing is the obvious kind which forms the basis
of much social play, such as games for a company like “Blind-Man’s
Buff,” “Fox Chase,” “Copenhagen,” and similar diversions. A striking
instance occurs in The Sorrows of Werther. During a violent storm
Lotta attempts to cheer the frightened company; she places chairs in
a circle and seats everybody in them—many acceding in the hope of
being rewarded with a sweet forfeit or two, and getting their lips all
ready. “We are going to play counting,” said Lotta. “Now, attention! I
am going round the circle from right to left, and you must count,
each taking the number that comes to him; and we are going like
lightning, and whoever hesitates or blunders gets a box on the ear,
and we are going on to thousands.” She then stretched out her arms
and flew around the circle, faster and faster. If any one missed,
bang! came a box on his ear, and in the laugh that followed, bang!
came another, and always faster and faster. Werther, however,
noticed with inward satisfaction that the two blows which he
received were somewhat harder than Lotta gave the others. When
the company is still less refined than this, joking sometimes becomes
so rough as to lose its playful character. The ancient Thracians were
celebrated for this sort of thing. Gutsmuth says truly that from this
circumstance much could be inferred concerning the state of
civilization among them, if we had no other sources of information.
“A man stands on a round stone holding a sickle in his hand and
having his head through a noose suspended from above. When he is
not expecting it a bystander pushes the stone away and there hangs
the poor wretch who has been chosen by lot for this fate. If he has
not sufficient skill and presence of mind to cut the knot at once with
the sickle he flounders there until he dies, amid the laughter of the
spectators.”457
Turning now to other forms of teasing than direct bodily annoyance,
we find again that children very early understand it. When the
pretence is made of great alarm at his beating with a spoon or
banging a book or at a sudden cry, a child as young as two years old
shows great delight, and will repeat the performance with a roguish
expression. From this time on, to cause sudden fright is a favourite
method of gratifying the taste for teasing. The ghostly
manifestations which terrify each generation in turn can often be
traced to some mischievous urchins.
I remember a joke played on a geographical professor at the
gymnasium who, as he carelessly opened a closet door, was
confronted by a skeleton which had been used in the previous
lecture. Students could hardly subsist without the ancient trick of
stuffing the clothes of a “suicide,” and placing the figure on the floor
of their victim’s room with a pistol lying near, or hanging it by a rope
to the window frame, to give the late home-comer a genuine scare.
In Athenäus we find a beautiful instance of readiness to meet such a
trick. King Lysimachus, who took delight in teasing his guests, one
day at a banquet threw a skilfully made artificial scorpion on to the
dress of one Bithys, who recoiled; but, quickly recovering himself,
said to the rather penurious king: “My lord, it is now my turn to
frighten you; I beseech you give me a talent.”458 Such sport with
fear, though harmless in these instances, becomes a passion with all
narrowminded, tyrannous natures, and leads to cruelty which is
anything but playful. Slatin’s dramatic work, Fire and Sword in the
Soudan, gives an instance of such traits in the character of the
Caliph Abdullah. Indeed, Abdullah had a part in, or rather was the
occasion of, Slatin’s first experience during the life of the Mahdi.
Slatin was taken prisoner by the Mahdi’s army before the gates of
Khartoum. The morning after the city was taken, alarming rumours
reached him; half incredulous, he looked out of his tent. “A mob had
collected before the quarters of the Mahdi and his caliphs; it seemed
to be getting into motion and making toward me, and I soon saw
clearly that they were coming in the direction of my tent. I could
now distinguish single persons. First walked the negro soldiers, one
of whom, whose name was Shetta, carried a bloody burden on his
head. Behind him howled the mob. The slaves entered my tent and
stood glowering before me, and Shetta opened the roll of cloth and
showed me—Gordon’s head! I grew faint and dizzy at the sight, my
breath stopped, and it was only by the greatest effort that I
commanded myself sufficiently to gaze upon that pallid face.” The
Mahdi and his caliphs had ordered this hideous cruelty.459
A common and early developed form of teasing is the deception
which imparts to the perpetrator a feeling of intellectual superiority.
Children display this in their tender years principally by pretending
that they are going to do forbidden or improper things, as revolt
against authority. When the little girl observed by Pollock was
twenty-three months old she often declined to kiss her father good-
night. She turned from him as if annoyed or indifferent, to make a
fausse sortie, and then called him back and gave the kiss.460
Sigismund’s boy often exhibited a “kind of humorous defiance of
authority,” such as grasping at a light standing near him, but not so
that it could burn him, and looking slyly at his father.461
Older children have innumerable tricks of this kind. A sort of game is
to strike on a table with a spoon or on the floor with a card and
repeat the formula “He can do little who can’t do this, this,” and pass
the stick or spoon to the next neighbour with the left hand. The
uninitiated who attempt to do this usually pass it with the right hand