Full download (Ebook) Learn With: Angular 4: Collected Essays: Angular CLI, Unit Testing, Debugging TypeScript, and Angular Build Processes by Jeffry Houser pdf docx
Full download (Ebook) Learn With: Angular 4: Collected Essays: Angular CLI, Unit Testing, Debugging TypeScript, and Angular Build Processes by Jeffry Houser pdf docx
com
https://ebooknice.com/product/learn-with-
angular-4-collected-essays-angular-cli-unit-testing-
debugging-typescript-and-angular-build-processes-6856786
DOWLOAD EBOOK
ebooknice.com
ebooknice.com
ebooknice.com
ebooknice.com
https://ebooknice.com/product/primary-mathematics-3a-33552624
ebooknice.com
https://ebooknice.com/product/angular-up-and-running-learning-angular-
step-by-step-7212814
ebooknice.com
LEARN WITH
ANGULAR 4
COLLECTED ESSAYS
By Jeffry Houser
https://www.learn-with.com
https://www.jeffryhouser.com
https://www.dot-com-it.com
Want More?
You should check out this book’s web site at www.learn-with.com
for more information, such as:
· Source Code: You can find links to all the source code for this
book and others.
· Errata: If we make mistakes, we plan on fixing them. You can
always get the most up-to-date content available from the
website. If you find mistakes, please let us know.
· Test the Apps: The web site will have runnable versions of
the app for you to test.
· Bonus Content: You can find more articles and books
expanding on the content of this book.
Chapter 1: Dissecting Build Scripts
The Angular CLI project has become the most common approach for
building Angular 4 applications. When I started writing the Learn
With series on Angular 4, it had not become the standard. As such I
created my own workflow process. I based it around Gulp, which I
used extensively for building AngularJS 1.x applications. I thought it
would be a great learning exercise to explain more details. This
article will dissect the scripts I wrote and explain how to use them.
All the build scripts are in the Learn With application repository,
however if you want the sample application too, get it from this
GitHub repository.
@NgModule({
imports: [ BrowserModule, AppRoutingModule
],
declarations: [ AppComponent ],
providers: [{provide: LocationStrategy,
useClass:HashLocationStrategy}],
bootstrap: [ AppComponent ]
})
export class AppModule { }
This file imports four Angular classes from three Angular libraries.
The core library and platform-browser library are used for loading
and running the app. The HashLocationStrategy and
LocationStrategy classes are used for internal navigation. We have
two custom libraries: AppComponent and AppRoutingModule. The
appComponent is the primary component for our application, and
the AppRoutingModule will handle navigation duties. Then the
@ngModule annotation is created. This is metadata that defines
the application. It imports the browserModule and
AppRoutingModule. The imports property is used to load other
modules into this one so it’s functionality, such as components or
providers, can be available. The declarations property is used to
load components as part of this module, and the AppComponent is
loaded here.
The providers property is used to load the hashing strategy. This
controls how the routing module will change the URL as you move
to different screens across the app. The bootstrap property is used
to load the application’s main component, AppComponent. Finally,
The AppModule is exported, which is the code that allows the
main.ts to access the AppModule.
Now, look at the app.component file:
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
template: `<h1>Hello {{name}}</h1>
<router-outlet></router-outlet>`,
})
export class AppComponent { name = 'World'; }
This is the class that was loaded, and imported, into the main
application module.
Now, create the FirstComponent in the
com/dotComIt/sample/views/first directory. The component will
be comprised of three files: A CSS file, an HTML Template file, and a
TypeScript file. Create the CSS file first, named
first.component.css. This is just a placeholder for future user, but
let’s add something in it for proof of principle:
.no-padding{
padding:0;
}
This is just some place holder style to test our processing code.
Then the template file, second.component.html:
<h1>Second View</h1>
<a [routerLink]="['/first']">Go to First View</a>
This displays a header for the second view, and a link back to the
first view.
Finally, the second.component.ts file:
import { Component } from '@angular/core';
@Component({
selector: 'second',
templateUrl :
'./com/dotComIt/sample/views/second/second.component.html
styleUrls: [
'./com/dotComIt/sample/views/second/second.component.css
]
})
export class SecondComponent { }
This configuration object tells the library that the js path will point
to the js directory. When we write build scripts, we’ll put all the
relevant Angular libraries in the js sub-directory of our final build.
Next, create a map configuration property:
map: {
app: 'com',
'@angular/core':
'js:@angular/core/bundles/core.umd.js',
'@angular/common':
'js:@angular/common/bundles/common.umd.js',
'@angular/compiler':
'js:@angular/compiler/bundles/compiler.umd.js',
'@angular/platform-browser':
'js:@angular/platform-
browser/bundles/platform-browser.umd.js',
'@angular/platform-browser-dynamic':
'js:@angular/platform-browser-
dynamic/bundles/platform-browser-dynamic.umd.js',
'@angular/http':
'js:@angular/http/bundles/http.umd.js',
'@angular/router':
'js:@angular/router/bundles/router.umd.js',
'@angular/forms':
'js:@angular/forms/bundles/forms.umd.js',
'rxjs': 'js:rxjs'
},
The map configuration tells the code “when the code imports the
‘property’, go look in the ‘value’ to find the directory for the
library”. The main angular libraries are listed. Explanation of the
Angular libraries is beyond the full scope of this article. The
important things to notice are that the js path is specified in the file
location for most of the libraries. The second thing to notice is that
the app map points to the com directory, where all our custom code
is located.
Next, specify the packages. A package is a collection of files that
have shared functionality:
packages: {
app: {
main: './dotComIt/sample/main/main.js',
defaultExtension: 'js'
},
rxjs: {
defaultExtension: 'js'
}
}
Two packages are specified. The first is app, which is our main
application and custom code. It defines the main entry point,
main.js—the name of the file that main.ts will be converted too. It
also specifies the default extension of js. The second package
specified is a package used by Angular, rxjs.
This is a lot of setup, but we’re almost done, and we can start
focusing on the build scripts.
Write the Main Index Page
Let’s look at the last bit of our application, the main index.html file.
Create this file in the root of the src directory. It will be the page
that users use to load our application. Start with a basic HTML
page:
<html>
<head>
<title>Angular QuickStart</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-
width, initial-scale=1">
</head>
<body>
</body>
</html>
This looks into the config file; finds the app, which points to our
custom com directory code; and then starts the code running.
The body needs the main application’s tag:
<my-app>Loading AppComponent content here ...
</my-app>
That installs the dependencies, now it is time to setup the Gulp file.
Create a Gulp Configuration Module
I want to encapsulate all the configuration options, or modifiable
variables, into a separate Node component than the main Gulp file.
Create a file named config.js in the project root. This will be split up
into three separate sections, each one representing an object of
relevant values.
First, create a baseDirs object:
var baseDirs = {
sourceRoot : "src/",
codeRoot : 'com',
destinationPath : 'build',
};
This contains the basic directories structure for finding the source
code root ‘src’, the Angular application root ‘com’, and the
destination path ‘build’. This object will be reused inside this config
module, and as part of our main Gulp script. Now, create a config
object:
var configObject = {
};
This will contain various values that we want to configure, but for
now leave it empty. We’ll populate it throughout this article.
Finally, create a staticConfig value:
var staticConfig = {
};
The Object.assign() combines all three objects into a new one which
is exported to be used as a module inside a different NodeJS script.
The idea of having a config file separate from the scripts file is so we
can easily make changes to directories without affecting the scripts.
Lint the TypeScript
Create a file named gulpfile.js in the root directory of the project.
Our first task to create is going to lint the TypeScript code. The first
step is to import the config object:
var config = require("./config").config;
Language: English
BY
RALPH D. PAINE
WITH A FRONTISPIECE BY
FRANK E. SCHOONOVER
My Dick:
dear
Richard Cary let the axe rest against the gate while he pondered
in his deliberate fashion. At first it had annoyed him to think of
stepping down a peg. He had been looking forward to command in
two or three years more. But times were hard and the tenure of
employment in cargo steamers uncertain. He might be shifting
about, from one company to another, and if freight rates dropped
much lower he would be likely to join the luckless mob of stranded
officers.
There was a prospect of advancement in the Union Fruit
Company’s service. A second mate’s pay would meet his modest
needs, with a surplus to send home. An easier life, decent men to
handle, a smart, efficient ship—these were arguments not to be
tossed aside. So much for the practical aspect of it. This was
overshadowed, however, by the desire to make the southern run. It
was more like an urgent impulse. Until now, voyaging in the tropic
zones had never appealed to him. He had a Western Ocean sailor’s
pride in fighting bitter gales and pounding seas.
Rather puzzled by his quick surrender to this summons, he
turned back to the house and forgot to pick up the axe. He walked
briskly, chin up, a man astir and efficient. Queer how a few lines of
that letter had thrilled his matter-of-fact mind! He liked the sound of
Cartagena and the Spanish Main. Where the devil was Cartagena?
He knew there was a port of that name on the coast of Spain. This
other one was somewhere in the Caribbean, down Colombia way, as
he vaguely recalled.
Into the kitchen swung Richard Cary and demanded to know
where the atlas was kept. His mother wiped the flour from her hands
and exclaimed:
“First time I ever saw you in a hurry about anything except your
meals. What under the sun ails you?”
“Outward bound—the night train for New York. I want to find out
where I go from there.” His mellow voice rang through the low-
studded rooms. His mother was dismayed. The sea had called her
towering son and he was a different being. Almost timidly she said:
“But you expected to make a longer visit, Richard. Why, you
aren’t really rested up. You sat around here—”
“And enjoyed every minute of it,” he broke in, with a boyish
laugh. “Now I’m going south in a banana boat, where the flying
fishes play. Do I have to pull this house down to break out the
atlas?”
“Mercy sakes, no! It’s under the Bible on the parlor table where it
has set for years. There’s yellow fever and snakes down there, and
how are you off for summer underwear?”
With his chin in his hand he pored over the map of the Caribbean
and the sailing tracks across that storied sea. Jamaica and the
Isthmus of Panama! Thence his finger moved along the coast to
Cartagena and Santa Marta and La Guayra. His kindled fancy played
around the words. They were like haunting melody. It was an
emotion curiously novel. To find anything like it, he had to hark back
to the fairy tales of childhood.
The feeling passed. His mother’s anxious accents recalled him to
himself.
“But is it necessary, Richard, for you to rush off and take a
second officer’s position? Why don’t you wait for something better?
It’s not a mite like you to fly off at a tangent like this. Common
sense was always your strongest point.”
“This is just the berth I want, I tell you,” said he. “It sounds new
and interesting. Now if you will help me get my dunnage together—
clean clothes and so on—where’s Bill?”
“Gone to the village on an errand, Richard,” was the meek
answer. “He will be back in plenty of time to drive you to the train.
Well, I’ve seen you wake up for once. Is this the way you boss men
around on a ship?”
“For Heaven’s sake, I didn’t mean to sound rough, mother dear. I
can move lively when something has to be done. And I don’t want to
lose the chance of sailing in this Tarragona.”
The details of departure arranged, he resumed his wonted
humor, care-free and easy. His mother wept a little when the sound
of sleigh-bells heralded the approach of William in the pung. There
had been other partings like this, however, and she briskly waved a
handkerchief from a window as he rode away. She still had her
qualms about those outlandish ports, but he had solemnly sworn to
shake the scorpions out of his shoes before putting them on, and
this gave her some small comfort.
Young William fired a volley of questions on the road to the
station, but his big brother had little to say. The spell of the
Caribbean had faded. It was merely another job in a different ship.
This lazy reticence irritated William who burst out:
“Sometimes you act as if you were dead from the neck up, Dick.
You go to sleep in your tracks like a regular dumb-bell. Where’s your
pep and punch if you’re such a blamed good officer? I’m entitled to
talk plain, seeing as it’s all in the family. Don’t you ever get mad?”
“Quite peevish at times, Bill. There was a cabin steward last
voyage who brought me cold water to shave with, two days running.
I hated to do it, but I had to beat him to death with a hairbrush and
throw his body overboard. He left a wife and seven children in
Sweden and begged piteously for his life. Discipline, Bill! You have
simply got to enforce it.”
William snorted with disgust. He was off this big lump of a
brother, he said to himself, who treated him like a silly kid. The train
was late, and while they waited at the station a stray dog wandered
along the platform. It was no vagrant cur, but a handsome collie
which had somehow lost its master and was earnestly trying to find
him. The plight was enough to inspire sympathy in the heart of any
man that loved a good dog.
“Take him home and keep him until you can ’phone around and
stick up a notice in the post-office, Bill,” said Richard Cary.
Before William could catch the collie, the express train came
thundering down. One of the loungers on the platform emitted a
loud guffaw and tossed a bit of stick between the rails of the track.
The collie rushed to retrieve it. Richard Cary cursed the man and
yelled at the dog which bravely snatched the stick and fled to safety,
escaping destruction by no more than the length of its plumed tail. It
stood quivering in every nerve, nuzzling Richard’s hand.
“Put my bags aboard, Bill,” said the mariner. “I have a little
business to attend to. It will take only a minute.”
William concluded to hover within sight and sound. His brother’s
face was white as he moved closer to the man who had attempted
to slay a dog in wanton sport. The offender was heavily built, with a
truculent air, a stranger to the village. His coarse visage reflected
alarm, but before he could fight or retreat his right arm was caught
and twisted back in a grip that made him scream with pain.
A bone snapped. It would be some time before he could throw
sticks with that right arm. Beside himself with rage and anguish, he
bellowed foul abuse.
“Shut your dirty mouth,” commanded Richard Cary. “You are
getting off easy.”
The tortured blackguard was given time to utter one more
obscene insult. An open palm smote his face. It was a buffet so
tremendous that the victim was fairly lifted from his feet. He pitched
into the snow at the edge of the platform and lay huddled without
motion.
“Good God-amighty, Dick, you busted that guy’s neck,” gasped
William as he tugged at his brother’s sleeve. “And all you did was
slap him. If you want to hop this train, you’d better hustle.”
“Broke his neck? No such luck,” growled Richard. “If he wants to
see me again, tell him to wait till I come back. All right, Bill. Let’s
go.”
He stooped to pat the head of the affectionate collie and ran to
swing on board of the moving train. William had a farewell glimpse
of his face at the window. Again it was ruddy and good-humored.
The smile was a little wistful, almost like that of a boy leaving home
for the first time. The younger brother stood staring after the train.
His thoughts were confused. Presently he said to himself:
“Looks to me like there is a good deal for us to learn about Dick.
You don’t catch me sassin’ him again. I certainly did run an awful
risk when I called him a dumb-bell. Come on, pup. He told me to lug
you home and I feel darn particular about obeyin’ orders.”
CHAPTER II
THE SEA DOGS OF DEVON
The Tarragona, of the Union Fruit Company’s fleet, was steaming
to the southward, away from harsh winds and ice-fettered harbors.
It was sheer magic, this sea change that brought the sweet airs of
the tropics to caress the white ship when she was no more than
three days out from Sandy Hook. Passengers whose only business
was to seek amusement loafed on the immaculate decks or
besought the nimble bartender to mix one more round of planter’s
punches. The three-mile limit was another discomfort which had
been left far astern.
To the second officer, Richard Cary, it was like a yachting cruise.
He was adjusting himself to this unfamiliar kind of sailoring. In a
uniform of snowy duck he stood his watches on the bridge or
occupied himself with the tasks of keeping the ship as smart and
clean as eternal vigilance could make her. It resembled dining in a
gayly crowded hotel to take his seat at one of the small tables in the
saloon and listen, with an ingenuous interest, to the chatter of these
voyagers who had embarked for an idle holiday on the blue
Caribbean. Among them were girls, adept at flirtation and not at all
coy, who regarded this big, fair-haired second officer with glances
frankly admiring. He was by all odds the most intriguing young man
aboard the Tarragona.
His lazy indifference was provoking. When asked a question on
deck he replied with a boyish smile and a courteous word or two,
but could not be persuaded to linger. In his own opinion he was not
hired to entertain the passengers. Leave that nonsense to the
skipper. He had all the time in the world and seemed to enjoy
making a favorite of himself.
Captain Jordan Sterry was a man past fifty years old, but
reluctant to admit it. A competent seaman of long service in the
company’s employ, he had a sociable disposition and could tell a
good story. Sturdy and erect, his grayish hair and mustache close-
cropped, he looked the part of the veteran shipmaster. He had one
weakness, not unknown among men of his years. He preferred the
society of women very much younger than himself. This expressed
itself in a manner gallantly attentive to the bored young person who
could find nobody else on board to play with, or to the audacious
flapper who liked them well seasoned by experience and felt
immensely flattered at attracting the notice of the spruce master of
the Tarragona.
His attitude was nicely paternal. He deluded himself into
believing that onlookers accepted it as such. In this respect Captain
Jordan Sterry was not unique.
Richard Cary had an observant eye and a sense of humor. When
he appeared sluggish, it was merely the sensible avoidance of waste
motion of mind and body. He read the philandering skipper through
and through and felt a healthy contempt for the soft streak in him,
harmless enough, perhaps, but proof that there is no fool like an old
fool. The man had been young once. Presumably he had had his
fling. Why try to clutch at something that was gone, that had
vanished as utterly as the froth of a wave? It was more than absurd.
To Richard Cary, secure in the splendid twenties, unable to imagine
himself as ever growing old, the skipper’s rebellion against the
inevitable was almost grotesque.
Professionally no flaws could be found in Captain Sterry’s
conduct. He ruled his ship with a firm hand, dealt justly with his
officers, and was quick to note inefficiency. In all ways the Tarragona
was a crack ship. It was to Richard Cary’s credit that the captain
already approved of him. In fact, he was as cordial as the difference
in rank permitted.
The chief officer was a sun-dried, silent down-easter who had
found it slow climbing the ladder of promotion. He was always
hoping for a command, yet somehow missing it. Dependable,
incredibly industrious, he lacked the spark of initiative, the essential
quality of leadership. Disappointment had soured him. He nursed his
grievances and wished he were fitted for a decent job ashore.
After trying in vain to break through his crust, Richard Cary
sought companionship elsewhere. He found it in the chief engineer,
an extraordinary Englishman named McClement whose cabin was
filled with books: history, philosophy, poetry; fiction translated from
the French and Russian. There he sat and read by the hour, shirt
stripped off, electric fan purring, a cold bottle of beer at his elbow.
Half a dozen assistant engineers stood their watches down where
the oil burners roared in the furnaces and the huge piston rods
whirled the gleaming crank shafts. If anything went wrong, the chief
engineer appeared swiftly, clad in disreputable overalls, and his
speech was rugged Anglo-Saxon, of a quality requiring expurgation.
Now and then he strolled on deck of an evening, a lean,
abstracted figure in spotless white clothes, hands clasped behind
him, eyeing the capers of frivolous humankind with a certain cynical
tolerance. They were as God had made them, but it was a bungled
job. He ate most of his meals in his room, a book propped behind
the tray. In this manner he evaded the affliction of mingling with
tired business men and vivacious ladies eager to visit the engine
room.
Richard Cary drifted into this McClement’s quarters by invitation,
found a chair strong enough to hold him, and filled a blackened pipe
from a jar on the desk. As usual he had not a great deal to say, but
was amiability itself. He was content to sit and smoke and speak
when spoken to. This pleased his host who read aloud choice bits of
things and made pungent comments. The visitor borrowed a book
and came again. They got on famously together because in
temperament they were so curiously unlike.
On a clear day the ship sighted the lofty mountain range of
Jamaica and steered to make her landfall for the harbor of Kingston.
She drew near to the coast in the late afternoon. The breeze
brought the heavy scents of the tropical verdure, of lush mountain
vales, and the wet jungle. Richard Cary was on watch. Instead of
standing at the bridge railing, with his calm and solid composure, he
walked to and fro in a mood oddly restless. Intently he stared at the
lofty slopes all clothed in living green, the tiny waterfalls bedecking
them like flashes of silver lace.
He snuffed the air, so very different from the sea winds. The
tropic island of Jamaica was strange to him, and yet it seemed
vaguely, elusively familiar, as though he had beheld it while asleep
and dreaming. The chief officer relieved him, but he lingered on the
boat deck to see the black pilot come aboard from a dugout canoe.
The steamer forged ahead again and passed into the harbor. The
mountains loomed beyond the huddled roofs of Kingston. On the
starboard side was a low, sandy point upon which were the trim,
red-tiled bungalows of the quarantine station. The Tarragona paused
again, to wait for the British health officer.
McClement, the chief engineer, climbed to the boat deck and
said, as he joined Richard Cary:
“Port Royal yonder! No more than a sandbank now. The old town
was sunk by an earthquake long ago. If you poke about in a small
boat, they say you can see the stone walls of the houses down
under the clear water. It was a famous resort of pirates and such
gentry in the roaring days of the Spanish Main. Rum and loot,
women and sin! All that made life worth living.”
“Port Royal?” exclaimed Cary. “I’m sure I have heard something
about Port Royal. All gone, eh, Mac? Scuppered for their crimes.
Served ’em right. A bad lot.”
“Very rotten, Dick, but they had certain virtues which the modern
buccaneers of industry lack. We have two or three of these aboard.
They never risked their skins to bag their plunder.”
Second Officer Cary muttered something and walked to the edge
of the deck to peer down into the bright green water as if expecting
to see the flickering phantoms of the wild sea rovers of the lost Port
Royal. His blue eyes were bright with an ardent interest. McClement
remarked, with a quizzical grin:
“I haven’t seen you really awake before now. What touched you
off? Pirate yarns you read when you were a kid?”
“Perhaps so, Mac. I had this feeling once before. It was when I
got word from a pal in New York, telling me about this job, that it
was on the run to Cartagena. What is Cartagena like?”
“Wait and see it, my boy. Cartagena is a vision of vanished
adventures, a gorgeous old Spanish treasure town preserved, by a
sort of miracle, through three hundred years. Romance, color,
tradition? It makes the days of the tall galleons and the bold sea
dogs live again.”
“Tell me more about it,” demanded Richard Cary. His voice rolled
out in a deep and masterful note.
“Come down to my room after the ship docks and I’ll give you
some books to read, Kingsley’s ‘Westward Ho,’ Hakluyt’s ‘Voyages,’
and Captain Burney’s ‘History of the Buccaneers of America.’ ”
Some small sound in the engine-room far below them diverted
McClement’s attention. His perception of such things was uncannily
acute. He vanished instantly down the nearest stairway. Richard Cary
also found work to do. This broke the spell of his day-dreaming. It
did not recur to him during the Tarragona’s brief stay at Kingston. In
the evening he was on duty at the cargo hatches while the
passengers swarmed ashore to find entertainment at the excessively
modern and luxurious hotel.
He had leisure to saunter a little way from the wharf, but felt no
desire to explore Kingston. It was quite common-place, the streets
noisy with electric cars and automobiles, the brick and wooden
buildings as cheap and unlovely as those of any American town.
Several charming young passengers failed to persuade him to join a
party at the hotel where an orchestra was jazzing it, and he also
declined, with due caution, the hospitality of thirsty voyagers who
were making a night of it.
Returning to the ship, he went to his room at midnight and
picked up the chief engineer’s books instead of turning in. Presently
he found himself fascinated. For the sake of comfort he shifted into
pajamas and lay stretched in the bunk. The ship’s bell tolled one
half-hour after another and he was still reading. These printed pages
were a key that unlocked the gates of enchantment. Now and then
he lost himself in absorbed reverie.
These chronicles of hazards and escapes and hard fighting in the
waters that washed the Spanish Main had been derived from
documents, from the robust memoirs of men whose bones had
crumbled in a century now dim and dead. The rich ports whose walls
they had stormed with a bravado that defied all odds were no more
than fragments of ruined masonry submerged in the jungle growth,
Nombre de Dios, Porto Bello, and old Panama, names that still
reëcho like the brazen blare of trumpets.
All gone save Cartagena, reflected Richard Cary. Cartagena still
basking by the sea to recall that day when Francis Drake and his
Devon lads had stormed it with the naked sword.
At length this brawny second mate of the Tarragona laid the
books aside. Dawn was brightening the windows of his room. He
thrust his bare feet into straw slippers and went on deck to loaf in
the fresh morning air. His head was buzzing. He felt fatigued,
although as a mariner he was hardened to wakeful nights.
In fancy he had been sailing, fighting, and carousing with those
ferocious freebooters of the Caribbean. They seemed as real to him
as the plodding, slow-spoken farmers of the New Hampshire soil on
which he had been raised. Those clumsy, high-pooped ships with the
bellying sails and gaudy pennants were as clearly etched in his mind
as the stone walls, the square white houses, and the dark
woodlands of his native countryside.
Confound the chief engineer’s books, he said to himself. They
had turned his brain all topsy-turvy.
These impressions slowly faded until the Tarragona had sailed
from Kingston and was steaming across that wide waste of sea that
rolls between Jamaica and the Spanish Main. Strong winds were
almost always blowing there, whistling through a ship’s stays,
whipping the blue surface into foaming surges, with clear skies and
hot sunshine. The Tarragona reeled to the swing of these restless
seas, and the spray pelted her decks in sparkling showers. The
passengers disliked it. Some of them uttered low moans and retired
to their rooms. There were vacant chairs in the dining-saloon,
regrets at having left the dry land of home, no matter how dry it
was.
Richard Cary enjoyed it. He was amazed that he had ever
regarded going to sea as drudgery. This part of the voyage appealed
to him with a peculiar zest. For the first time he loved the ocean.
This boisterous wind that blew beneath a hard bright sky, a cool
tang to it that tempered the tropic heat—he drew it deep into his
lungs, standing with arms folded across his mighty chest.
The astute chief engineer found something to interest him in the
behavior of his herculean young shipmate. They were walking the
deck together when McClement said, with his dry chuckle:
“Until we sighted Jamaica, Dick, you were majestic and quiet, like
the everlasting hills. I welcomed you as a benign influence in a world
of guff and jazz and nervous twitters. Now you fairly talk my head
off. It doesn’t bore me, mind you, but I find myself perplexed to
account for this flow of language. Were you bottled up all those
years, and has the cork just blown out?”
“Something like that, Mac,” rather sheepishly admitted Richard
Cary. “I can’t seem to help talking to you about the Spanish Main
and the hard-boiled lads that put it on the map. You know all that
stuff by heart, and I fairly eat it up.”
“Aye, Dick, you lick your chops over it. You have read every bally
book I could dig up. It is like a craving for strong drink.”
Cary did not appear to be listening. The wind was blowing
against his cheek. The deck was unsteady beneath his feet. Against
the ship’s side the crested waves crashed and broke.
“Can’t you see them, Mac?” was his resonant exclamation.
“Lubberly little vessels, as round as an apple, leaking like baskets,
rotten with fever—wallowing off to leeward when the wind drew
ahead? It was this same wind that blew them across this stretch of
sea to the Isthmus of Darien and Cartagena, that made it possible
for them to fetch the mainland. They had it on the beam, there and
back. It served the Spanish galleons as well as the Englishmen that
hunted them. Why, Mac, old man, the feel of this wind, now don’t
laugh at me, is enough to tell me more stories than I found in all
your musty old books.”
The chief engineer halted in his tracks. With a keener scrutiny
than usual he studied the candid, engaging features of Richard Cary,
the fearless vision, the resolute chin, the ruddy color, and the thatch
of yellow hair. Cary was conscious of this deliberate appraisal. He
flushed under it. McClement took another turn along the deck before
halting to ask a question:
“Do you resemble the rest of the family, Dick?”
“Absolutely not. My dad used to say I was a throwback, and a
long throw at that.”
“Precisely. That is what I am driving at. New England rural stock,
you told me. English on both sides, I presume. Where did your
forbears come from?”
“Devonshire, all of them,” answered Cary. “My mother’s folks
came over from Plymouth a couple of hundred years ago and settled
near where they live now. My father’s ancestors came later, just
before the Revolution. They hailed from a little village near Bideford,
so I used to hear him say.”
“From Devon?” exclaimed McClement, who did not appear greatly
surprised. “The Carys of Devon! And your mother was—”
“A Chichester,” said Richard.
“Carys and Chichesters, of course, Dick. And you are the living
image of Amyas Leigh in ‘Westward Ho’! He must have been about
your build and bulk. The kind of lad they bred in Devon when the
world was young!”
“Carys and Chichesters sailed with Drake and Hawkins,” broke in
Richard, “in these same seas, and they fought the Spanish Armada
along with Walter Raleigh and Martin Frobisher. I found the names in
one of your books.”
“Aye, they did all of that and more too,” agreed the chief
engineer. “I am too hard-headed to take stock in any fantastic theory
of buried memories and such tosh as that. I’ll have to admit, though,
that you are a bit startling, Dick. It’s out of the question, of course,
that certain impressions and associations could have been handed
down through your race, to come to life in you.”
Inherited memories of the Spanish Main? Such a notion had not
occurred to Richard Cary. Fantastic enough, but his quickened
imagination laid hold of it.
“There must have been a Cary in one of the expeditions against
Cartagena, don’t you think, Mac?”
“My word, yes. You can bet your last dollar on that. Those stout
Devon lads were all over the shop, wherever there was a chance to
singe the beard of the king of Spain.”
“Then wouldn’t that account for the queer feeling that I have
been in these waters before? Why, the idea of sailing for Cartagena
made me tingle right down to my heels when I first heard of it.”
“Here, you can’t coax me into discussing anything like that, you
fine big brute,” protested McClement. “It won’t do at all. Do you
think you are a blooming reincarnation? Better come to my room
and have a drink and forget it.”
“Then how do you explain it?” was the stubborn question. “On
the level, I am getting worried about myself.”
“No occasion for it, Dick. You are a coincidence, in a way, and a
vastly interesting one. What ails you, however, is the spirit of
romance and adventure. You didn’t know you had it in you. Youth
often finds it in a first voyage to the tropics. I was that way myself.
And the Spanish Main has a beguiling magic of its own. Most of
these wild tales were fresh to you. Unconsciously you identified
yourself with them because you knew you were bred from that same
strain of Elizabethan seamen.”
“Have it your own way,” rather sulkily agreed Richard Cary, “but
there is more to this than you can figure out, as wise as you are.”
McClement had implanted a suggestion which oddly lingered in
Cary’s thoughts and colored them with strange conjectures. Who or
what was the real Richard Cary? The brawny rover of Devon who
had diced with the devil and the deep sea, or the prosaic son of New
Hampshire farming folk who had viewed seafaring as a means of
earning his bread?
“Two Richard Carys,” reflected this second officer of the
Tarragona. “All my life I may have been a mixture of both and didn’t
know it. When I got sore at something and cleared for action, like
wading into that bunch of fo’castle outlaws on the last Western
Ocean voyage, I must have been the big Dick Cary of Devon that
found his fun in walloping the Spaniards.”
His meditations trailed off into nebulous realms, into a haze of
conjectures and dreams and anticipations. Instead of taking each
day as it came, he found himself looking forward to something. It
seemed to be beckoning him. Somewhere in these romantic seas,
adventure awaited him. The chief engineer read aloud a poem that
matched this new mood. Richard Cary listened with a smile on his
face.
“Could man be drunk forever
With liquor, love or fights,
Lief should I rouse at morning
And lief lie down of nights.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebooknice.com