100% found this document useful (2 votes)
46 views53 pages

Programming Kotlin Applications: Building Mobile and Server-Side Applications With Kotlin Brett Mclaughlinpdf Download

The document is about 'Programming Kotlin Applications' by Brett McLaughlin, which focuses on building mobile and server-side applications using Kotlin. It includes various chapters covering fundamental concepts of Kotlin, such as object-oriented programming, inheritance, and data structures. Additionally, it provides links to related resources and ebooks for further learning in Kotlin and other programming topics.

Uploaded by

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

Programming Kotlin Applications: Building Mobile and Server-Side Applications With Kotlin Brett Mclaughlinpdf Download

The document is about 'Programming Kotlin Applications' by Brett McLaughlin, which focuses on building mobile and server-side applications using Kotlin. It includes various chapters covering fundamental concepts of Kotlin, such as object-oriented programming, inheritance, and data structures. Additionally, it provides links to related resources and ebooks for further learning in Kotlin and other programming topics.

Uploaded by

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

Programming Kotlin Applications: Building Mobile

and Server-Side Applications With Kotlin Brett


Mclaughlin pdf download

https://ebookmass.com/product/programming-kotlin-applications-
building-mobile-and-server-side-applications-with-kotlin-brett-
mclaughlin/

Explore and download more ebooks at ebookmass.com


Here are some recommended products for you. Click the link to
download, or explore more at ebookmass.com

Frontend Development with JavaFX and Kotlin: Build State-


of-the-Art Kotlin GUI Applications Peter Späth

https://ebookmass.com/product/frontend-development-with-javafx-and-
kotlin-build-state-of-the-art-kotlin-gui-applications-peter-spath/

Beginning Kotlin: Build Applications with Better Code,


Productivity, and Performance Ted Hagos

https://ebookmass.com/product/beginning-kotlin-build-applications-
with-better-code-productivity-and-performance-ted-hagos/

Pro Spring 6 with Kotlin: An In-depth Guide to Using


Kotlin APIs in Spring Framework 6 1st Edition Peter Späth

https://ebookmass.com/product/pro-spring-6-with-kotlin-an-in-depth-
guide-to-using-kotlin-apis-in-spring-framework-6-1st-edition-peter-
spath/

Mastering Functional Programming with Python Brett


Neutreon

https://ebookmass.com/product/mastering-functional-programming-with-
python-brett-neutreon/
Kotlin for Web Development and Kotlin Collections: A
Beginner's Odyssey in Web Development 2 Books in 1 Jp
Parker
https://ebookmass.com/product/kotlin-for-web-development-and-kotlin-
collections-a-beginners-odyssey-in-web-development-2-books-in-1-jp-
parker/

Pro Kotlin Web Apps from Scratch August Lilleaas

https://ebookmass.com/product/pro-kotlin-web-apps-from-scratch-august-
lilleaas/

Build Mobile Apps with SwiftUI and Firebase: Learn SwiftUI


and Firebase by Building Real-World Applications
Communicating with a Backend 1st Edition Sullivan De Carli
https://ebookmass.com/product/build-mobile-apps-with-swiftui-and-
firebase-learn-swiftui-and-firebase-by-building-real-world-
applications-communicating-with-a-backend-1st-edition-sullivan-de-
carli/

Pro Kotlin Web Apps from Scratch: Building Production-


Ready Web Apps Without a Framework 1st Edition August
Lilleaas
https://ebookmass.com/product/pro-kotlin-web-apps-from-scratch-
building-production-ready-web-apps-without-a-framework-1st-edition-
august-lilleaas/

Hybrid Cloud Backup For Dummies®, Veeam Special Edition


Brett Mclaughlin

https://ebookmass.com/product/hybrid-cloud-backup-for-dummies-veeam-
special-edition-brett-mclaughlin/
PROGRAMMING
KOTLIN® APPLICATIONS

INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv

CHAPTER 1 Objects All the Way Down. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1


CHAPTER 2 It’s Hard to Break Kotlin. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
CHAPTER 3 Kotlin Is Extremely Classy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
CHAPTER 4 Inheritance Matters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
CHAPTER 5 Lists and Sets and Maps, Oh My! . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
CHAPTER 6 The Future (in Kotlin) Is Generic . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
CHAPTER 7 Flying through Control Structures. . . . . . . . . . . . . . . . . . . . . . . . . . 147
CHAPTER 8 Data Classes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
CHAPTER 9 Enums and Sealed, More Specialty Classes . . . . . . . . . . . . . . . . . . . 203
CHAPTER 10 Functions and Functions and Functions. . . . . . . . . . . . . . . . . . . . . . 233
CHAPTER 11 Speaking Idiomatic Kotlin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
CHAPTER 12 Inheritance, One More Time, with Feeling. . . . . . . . . . . . . . . . . . . . 303
CHAPTER 13 Kotlin: The Next Step. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331

INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
Programming Kotlin® Applications
Programming Kotlin® Applications
BUILDING MOBILE AND SERVER-SIDE
APPLICATIONS WITH KOTLIN

Brett McLaughlin
Copyright © 2021 by John Wiley & Sons, Inc., Indianapolis, Indiana

Published simultaneously in Canada

ISBN: 978-1-119-69618-6
ISBN: 978-1-119-69616-2 (ebk)
ISBN: 978-1-119-69621-6 (ebk)

Manufactured in the United States of America

No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means,
electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of
the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through
payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923,
(978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Permissions
Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online
at www.wiley.com/go/permissions.

Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect
to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without
limitation warranties of fitness for a particular purpose. No warranty may be created or extended by sales or promotional
materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the
understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professional
assistance is required, the services of a competent professional person should be sought. Neither the publisher nor the author
shall be liable for damages arising herefrom. The fact that an organization or Web site is referred to in this work as a citation
and/or a potential source of further information does not mean that the author or the publisher endorses the information the
organization or Web site may provide or recommendations it may make. Further, readers should be aware that Internet Web
sites listed in this work may have changed or disappeared between when this work was written and when it is read.

For general information on our other products and services please contact our Customer Care Department within the United
States at (877) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002.

Wiley publishes in a variety of print and electronic formats and by print-on-demand. Some material included with standard
print versions of this book may not be included in e-books or in print-on-demand. If this book refers to media such as a CD
or DVD that is not included in the version you purchased, you may download this material at booksupport.wiley.
com. For more information about Wiley products, visit www.wiley.com.
Library of Congress Control Number: 2020947753

Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, Programmer to Programmer, and related trade dress are
trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other
countries, and may not be used without written permission. Kotlin is a registered trademark of Kotlin Foundation. All other
trademarks are the property of their respective owners. John Wiley & Sons, Inc., is not associated with any product or
vendor mentioned in this book.
for Leigh, as always, my person
Visit https://ebookmass.com today to explore
a vast collection of ebooks across various
genres, available in popular formats like
PDF, EPUB, and MOBI, fully compatible with
all devices. Enjoy a seamless reading
experience and effortlessly download high-
quality materials in just a few simple steps.
Plus, don’t miss out on exciting offers that
let you access a wealth of knowledge at the
best prices!
ABOUT THE AUTHOR

BRETT MCLAUGHLIN has been working and writing in the technology space for over 20 years. Today,
Brett’s focus is squarely on cloud and enterprise computing. He has quickly become a trusted name
in helping companies execute a migration to the cloud—and in particular Amazon Web Services—by
translating confusing cloud concepts into a clear executive-level vision. He spends his days working
with key decision makers who need to understand the cloud as well as leading and building teams of
developers and operators who must interact with the ever-changing cloud computing space. He has
most recently led large-scale cloud migrations for NASA’s Earth Science program and the RockCreek
Group’s financial platform. Brett is currently the Chief Technology Officer at Volusion, an ecommerce
platform provider.
ABOUT THE TECHNICAL EDITOR

JASON LEE is a software developer happily living in the middle of the heartland. He has over 23 years
of experience in a variety of languages, writing software running on mobile devices all the way up
to big iron. For the past 15+ years, he has worked in the Java/Jakarta EE space, working on applica-
tion servers, frameworks, and user-facing applications. These days, he spends his time working as a
backend engineer, primarily using Kotlin, building systems with frameworks like Quarkus and Spring
Boot. He is the author of Java 9 Programming Blueprints, a former Java User Group president, an
occasional conference speaker, and a blogger. In his spare time, he enjoys spending time with his wife
and two sons, reading, playing the bass guitar, and running. He can be found on Twitter at twitter
.com/jasondlee, and on his blog at jasondl.ee.
ACKNOWLEDGMENTS

I USED TO WATCH MOVIES AND STARE in amazement at the hundreds of names that scrolled by at
the end. How could so many people be involved in a single movie?
Then I wrote a book. Now I understand.
Carole Jelen is my agent at Waterside, and she replied to an email and picked up the phone at a time
when I really needed someone to help me find my way back into publishing. I’m incredibly grateful.
On the Wiley side, Brad Jones was more patient than he ever should have been. Thanks, Brad! Barath
Kumar Rajasekaran handled a million tiny details, and Pete Gaughan and Devon Lewis kept the train
on the tracks. Christine O’Connor handled production, and Jason Lee caught the technical mistakes
in the text that you wouldn’t want to stumble over. Seriously, Jason in particular made this a much
better book with his keen eye.
As usual, it’s an author’s family that pays the highest price. Long days, more than a few weekends and
evenings, and a constant support keep us going. My wife, Leigh, is the best, and my kids, Dean, Rob-
bie, and Addie, always make finishing one of these a joy.
Let’s do brunch, everyone! Mimosas and breakfast tacos are on me.

—Brett McLaughlin
CONTENTS

INTRODUCTION xxv

CHAPTER 1: OBJECTS ALL THE WAY DOWN 1

Kotlin: A New Programming Language 1


What Is Kotlin? 2
What Does Kotlin Add to Java? 3
Kotlin Is Object-Oriented 3
Interlude: Set Up Your Kotlin Environment 4
Install Kotlin (and an IDE) 4
Install IntelliJ 5
Create Your Kotlin Program 8
Compile and Run Your Kotlin Program 9
Fix Any Errors as They Appear 10
Install Kotlin (and Use the Command Line) 10
Command-Line Kotlin on Windows 10
Command-Line Kotlin on Mac OS X 11
Command-Line Kotlin on UNIX-Based Systems 12
Verify Your Command-Line Installation 12
Creating Useful Objects 13
Pass In Values to an Object Using Its Constructor 13
Print an Object with toString() 14
Terminology Update: Functions and Methods 15
Print an Object (and Do It with Shorthand) 15
Override the toString() Method 16
All Data Is Not a Property Value 17
Initialize an Object and Change a Variable 19
Initialize a Class with a Block 19
Kotlin Auto-Generates Getters and Setters 20
Terminology Update: Getters, Setters, Mutators, Accessors 20
Constants Can’t Change (Sort of) 21

CHAPTER 2: IT’S HARD TO BREAK KOTLIN 25

Upgrade Your Kotlin Class Game 25


Name a File According to Its Class 26
Contents

Organize Your Classes with Packages 27


Put Person in a Package 28
Classes: The Ultimate Type in Kotlin 31
Kotlin Has a Large Number of Types 31
Numbers in Kotlin 31
Letters and Things 32
Truth or Fiction 33
Types Aren’t Interchangeable (Part 1) 33
You Must Initialize Your Properties 34
Types Aren’t Interchangeable (Part 2) 35
You Can Explicitly Tell Kotlin What Type to Use 36
Try to Anticipate How Types Will Be Used 37
It’s Easy to Break Kotlin (Sort of) 37
Overriding Property Accessors and Mutators 37
Custom-Set Properties Can’t Be in a Primary Constructor 38
Move Properties Out of Your Primary Constructors 38
Initialize Properties Immediately 39
Try to Avoid Overusing Names 41
Override Mutators for Certain Properties 41
Classes Can Have Custom Behavior 43
Define a Custom Method on Your Class 43
Every Property Must Be Initialized 44
Assign an Uninitialized Property a Dummy Value 45
Tell Kotlin You’ll Initialize a Property Later 45
Assign Your Property the Return Value from a Function 46
Sometimes You Don’t Need a Property! 47
TYPE SAFETY CHANGES EVERYTHING 49
Writing Code Is Rarely Linear 49
CHAPTER 3: KOTLIN IS EXTREMELY CLASSY 51

Objects, Classes, and Kotlin 51


All Classes Need an equals(x) Method 52
Equals(x) Is Used to Compare Two Objects 52
Override equals(x) to Make It Meaningful 54
Every Object Is a Particular Type 56
A Brief Introduction to Null 58
Every Object Instance Needs a Unique hashCode() 59
All Classes Inherit from Any 59
Always Override hashCode() and equals(x) 61
Default Hash Codes Are Based on Memory Location 63
Use Hash Codes to Come Up with Hash Codes 63

xvi
Contents

Searching (and Other Things) Depend on Useful and Fast equals(x)


and hashCode() 64
Multiple Properties to Differentiate Them in hashCode() 65
Use == over equals(x) for Speed 66
A Quick Speed Check on hashCode() 66
Basic Class Methods Are Really Important 67

CHAPTER 4: INHERITANCE MATTERS 69

Good Classes Are Not Always Complex Classes 69


Keep It Simple, Stupid 70
Keep It Flexible, Stupid 71
Classes Can Define Default Values for Properties 73
Constructors Can Accept Default Values 74
Kotlin Expects Arguments in Order 74
Specify Arguments by Name 74
Change the Order of Arguments (If You Need) 75
Secondary Constructors Provide Additional Construction Options 76
Secondary Constructors Come Second 76
Secondary Constructors Can Assign Property Values 77
You Can Assign null to a Property . . . Sometimes 79
null Properties Can Cause Problems 81
Handle Dependent Values with Custom Mutators 82
Set Dependent Values in a Custom Mutator 82
All Property Assignments Use the Property’s Mutator 83
Nullable Values Can Be Set to null! 84
Limit Access to Dependent Values 86
When Possible, Calculate Dependent Values 87
You Can Avoid Parentheses with a Read-Only Property 88
Need Specifics? Consider a Subclass 91
Any Is the Base Class for Everything in Kotlin 91
{ . . . } Is Shorthand for Collapsed Code 93
A Class Must Be Open for Subclassing 94
Terminology: Subclass, Inherit, Base Class, and More 95
A Subclass Must Follow Its Superclass’s Rules 96
A Subclass Gets Behavior from All of Its Superclasses 96
Your Subclass Should Be Different Than Your Superclass 97
Subclass Constructors Often Add Arguments 97
Don’t Make Mutable What Isn’t Mutable 98
Sometimes Objects Don’t Exactly Map to the Real World 99
Generally, Objects Should Map to the Real World 99

xvii
Contents

CHAPTER 5: LISTS AND SETS AND MAPS, OH MY! 101

Lists Are Just a Collection of Things 101


Kotlin Lists: One Type of Collection 101
Collection Is a Factory for Collection Objects 102
Collection Is Automatically Available to Your Code 104
Mutating a Mutable List 105
Getting Properties from a Mutable List 105
Lists (and Collections) Can Be Typed 106
Give Your Lists Types 107
Iterate over Your Lists 108
Kotlin Tries to Figure Out What You Mean 111
Lists Are Ordered and Can Repeat 111
Order Gives You Ordered Access 112
Lists Can Contain Duplicate Items 112
Sets: Unordered but Unique 113
In Sets, Ordering Is Not Guaranteed 114
When Does Order Matter? 115
Sort Lists (and Sets) on the Fly 115
Sets: No Duplicates, No Matter What 116
Sets “Swallow Up” Duplicates 116
Sets Use equals(x) to Determine Existing Membership 116
Using a Set? Check equals(x) 119
Iterators Aren’t (Always) Mutable 119
Maps: When a Single Value Isn’t Enough 119
Maps Are Created by Factories 120
Use Keys to Find Values 120
How Do You Want Your Value? 121
Filter a Collection by . . . Anything 121
Filter Based on a Certain Criterion 122
Filter Has a Number of Useful Variations 123
Collections: For Primitive and Custom Types 123
Add a Collection to Person 124
Allow Collections to Be Added to Collection Properties 126
Sets and MutableSets Aren’t the Same 127
Collection Properties Are Just Collections 128

CHAPTER 6: THE FUTURE (IN KOTLIN) IS GENERIC 129

Generics Allow Deferring of a Type 129


Collections Are Generic 129
Parameterized Types Are Available Throughout a Class 130
Generic: What Exactly Does It Refer To? 131

xviii
Visit https://ebookmass.com today to explore
a vast collection of ebooks across various
genres, available in popular formats like
PDF, EPUB, and MOBI, fully compatible with
all devices. Enjoy a seamless reading
experience and effortlessly download high-
quality materials in just a few simple steps.
Plus, don’t miss out on exciting offers that
let you access a wealth of knowledge at the
best prices!
Exploring the Variety of Random
Documents with Different Content
animal. The purchaser rides the mare about, and makes use of her
for war, the chace, and for his private journeys. If he make a razzia,
three-fourths of the plunder belong to himself, and one-fourth to his
partner. Should the mare be killed in war, in an expedition mutually
agreed upon, the loss falls upon them equally. But should death
overtake her at a fantasia, a wedding, or any other festival, the
purchaser is alone answerable—he has to make good 50 douros to
the vendor. If the animal, however, is killed in front of the tent,
suddenly, or under the horseman, while the latter is defending his
wife, his children, and his flocks,—the circumstances were beyond
his control, and he is not called upon for any reimbursement.
Should the mare produce a colt, it is reared until it is a year old,
when it is sold, and the proceeds equally divided between the
partners. On the other hand, if the mare has produced a filly, the
latter is valued when a year old, and the vendor has the privilege of
choosing the filly or the dam, paying or receiving the difference of
value. This sort of compact is never made with respect to horses.
An Arab who wishes to sell a horse will never consent to be the
first to name a price. Some one comes up and says: "Sell; thou wilt
gain." The vendor replies: "Buy; thou wilt gain."
"Speak thou first."
"No, speak thou."
"Was he purchased, or reared?"
"Reared in my tent, like one of my own children."
"What hast thou been offered for him?"
"I have been offered 100 douros."
"Sell him to me at that price—thou wilt gain. Tell me, then, what
thou asketh."
"See what is written with Allah."
"Come, let us drive away the previous bidder, and do thou take 10
douros over and above his offer."
"I accept. Take thy horse, and Allah grant thou mayst be
successful upon his back as many times as he has hairs upon it."
And should he be desirous to avoid all risk of future annoyance on
the subject of warranty, he adds in the presence of witnesses: "The
separation between us is from this very moment. Thou dost not
know me, and I have never seen thee."
It is not permitted to mount a horse for a trial until after the price
has been agreed upon. Nevertheless, before the bargain is
completely concluded the animal is tested against a horse that has a
certain local reputation. The mode of trial is somewhat singular. The
riders are barefooted, and are not allowed to touch their horse with
the heel during any part of the race.
Horses whose reputation is well established in the country are
never sold in the market-place. It is a positive insult to an Arab to
ask him, "wilt thou sell thy horse?" before he has made known his
intentions. "They must think me then in a miserable condition," he
will say, "that they should dare to make such a proposal to me."
Certain tribes are particularly addicted to traffic in horse-flesh. The
most noted of these Arab horse-dealers are the Beni-Addas. It is
said of them:
With others, horses are mere carrion,
With them, they are youthful brides:
With others, they are asleep,
With them, they dance.

For the rest, the Arab is no horse-dealer after the European


fashion. He never makes use of ginger, nor does he resort to any
trickery to disguise the bad points of his horse. He simply places him
before the purchaser. But for the fraud he disdains he substitutes a
flow of seductive eloquence. His inexhaustible oratory pours itself
forth in metaphors and hyperboles. Pointing to the animal, he will
say: "Uncover his back and satisfy thy gaze."
He will then go on:
"Say not it is my horse; say it is my son. He outstrips the flash in
the pan, or a glance of the eye. He is pure as gold. His eyesight is so
good that he can distinguish a hair in the night time. In the day of
battle he delights in the whistling of the balls. He overtakes the
gazelle. He says to the eagle: 'Come down, or I will ascend to thee!'
When he hears the voices of the maidens, he neighs for joy. When
he gallops he plucks out the tear from the eye. When he appears
before the maidens he begs with his hand. It is a steed for the dark
days when the smoke of powder obscures the sun. It is a
thoroughbred, the very head of horses! No one has ever possessed
his equal. I depend on him as on my own heart. He has no brother
in the world: it is a swallow. He listens to his flanks, and is ever
watching the heels of his rider. He understands as well as any son of
Adam: speech alone is wanting to him. His pace is so easy that on
his back, you might carry a cup of coffee without upsetting it. A
nosebag satisfies him, a sack covers him. He is so light that he could
dance on the bosom of thy mistress without bruising it."
The owner of the truly beautiful offers him for sale;
The owner of the swift one makes protestations.

Ben-Youssouf, having one day given in exchange for a mare of the


desert twenty she-camels with their young replied to his father who
had keenly rebuked him: "And why are you angry, my lord? Has not
this mare brought me the agility and the softness of skin of the
jerboa, the movement of the neck of the hare, the fleetness and the
vision of the ostrich, the hollow belly and the limbs of the
greyhound, and the courage and breadth of head of the bull? She
cannot fail to turn yellow the face of our enemies. When I pursue
them, she will plunder without ceasing the croups of their horses;
and if they pursue after me, the eye will not know where I have
passed!"
It will be seen, as I had previously indicated in tracing the outline
of a thoroughbred horse as sketched by the Arabs, that they esteem
it of consequence that in his form he should borrow certain details
from other animals. He should unite in himself the qualities that are
separately remarked in the gazelle, the greyhound, the bull, the
ostrich, the camel, the hare, and the fox. It is agreed that he should
have the long, clean limbs of the gazelle, the fineness and strength
of its haunches, the convexity of its ribs, the shortening of its fore-
legs, the blackness of its eyes, and the straitness of its armpits, He
should also recall to mind the length of the lips and tongue of the
dog, the abundance of its saliva, and the length of the lower part of
its fore-paws. They go so far as to regard this resemblance of the
horse to the greyhound as a means of guiding inexperienced
purchasers: at least, such appears to be the moral of an anecdote
widely circulated among them.
"Meslem-ben-Abou-Omar, having learned that one of his relatives
was travelling near the banks of the Euphrates, desired to avail
himself of this opportunity to obtain one of the famous horses of
that country. His relative knew nothing about horses, but was very
fond of the chace, and had some very fine dogs. Despatching a
servant with proper instructions, Meslem informed his relative that
the form of the horse he wished for corresponded to that of the best
of his greyhounds. An animal was thus procured, the like of which
the Arabs have never since met with."
Merou-ben-el-Keyss replied one day to some friends who accused
him of knowing nothing about either horses or women:
Yes, I have ridden horses
Sober, strong, and swift in the course,
Whose thighs were solid,
Their sinews lean and their rump rounded.
Forming as it were a channel towards the tail:
Their hoofs were hard: they could go without shoes.
By Allah! I used to fancy myself on an ostrich.

To find the tall grass


Which grows in solitudes dangerous to traverse,
In solitudes defended by the points of lances,
And by the descent of torrents,
I have many a time galloped,
When the birds were yet asleep in their nests.

To hunt the white-skinned zebra,


Whose legs are striped like Indian stuffs,
Or to overtake the antelope that lives in wild regions,
I have ridden horses with flesh hardened by exercise,
It was Allah who created them for the happiness of Believers.

Many a time, too, have I rested my heart


On that of a maid with budding bosoms,
And legs adorned with anklets of gold!
In our incursions of horsemen,
When eye must meet eye,
Many a time have I said:
Forward! forward! O my beloved courser!
Follow up the enemy routed and fleeing!
The value of a horse is in his stock.

REMARKS BY THE EMIR ABD-EL-KADER.


To a King who asked a poet for his horse named Sakab, the latter
replied: "Sakab is not for sale, nor is he to be exchanged. I would
ransom him at the price of my life. My family should die of hunger
rather than that he should suffer."
An Arab once said: "My countrymen blame me for being in debt,
and yet I contracted it for a horse of noble race and well rounded
forms, who confers honour upon them and serves as a talisman to
my goum, and to whom I have given a slave as his attendant."
An Arab one day sent his son to buy a horse in the market-place,
and he, before setting out, asked his father what qualities the animal
should have. The father made answer: "His ears should be ever in
motion turning sometimes forward, sometimes behind, as if he were
listening to something. His eyes ought to be keen and restless, as if
his mind were occupied with something. His limbs must be well set
on and well proportioned." "Such a horse," the son rejoined, "will
never be sold by his master."
Many of the Arabs of Upper Asia have genealogical trees, in which
they state and confirm by evidence that would be accepted in a
court of justice, the birth and parentage of the colt, so that when a
proprietor wishes to sell a horse he has only to produce his
genealogical tree to satisfy the purchaser that he is not deceiving
him.
I have seen among the Annaza, a tribe extending from Bagdad to
the confines of Syria, horses so absolutely priceless that it was
impossible to buy them, or at least to pay in cash for them. These
horses are usually disposed of to great personages or wealthy
merchants, who pay a fabulous price for them in thirty to fifty bills,
falling due at intervals of twelve months, or else they bind
themselves to pay an annual sum for ever to the vendor and his
descendants.
"I take them by surprise in the morning, while the bird is yet in its
nest and the moisture from the dew is making its way to the river.
"I surprise them with my sleek-coated courser that by its swiftness
overtakes the wild beasts and never wearies of hunting the gazelle
in all seasons and far from our home.
"He has the flanks of the gazelle, the legs of the female ostrich,
and the straight back of the wild ass standing as a sentinel on a
hillock.
"His croup, like to a heap of sand which moisture has rendered
compact, harmonizes with withers rising above the back, like the
pack-saddle of the camel kept in its place by the crupper.
"The swellings behind his ears are rounded like spheres: the
headstall and the headband seem as if they were fixed to the
extremity of the trunk of a palm-tree, stripped of its leaves.
"Fastened by the side of other horses, he bites and demeans
himself in his jealousy as if he were possessed by a demon."
SHOEING.

Contrary to the accepted opinion, the Arabs of the Sahara are in


the custom of shoeing their horses, whether on the two forefeet, or
on all four feet, according to the nature of the ground they occupy.
Those who shoe them on all four feet are the inhabitants of the
stony districts, and these constitute the majority. Among them are
the Arbâa, Mekhadema, Aghrazelia, Saâid-Mekhalif, Oulad-Yagoub,
Oulad-Nayl, Oulad-Sidi-Shikh, Hamyane, etc., etc. It is the universal
practice to take the shoes off in the spring, when the animals are
turned out to grass; the Arabs asserting that care must be taken not
to check the renewal of the blood which takes place at that season
of the year.
In every desert tribe there is a douar set apart by the name of
douar-el-maâllemin, "the master's douar." It is that of the farriers. A
profession entirely and especially devoted to that indispensable
complement of the Arab, his horse, might be expected to be made
the object of particular esteem. Accordingly, numerous and
invaluable privileges are accorded to them, but I am not certain if
the concession of these privileges is to be regarded as an homage
rendered to an art that refers exclusively to the horse, and not also,
seeing that it is the only art that survives in the desert, as a
remembrance of the encouragements formerly given to the able and
learned men of Arabia, Egypt, Africa, and Spain, by the Arabs of the
olden times, the brilliant conquerors of the Goths and
contemporaries of Haroun-al-Raschid.
The Arabs of the Sahara say that their first farriers came to them
from the towns on the seaboard, such as Fez, Tunis, Mascara,
Tlemcen, and Constantine, since when their knowledge and their
calling have been perpetuated in their families from generation to
generation. A farrier must likewise be something of an armourer and
iron-smith, to repair their bits, spurs, knives, guns, sabres, and
pistols, besides making horse-shoes, sowing needles, sickles, small
hatchets, and mattocks.
In return he enjoys the following immunities: He pays no
contributions—on the contrary, when his tribe proceeds to the Tell to
buy grain a collection is made for his benefit. This immunity,
however, he shares with the maker of sandals. "The worker in iron
and the maker of boots pay no imposts." Neither is he called upon to
offer kouskoussou or shelter to any one: in other words, he is
exempted from the duty of hospitality, which in certain cases is
imposed upon all. The constant toil demanded by his calling, the
unavoidable accidents to which he is liable through the urgent wants
of his brethren night and day, the sleepless nights he has to
undergo, entitle him to certain dues, called aâdet-el-maâllem, "the
master's dues." On their return from the purchase of grain in the Tell
every tent makes over to him a feutra of wheat and barley, and a
feutra of butter. In the spring he receives in addition the fleece of a
ewe. If a camel is killed for eating, he claims the part comprised
between the withers and the tail, deducting the hump, which, being
covered with fat, is esteemed a delicacy. In razzias and expeditions,
whether or not he has taken part in the enterprise, he is entitled to a
share of the booty. Usually, it is a sheep, or a camel, according to
the value of the prize. This due is known as the horseman's ewe.
The most important privilege, however, accorded to farriers, the
indisputable token of the protection they formerly enjoyed and of
the esteem in which they are still held, is the gift of life on the field
of battle. If a farrier is on horseback, with arms in his hands, he is
liable to be killed like any other horseman of the goum; but if he
alights and kneels down and imitates with the two corners of his
burnous—raising and depressing them by turns—the movement of
his bellows, his life will be spared. Many a horseman has saved his
life by means of this stratagem. A farrier can only enjoy the benefit
of this privilege by leading an inoffensive life, absorbed in the duties
of his business; but if he distinguishes himself by his warlike
prowess, he forfeits the privileges of his calling, and is treated as an
ordinary horseman. These advantages, on the other hand, are
compensated by a serious drawback. Should he happen to grow rich,
a quarrel is fastened upon him and in one way or another a portion
of his wealth is taken from him to prevent him from quitting the
district.
A farrier whose tribe has been plundered seeks out the victors,
and on the simple proof of his trade, recovers his tent, tools,
utensils, and horse-shoes. His implements consist of a pair of
bellows, which are nothing more than a goat-skin bag with three
openings, of which two are on the upper part in the same line, and
the third at the opposite end. Through this last protrudes the barrel
of a gun, or pistol, that conveys the blast to the fire. It is the wife's
department to work the bellows. She kneels down before the
charcoal which is placed in a hole, and takes in each hand one of the
upper orifices, which she closes by clutching the skin around them.
Then by alternately opening and closing her hands, she produces a
movement that causes a current of air sufficient for the purpose,
though not very powerful. The Arabs of the Sahara give the
preference over a more perfect one to these bellows with their
feeble blast, but which are easily transported in their nomadic
expeditions. To the bellows the farrier joins an anvil, a hammer, files,
pincers, and a vice. These instruments they obtain chiefly from the
seabord, though some of them they make for themselves. Formerly
they used to procure the iron in the great markets of the central
desert, at Tougourt, among the Beni-Mezabe, or at Timimoun,
according to the greater or less distance of those points from their
own neighbourhood; but now they begin to purchase them from us.
The charcoal they prepare themselves with the arar, the remt, the
senoubeur, and the djedary, the last being the most esteemed.
The horse-shoes are kept ready made, and always command a
sure sale, the Arabs being in the habit of laying in their supply for
the whole year, consisting of four sets for the fore-feet and four for
the hind-feet. The nails are likewise made by the farriers. When a
horseman goes to a farrier, taking his shoes with him, the latter is
paid by his privileges, and when the horse is shod, its master gets
on its back, merely saying: "Allah have mercy on thy fathers!" He
then goes his way and the farrier returns to his work. But if the
horseman does not bring his shoes with him, he gives two boudjous
to the farrier for the complete set, and his thanks are couched in the
simplest formula of Arab courtesy. "Allah give thee strength!" he
says, as he takes his departure.
In the Sahara, they put the shoes on cold. In the foot of the
horse, say the Arabs, there are hollow interstices, such as the frog,
the heel, etc., which it is always dangerous to heat, if only by the
approach of the hot iron. This aversion for the hot iron, founded on
the destructive action of heat on the delicate parts of the foot, is so
strong among them that in bivouacs, when they see us shoeing our
horses, they exclaim: "Look at those Christians pouring oil upon
fire!" In a word, they cannot understand why—especially in long
marches, when the exercise draws the blood down to the foot of the
horse—any one should wish to increase this natural heat by the
action of heated iron.
The shoes are very light, of a soft, pliant metal. In the fore-shoes
only three nails are driven in on each side. The toes are free, and
never fastened. According to the Arabs, nails in the toe would
interfere with the elasticity of the foot, and would cause the horse at
the moment he sets his foot on the ground precisely the same
sensation that a man experiences from wearing a tight shoe. Many
accidents thence ensue.
The feet are neither pared nor shortened. The hoof is allowed to
grow freely, the very stony ground and incessant work sufficing to
wear it off naturally as it tries to get beyond the iron. The necessity
of paring the feet is only felt when horses have been for a long time
fastened in front of the tent without doing any work, or have
remained long in the Tell. In such a case the Arabs simply make use
of the sharp-pointed knives which they are never without. This
method has this further advantage that if a horse casts a shoe, he
can still proceed on his journey, as the sole remains firm and hard.
"With you," say they, "and with your practise of paring the foot, if
the horse casts a shoe you must pull up, or see him bleeding, halting
and suffering."
The shoes are joined at the heel. As the horse can only suffer in
the part that is quick, and not in the part that is hard, it is, of
course, the frog that should be shielded from accident. The shoes
should therefore follow the curvature of the frog. They give to the
nail-heads the form of a grasshopper's head, the only form, as they
allege, that allows the nails to be worn down to the last without
breaking. They approve of our method of driving the nails into
punched holes and clinching them outside, which prevents a horse
from cutting himself; but their scarcity of iron obliges them to
content themselves, for their part, with hammering the nails down
upon the hoof, so as to render them serviceable a second time by
making a new head. If a horse overreaches himself they cut away
his heels and place light shoes on his forefeet, but heavier ones on
his hindfeet. They are careful not to leave one foot shod and the
other bare. If during an excursion a horse happens to cast one of his
fore-shoes, and his rider has not a fresh supply with him, he takes
off both the hind shoes and puts one of them on the forefoot; and if
the animal is shod only on his forefeet, the rider will take the shoe
off the other foot, rather than leave him in such a condition. Should
a horse, after a long journey such as the horsemen of the desert not
unfrequently make, require to be shod, it is no uncommon thing to
place a morsel of felt between the shoe and the foot.
The necessity, caused partly by the nature of the ground and
partly by the length of their excursions, of shoeing the horses of the
Sahara, has shown the expediency of accustoming the colt to let
himself be shod without resistance. They therefore give him
kouskoussou, cakes, dates, etc., while he allows them to lift his foot
and knock upon it. They then caress his neck and cheeks, and speak
to him in a low tone; and thus after a while he lifts his feet
whenever they are touched. The little difficulty experienced at a later
period, thanks to this early training, has probably given rise to the
Arab hyperbole: "So wonderful is the instinct of the thoroughbred
horse that if he casts a shoe he draws attention to it himself by
showing his foot." This exaggeration at least proves how easy these
horses are to be shod, and further explains how every horseman in
the desert ought to have the knowledge and the means of shoeing
his own horse, while on a journey. It is a point of the highest
importance. It is not enough to be very skilful in horsemanship, or to
train a horse in the most perfect manner, to acquire the reputation
of a thorough horseman—in addition to all this, he must likewise be
able to put on a shoe if necessary. Thus on setting out for a distant
expedition every horseman carries with him in his djebira shoes,
nails, a hammer, pincers, some strips of leather to repair his harness,
and a needle. Should his horse cast a shoe, he alights, unfastens his
camel-rope, passes one end round the kerbouss of the saddle and
the other round the pastern, and ties the two ends together at such
a length as will make the horse present his foot. The animal stirs not
an inch, and his rider shoes him without assistance. If it be a hind
shoe that has been thrown, he rests the foot upon his knee, and
dispenses with aid from his neighbours. To avoid making a mistake
he passes his awl into the nail holes in order to assure himself
beforehand of the exact direction the nails should take. If, by
chance, the horse is restive, he obtains for the hindfeet the help of a
comrade who pinches the nose or ears of the animal. For the
forefeet, he merely turns his hindquarters towards a thick prickly
shrub, or extemporises a torchenes with a nose-bag filled with earth.
Such cases, however, are rare.
The Saharenes declare that our shoes are much too heavy and in
long and rapid excursions must be dreadfully fatiguing to the
articulations, and cause much mischief to the fetlock joint. "Look at
our horses," say they, "how they throw up the earth and sand
behind them! how nimble they are! how lightly they lift their feet!
how they extend or contract their muscles! They would be as
awkward and as clumsy as yours did we not give them shoes light
enough not to burden their feet, and the materials of which as they
grow thinner commingle with the hoof and with it form one sole
body." And when I have answered that we did not discover in our
mode of shoeing the inconveniences pointed out by them, they
would reply: "How should you do so? Cover as we do in a single day
the distance you take five or six days to accomplish, and then you
will see. Grand marches you make, you Christians, with your horses!
As far as from my nose to my ear!"
HARNESS.

I have stated that the Arab saddle furnishes the rider with such a
firm seat that he does not trouble himself at all about certain vices in
a horse that are apt to cause us uneasiness. I will therefore say a
few words on the subject, though it is one now familiar to every
body.
The Arab saddle consists of a wooden saddle-tree, surmounted in
front by a long kerbouss or pommel, and by a broad troussequin
behind, high enough to protect the loins. The whole is covered and
held together, without nails or pegs, by a plain camel's skin which
gives it great solidity. The bands rest on the animal's back, and are
broad and flat, with a proper regard for the freedom of the withers
and loins, and afford a roomy and commodious seat. This last is very
hard, and it requires long practice to get used to it. The chiefs cover
it with a woollen cushion; but the common horsemen make it a point
of honour to ride on the bare wood, pretending that the use of
cushions is excessive effeminacy, and by diminishing their points of
contact cannot fail to invite them to sleep during a long course, and
consequently expose them to injure their horses. This is all the more
meritorious that for the most part, and especially in summer they
ride without trousers or drawers.
The saddle-tree is concealed by a stara, or covering of red
morocco, without ornament, in the case of individuals who are poor
or not very well-to do; and by a ghrebaria, or covering of cloth or
scarlet velvet, embroidered with gold or silver thread, and
ornamented with fringes, in the case of rich people and chiefs. The
deïr, or breast-piece, is very broad and is placed like that of our
French saddle. Its extremities are provided with two strong buckles
of iron or chased silver, and are fastened to the saddle-tree by small
girth-leathers, so placed as to keep the saddle in its true position.
The Arabs will have nothing to do with a crupper. They say it
interferes with every forward movement by the restraint it imposes
on the animal. They use it only with bat mules and donkeys, and
even then they do not pass it under the tail.
The stirrups are broad and clumsy. Their lateral faces gradually
diminish so as to unite with the upper bar which supports the ring
for the stirrup-leathers. They are used very short, and the whole foot
is thrust into them, and thus shielded from balls or falls. These
stirrups are extremely painful for those who are not accustomed to
them, because in raising oneself on them the eye strikes against the
bone of the leg. After a time the skin hardens and an exostosis is
formed that destroys all sensibility. It is by these exostoses that a
horseman is distinguished from a foot-soldier, and so clearly, indeed,
that in the province of Oran a certain Bey, having resolved to inflict
an exemplary chastisement on a tribe that had revolted, put to
death all who fell into his hands, bearing these marks. He well knew
that his anger was vented only on the horsemen. The stirrups of
wealthy individuals are either plated or gilt, and in former times the
great Turkish officers had them made of solid silver or gold. The
stirrups are suspended by leathers placed behind the girth, which
are simply twisted straps of morocco or camel's skin—when doubled
seven or eight times, they are of great strength. The noble make
their stirrup-leathers of silken cord; but as these, let them be ever so
solid, will not suffice when going at a rapid pace with the whole
weight thrown upon the stirrups, they add what are called maoune,
or stirrup-holders.
By way of horse-cloths the Arabs make use of pieces of felt
fastened to the saddle, to allow of the operation of saddling being
quickly performed. They are seven in number, and dyed blue, red,
and yellow—the blue being uppermost. An eighth one is added, but
white and unattached, so that it can be washed and dried in the sun
if the horse has perspired much. When these pieces of felt are well
shaped, the different colours lying one over the other and slightly
projecting, form an ornament in very fair taste, while they preserve
the horse from wounds and sores. Care is taken that they should
partially cover the loins.
The saddle-girth is placed in front of the stirrups, and is narrower
than ours. The Arabs as a rule girth their horses loosely; and they
can do so without inconvenience, as their saddles never slip round.
The headstall of the bridle is very broad; blinkers are used, and
occasionally, but not often, a throat-band, loose and fastened to the
headband. The Arab of the Sahara, however, does not approve of it,
because if his horse, as may often happen, should be seized by the
bridle in a fight, it deprives him of his usual resource of slipping the
bridle over the head, and so escaping from the enemy, whose prize
is thus reduced to the bridle alone. The blinkers have the advantage
of preventing a horse from being disquieted by external objects, and
are perhaps partly the cause of his not fearing anything. The
headstall and the headband of the bridle are embroidered in silk for
the commonality, and in silver or gold for the rich. The bit is
attached to the bridle, and is never cleaned. The bars are broad,
short, straight, and fashioned à la Condé. The canons are flat, and
the curb is a circular ring fixed to the upper part of the mouth piece.
The Arab bit allows no liberty to the tongue, and its lever-arm is
much shorter than in a French bit: consequently, it is much less
severe than has been hitherto imagined. The advantage it offers in
wartime of being free from those curbs and hooks which are often
so difficult to replace, cannot be too highly appreciated.
The reins are long. Two knots are made in them, one at the length
whence a horse can be kept at a foot pace without impeding the
freedom of his movements, and the other at the point where
experience has shown that the horse, after shortening the muscles
of the neck for a gallop, begins to bear on the hand. They are held
very full, and at times used as a whip to quicken the animal. The
Arabs reject the snaffle as calculated to confuse a horse. Rarely
combatting with the sabre, they have never experienced the
necessity of it.
As with them the horse is constantly fastened by hobbles, the
Arabs do not understand the value of the halter which we employ.
They replace it by a goulada, a thick cord of silk or camel's hair, of a
more or less lively colour according to the coat of the animal. It is
passed round the neck, and from it are suspended small morocco
sachets, inclosing talismans that have the virtue of preserving from
the evil eye, of averting sickness, and of bringing success in war.
This goulada is, in the first place, an ornament, and, besides, it
serves to hold the horse by, when required. To take him by the
forelock to hold or lead him, as we do, is to dishonour him; for the
Prophet has said: "The good things of this world to the day of the
last judgment shall be suspended from the hairs that are between
the eyes of your horses."
The Arabs of the Sahara make use of a whip to correct a horse
when they are breaking him in, or to excite him in war or at the
chace. It is composed of five or six twisted leather thongs, attached
to a ring fixed to a bar of iron six or seven inches long, terminating
in another ring. To the latter is fastened the small leather thong that
is slipped over the wrist. Round the iron rod, but shorter by an inch,
is a hollow cylinder, also of iron, of a diameter that allows the rod to
play easily within it. The whip is used with all their might. It
punishes so severely that after a time it suffices to shake it in order
to make the animal dash forward at full speed—the noise made by
the cylinder coming in contact either with the rings or with the bar
that connects them, recalling to his memory the nearly similar sound
of the tekerbeâa.
In the desert the Arabs carry from the kerbouss of the saddle a
club a cubit in length, and terminating in a large knob garnished
with spikes. It is hung from the wrist by a leather thong. Some
replace this by a longer club terminating in a hook, for the purpose
of picking up booty from off the ground, without alighting from the
saddle. The latter is called el aâraya, or the despoiler. Neither the
Arbâ nor the Harrars would ever mount on horseback without one of
these clubs.
The spurs have only one spike, and are clumsy, solid, and long.
They are kept in their place by a simple leather strap crossed, and
are attached very loosely.
Every Arab carries as a complement of his equipment, suspended
from the kerbouss of his saddle, a kind of sabretache called djebira
or guerab. It contains several compartments, for the purpose of
carrying bread, biscuit, a mirror, soap, cartridges, shoes, a flint,
writing materials, etc., etc., according to the calling of the owner.
Some djebiras are extraordinary rich. I am convinced that the
sabretaches of our Hussars must have come to us from the East.
The common people on an expedition carry also suspended from the
troussequin of their saddle a kind of wallet, which they call
semmâte. They are shorter than ours, so as not to irritate the
animal's flanks.
With the exception of the great chiefs, the Arabs have no holsters
to their saddles. They carry their pistols in their girdles, or in a heart-
shaped case that rests on the left side, and is held in its place by a
leather strap over the shoulder and another round the body. They
prefer this latter mode, because they are sure of having them on
their person if they chance to be separated from their horse.
Those who do not put a throat-band to their bridle generally adorn
their horses with boar's tusks or lion's teeth, or with talismans which
they attach to their necks by means of silk or woollen cords.
To our taste, the less covered a thoroughbred horse may be, the
better are the beauty and elegance of his form displayed. The Arabs
think differently. They say:
Kohol[51] embellishes the bearer of babes,
A tribe embellishes a defile,
And the saddle embellishes horses.

During my residence in Africa, I have seen so many horses that it


was impossible to dispose of when girt with an English saddle,
bought up with avidity when caparisoned with an Arab one, that I
am much inclined to adopt the native prejudice. Many a time also I
have observed that when an Arab, who had purchased a horse from
an European, had covered its back with his own saddle, the vendor
was seized with regret, being struck with a beauty he had never
before noticed. It is true, the only extravagance indulged in by the
Arabs is in their harness; for the Prophet, while proscribing the use
of gold in their garments, authorised and even enjoined it, in respect
of arms and horses. He said: "Whoso fears not to spend money on
the maintenance of horses for the holy war, shall be considered,
after his death, as the equal of him who has always been open-
handed." It is therefore no uncommon sight to see, even in these
times of trouble and misery, an Arab chief treat himself to a saddle
worth from £80 to £120, and on days of feasting or on solemn
occasions, cover the croup of his horse with shelil, a silken stuff of
brilliant hues.
MAXIMS OF THE ARAB CAVALIER.

When thou mountest a horse, first pronounce these words: Bi es-


sem Allah, "in the name of Allah." The grave of the horseman is
always open.
The cavalier of Truth should eat little, and, above all, drink little. If
he cannot endure thirst, he will never make a warrior—he is nothing
but a frog of the marshes.
Purchase a good horse. If thou pursuest, thou attainest: if thou
art pursued, the eye presently knoweth not where thou hast passed.
Prefer a horse from the mountain to a horse from the plain, and
the latter to one from the marshland, which is only fit to carry the
pack-saddle.
For the combat mount a horse with a trailing tail [that is, one at
least eight years old]. In the day when the horsemen shall be so
crowded together that the stirrups knock against one another, he will
save thee from the thick of the fight and bear thee back to thy tent,
though he were pierced by a ball.
When thou hast purchased a horse, study him carefully, and give
him barley more and more every day until thou hast ascertained the
quantity demanded by his appetite. A good horseman ought to know
the measure of barley suited to his horse, as exactly as the measure
of powder suited to his gun.
Suffer neither dogs nor donkeys to lie down upon the straw or
barley you intend to give to your horses.
The Prophet has said: "Every grain of barley given to your horses
shall secure you an indulgence in the other world."
Give barley to your horses; deprive yourself to give them still
more; for Sidi-Hamed-ben-Youssouf has remarked; "Had I not seen
the mare produce the foal, I should have said it was the barley." He
has also said: "Superior to spurs there is nothing but barley."
Do not water your horses more than once a day, at one or two in
the afternoon; and give barley only in the evening, at sunset. It is a
good practice in wartime, and, besides, it is the way to make their
flesh firm and hard.
To train a horse that is too fat for the fatigues of war, reduce him
by exercise, but never by lowering his keep.
So long as your horse, when at work, sweats over his whole body,
you may say that he is not in good wind. But you may count upon
him as soon as he sweats only on the ears and chest.
Leave not thy horse near others that are eating barley, without he
has some likewise, for otherwise he will fall ill.
Never water your horse after having given him barley. It would be
the death of the animal.
Never give water to a horse after a rapid gallop, for here is danger
of checked perspiration.
After a rapid gallop, water him with the bridle on, and feed him
with the saddle-girth on, and thou wilt not repent of it.
Be clean, and perform your ablutions before mounting your horse,
and the Prophet will love you.
Whoso is guilty of an impropriety on the back of his horse is not
worthy to own him. Moreover, he will suffer for it, for his horse will
do himself a hurt.
Never fall asleep upon thy horse. The sleep of the rider wounds or
wearies the animal.
When you put a horse to his speed, husband his strength for the
time of need. He must be treated like a goat-skin water-bag, which if
you open gradually, keeping the neck nearly closed, you will easily
preserve the water. But if you open it hastily, the water will rush out
all at once, and not a drop will remain to quench your thirst.
A horseman should never urge his horse to full speed, while going
up or down hill, unless he is forced to do so. He ought, on the
contrary, to hold him in.
"Which dost thou prefer?" the horse was asked one day, "The
getting on, or the getting off thy back?" And he made answer: "Allah
curse the point where they meet!"
When you have a long journey to accomplish, relieve your horse
by changing his pace, to enable him to recover his wind. Repeat this
until he has sweated and dried three times, then shift his girth, and
afterwards do what you will with him. He will never fail you in a
difficulty.
If, on a march, you have a strong wind right in your teeth,
contrive if possible to save your horse from facing it—you will spare
him various diseases.
If at the bivouac your horse is so placed that he cannot move out
of the wind that is blowing violently into his nostrils, do not hesitate
to leave the nose-bag suspended from his nose—you will preserve
him from serious mischief.
If you have put your horse to the gallop and other mounted men
are following behind, soothe him, do not urge him on, for he will be
sufficiently excited of himself.
If you are chasing an enemy and he commits the error of pushing
his horse on, hold in your own—you are sure to overtake the
fugitive.
Never strike a thoroughbred. It humiliates him, and his pride will
revolt and urge him to resistance. It is quite sufficient to correct or
animate him by word or gesture.
If, after having wandered a long time in the mountains and by
narrow path-ways, the horseman descends into the plain, it is good
to give the animal a gallop over a short distance.
At starting the rider should not scruple to play with his horse for a
few minutes, as he will thereby relax his joints, and assure himself
peace for the rest of the day. In like manner, after a painful and
fatiguing excursion, at the moment he reaches his tent let him
perform the fantasia for a while. The women of the douar will
applaud, saying: "Look at so-and-so, son of so-and-so!" and he will
find out, besides, what his horse is really worth.
The rider who does not teach his horse a good pace is no true
horseman, but an object of pity.
If, in war time or in hunting, your horse is in a lather, and you
happen to come across a stream, have no fear of allowing him to
swallow half a dozen mouthfuls with the bridle on. So far from doing
him any harm it will enable him to continue his course.
When you dismount think of your horse before thinking of
yourself. It is he who has carried you, and is to carry you again.
After a long journey, either unsaddle your horse immediately and
throw cold water over his back, at the same time leading him up and
down; or else leave the saddle on until he is perfectly dry and has
eaten his barley. There is no middle path between these two
courses.
When after a long journey in winter, through rain and cold, you at
length regain your tent, cover your horse well, and give him parched
barley and warmed milk, but do not let him have any water that day.
Suffer not your horse to have anything to eat or drink directly
after a journey of unusual length, or you will produce inflammation.
Put not your horses to speed, unless positively compelled to do so,
during the great heats of summer. The animal himself says:
Put me not to speed in the summer,
If thou would'st that I should one day save thee from the sabre.
In a case of life or death if you feel your horse's wind failing, take
off the bridle if only for an instant, and strike him on the croup with
a spur sharply enough to draw blood.
If after a rapid gallop you are able to give a little respite to your
horse, you will know when to start again by the drying up of the
mucus that issues from his nostrils.
If you would know, at the end of a day of excessive fatigue and
hard riding, how far you can yet depend upon your horse, get off his
back and pull him strongly towards you by the tail. If he remains
unmoved as if rooted to the ground, you may still rely upon him.
On an expedition when, after great fatigue, you have only a
moment for repose, take for your pillow some of the bridles of your
brethren, and you will not be abandoned or forgotten, happen what
may.
A horseman ought to study the habits of his horse and obtain a
thorough knowledge of his character. He will then know whether,
when he alights, he can have any confidence in him and can leave
him in the midst of other animals, or whether he must keep an eye
upon him and hobble him. Not one of these details is a matter of
indifference in the presence of an enemy.
The proper season for calling on a horse to do great things, is the
spring, before the great heats; or the autumn, before the intense
cold.
The horse is what his work is.
Yes, give the heel to your steeds,
Learn and teach them what will be of service to you.
In this world it is certain that, one day or another,
Every man has to face him who demands his life.

REMARKS BY THE EMIR ABD-EL-KADER.


The Arabs have preserved the practice of racing their horses
against one another, in which they indulged so far back as in the
times of idolatry, prior to Mohammed. The new law has in no way
altered this usage. On the contrary it has consecrated its lawfulness,
and, by impressing it with the seal of religion, has attached
additional importance to it.
For racing, the Arabs subject their horses to a preparatory
regimen, which is called tadmir, or training. Thank to this treatment,
a horse acquires a wonderful speed. The tadmir is in this wise.
They begin by increasing the animal's allowance of food, so that
he gains fat to a perceptible degree. When this result has been
attained, they begin to reduce his condition by gradually diminishing
his rations for forty days, until they have reached the minimum of
nourishment. During these forty days, they subject him to
progressive exercise. At the same time, and from the very first day
from lowering his keep, they cover the animal with seven djellale, or
horse-cloths, one of which they remove every six days. The sweating
disperses all the fat, gets rid of a useless weight, gives tone to the
muscles, and leaves nothing but hard flesh. By means of this
treatment, a horse attains, according to the stock he comes from,
the highest degree of speed. Thus prepared, the horse is brought on
to the djalba or race ground.
Horses arriving from all districts are led on to the djalba, and
crowds of people likewise flock thither. At no other time, except at
the period of the assemblage of pilgrims, is such a concourse of men
to be seen, and all the nobles and chiefs are present.
"We have taken part in the races, and, although it was yet early,
the crowd was as great as at the period of pilgrimages."
Horses properly trained are never suffered to run against those
that are not. They are placed in different classes, to each of which a
different goal is assigned. The trained horses have much the longest
course to run. The race-course in this case in called el midmar, and
upon this the learned Bokhari has remarked:
"The Prophet caused the trained horses to run by themselves, and
fixed a distance of seven miles to traverse, while for ordinary horses
he fixed a distance of only three miles."[52]
The horses are grouped together by tens, but before allowing
them to start and to prevent false starts, the following precaution is
taken. A rope is stretched across touching the animals' chests, the
two ends of which are held by two men. This rope is called el
mikbad, and el mikouas; and in reference to it the Prophet said:
"The horse runs according to his race, but placed before the mikouas
he runs according to his chance of a rider." Or, in other words: "In
ordinary circumstances the speed of horses depends on the qualities
of blood with which they are more or less endowed; but in a race
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.

More than just a book-buying platform, we strive to be a bridge


connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.

Join us on a journey of knowledge exploration, passion nurturing, and


personal growth every day!

ebookmasss.com

You might also like