100% found this document useful (1 vote)
17 views

Programming for Absolute Beginners: Using the JavaScript Programming Language 1st Edition Jonathan Bartlett - The complete ebook version is now available for download

The document promotes the book 'Programming for Absolute Beginners: Using the JavaScript Programming Language' by Jonathan Bartlett, along with links to download it and other related programming ebooks. It includes a brief overview of the book's content, which covers fundamental programming concepts and JavaScript syntax. Additionally, it provides links to other recommended programming books for beginners in various languages.

Uploaded by

nqobyacit
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
17 views

Programming for Absolute Beginners: Using the JavaScript Programming Language 1st Edition Jonathan Bartlett - The complete ebook version is now available for download

The document promotes the book 'Programming for Absolute Beginners: Using the JavaScript Programming Language' by Jonathan Bartlett, along with links to download it and other related programming ebooks. It includes a brief overview of the book's content, which covers fundamental programming concepts and JavaScript syntax. Additionally, it provides links to other recommended programming books for beginners in various languages.

Uploaded by

nqobyacit
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 56

Visit ebookmass.

com to download the full version and


explore more ebook or textbook

Programming for Absolute Beginners: Using the


JavaScript Programming Language 1st Edition
Jonathan Bartlett

_____ Click the link below to download _____


https://ebookmass.com/product/programming-for-absolute-
beginners-using-the-javascript-programming-language-1st-
edition-jonathan-bartlett/

Explore and download more ebook or textbook at ebookmass.com


Here are some recommended products that we believe you will be
interested in. You can click the link to download.

Modern C for Absolute Beginners: A Friendly Introduction


to the C Programming Language 2nd Edition Slobodan
Dmitrovi■
https://ebookmass.com/product/modern-c-for-absolute-beginners-a-
friendly-introduction-to-the-c-programming-language-2nd-edition-
slobodan-dmitrovic/

Javascript: Crash Course - The Complete Beginners Guide To


Learning JavaScript Programming In No Time! (Angularjs,
jQuery, JavaScript Visually) Nathaniel Hill
https://ebookmass.com/product/javascript-crash-course-the-complete-
beginners-guide-to-learning-javascript-programming-in-no-time-
angularjs-jquery-javascript-visually-nathaniel-hill/

Modern C++ for Absolute Beginners: A Friendly Introduction


to the C++ Programming Language and C++11 to C++23
Standards, 2nd Edition Slobodan Dmitrovi■
https://ebookmass.com/product/modern-c-for-absolute-beginners-a-
friendly-introduction-to-the-c-programming-language-
and-c11-to-c23-standards-2nd-edition-slobodan-dmitrovic/

The AWK Programming Language, 2nd Edition Aho

https://ebookmass.com/product/the-awk-programming-language-2nd-
edition-aho/
C Programming Absolute Beginner’s Guide (3rd Edition)
Perry

https://ebookmass.com/product/c-programming-absolute-beginners-
guide-3rd-edition-perry/

Go Programming Language For Dummies 1st Edition Wei-Meng


Lee

https://ebookmass.com/product/go-programming-language-for-dummies-1st-
edition-wei-meng-lee/

C Programming for Beginners by Sett John Hafeez


Abdulmutolib

https://ebookmass.com/product/c-programming-for-beginners-by-sett-
john-hafeez-abdulmutolib/

Coding for Kids 5 Books in 1: Javascript, Python and C++


Guide for Kids and Beginners (Coding for Absolute
Beginners) Mather
https://ebookmass.com/product/coding-for-kids-5-books-in-1-javascript-
python-and-c-guide-for-kids-and-beginners-coding-for-absolute-
beginners-mather/

C Programming Language: C PROGRAMMING LANG _p2 2nd


Edition, (Ebook PDF)

https://ebookmass.com/product/c-programming-language-c-programming-
lang-_p2-2nd-edition-ebook-pdf/
Programming for
Absolute Beginners
Using the JavaScript
Programming Language

Jonathan Bartlett
Programming for Absolute Beginners: Using the JavaScript Programming Language
Jonathan Bartlett
Tulsa, OK, USA

ISBN-13 (pbk): 978-1-4842-8750-7 ISBN-13 (electronic): 978-1-4842-8751-4


https://doi.org/10.1007/978-1-4842-8751-4
Copyright © 2023 by Jonathan Bartlett
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the
material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation,
broadcasting, reproduction on microfilms or in any other physical way, and transmission or information
storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now
known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with
every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an
editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the
trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not
identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to
proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication,
neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or
omissions that may be made. The publisher makes no warranty, express or implied, with respect to the
material contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: Steve Anglin
Development Editor: James Markham
Coordinating Editor: Mark Powers
Cover designed by eStudioCalamar
Cover image by Fullvector on Freepik (www.freepik.com)
Distributed to the book trade worldwide by Apress Media, LLC, 1 New York Plaza, New York, NY 10004,
U.S.A. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail [email protected], or visit www.
springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science +
Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.
For information on translations, please e-mail [email protected]; for reprint,
paperback, or audio rights, please e-mail [email protected].
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and
licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales
web page at http://www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is available to
readers on GitHub (https://github.com/Apress). For more detailed information, please visit http://www.
apress.com/source-­code.
Printed on acid-free paper
Most good programmers do programming not because
they expect to get paid or get adulation by the public,
but because it is fun to program.

—Linus Torvalds
Table of Contents
About the Author����������������������������������������������������������������������������������������������������� xi

About the Technical Reviewer������������������������������������������������������������������������������� xiii

Acknowledgments���������������������������������������������������������������������������������������������������xv

Chapter 1: Introduction�������������������������������������������������������������������������������������������� 1
1.1 What You Will Learn����������������������������������������������������������������������������������������������������������������� 1
1.2 How to Use This Book������������������������������������������������������������������������������������������������������������� 3
1.3 For Younger Programmers������������������������������������������������������������������������������������������������������ 4

Part I: Computers, Data, and Communication.................................................. 5


Chapter 2: A Short History of Computers����������������������������������������������������������������� 7
2.1 The Prehistory of Computers�������������������������������������������������������������������������������������������������� 7
2.2 The Idea of a Computer����������������������������������������������������������������������������������������������������������� 9
2.3 The Age of the Computer������������������������������������������������������������������������������������������������������ 10
2.4 Computers in the Age of Networks��������������������������������������������������������������������������������������� 13
2.4.1 Review�������������������������������������������������������������������������������������������������������������������������� 14
2.4.2 Apply What You Have Learned�������������������������������������������������������������������������������������� 15

Chapter 3: How Computers Communicate�������������������������������������������������������������� 17


3.1 The Layers of Internet Communication��������������������������������������������������������������������������������� 19
3.2 Communicating Using HTTP�������������������������������������������������������������������������������������������������� 22
3.3 Connecting with a Remote Server Manually������������������������������������������������������������������������� 26
3.4 How Computers Are Located on the Internet������������������������������������������������������������������������ 27
3.4.1 Review�������������������������������������������������������������������������������������������������������������������������� 29
3.4.2 Apply What You Have Learned�������������������������������������������������������������������������������������� 29

v
Table of Contents

Chapter 4: How a Computer Looks at Data������������������������������������������������������������� 31


4.1 What Computer Memory Looks Like������������������������������������������������������������������������������������� 32
4.2 Using Numbers to Represent Data���������������������������������������������������������������������������������������� 35
4.3 Sequences in Data���������������������������������������������������������������������������������������������������������������� 37
4.4 Using Numbers to Represent Letters������������������������������������������������������������������������������������ 38
4.5 What Is a File Format?���������������������������������������������������������������������������������������������������������� 40
4.5.1 Review�������������������������������������������������������������������������������������������������������������������������� 42
4.5.2 Apply What You Have Learned�������������������������������������������������������������������������������������� 43

Chapter 5: How Computers Work��������������������������������������������������������������������������� 45


5.1 Parts of a Computer�������������������������������������������������������������������������������������������������������������� 46
5.2 A Simplified Paper Machine Simulation�������������������������������������������������������������������������������� 48
5.3 A Short Program: Multiplying by 2���������������������������������������������������������������������������������������� 5 2
5.3.1 Setting Up the Simulation��������������������������������������������������������������������������������������������� 53
5.3.2 Running the Simulation������������������������������������������������������������������������������������������������ 53
5.4 Adding a List of Numbers������������������������������������������������������������������������������������������������������ 56
5.5 Machine Opcode Tables�������������������������������������������������������������������������������������������������������� 60
5.5.1 Review�������������������������������������������������������������������������������������������������������������������������� 65
5.5.2 Apply What You Have Learned�������������������������������������������������������������������������������������� 66

Part II: Basic Ingredients for Web Programming........................................... 67


Chapter 6: The HTML File Format��������������������������������������������������������������������������� 69
6.1 A Quick Introduction to HTML����������������������������������������������������������������������������������������������� 69
6.2 The Parts of an HTML Document������������������������������������������������������������������������������������������� 72
6.3 Adding Attributes to Tags������������������������������������������������������������������������������������������������������ 76
6.4 Tags That Refer to Other Documents������������������������������������������������������������������������������������ 76
6.5 Relative URLs������������������������������������������������������������������������������������������������������������������������ 80
6.6 Other HTML Features������������������������������������������������������������������������������������������������������������ 81
6.6.1 Entities�������������������������������������������������������������������������������������������������������������������������� 81
6.6.2 Lists������������������������������������������������������������������������������������������������������������������������������ 82
6.6.3 Table Tags��������������������������������������������������������������������������������������������������������������������� 82
6.6.4 Form Tags��������������������������������������������������������������������������������������������������������������������� 84
vi
Table of Contents

6.6.5 Standard Attributes������������������������������������������������������������������������������������������������������ 85


6.6.6 Comments, Declarations, Processing Instructions, and CDATA Blocks������������������������� 86
6.6.7 Review�������������������������������������������������������������������������������������������������������������������������� 88
6.6.8 Apply What You Have Learned�������������������������������������������������������������������������������������� 89

Chapter 7: Introduction to Cascading Style Sheets������������������������������������������������ 91


7.1 The Origin of Cascading Style Sheets����������������������������������������������������������������������������������� 91
7.2 The Structure of a CSS Document����������������������������������������������������������������������������������������� 93
7.3 Understanding Selectors������������������������������������������������������������������������������������������������������� 95
7.4 The CSS Box Model��������������������������������������������������������������������������������������������������������������� 98
7.5 Other Capabilities of CSS���������������������������������������������������������������������������������������������������� 101
7.5.1 Review������������������������������������������������������������������������������������������������������������������������ 101
7.5.2 Apply What You Have Learned������������������������������������������������������������������������������������ 102

Chapter 8: Your First JavaScript Program������������������������������������������������������������ 105


8.1 A Short History of JavaScript���������������������������������������������������������������������������������������������� 105
8.2 A Simple JavaScript Program��������������������������������������������������������������������������������������������� 107
8.3 Moving the JavaScript to Its Own File��������������������������������������������������������������������������������� 112
8.3.1 Review������������������������������������������������������������������������������������������������������������������������ 114
8.3.2 Apply What You Have Learned������������������������������������������������������������������������������������ 115

Part III: JavaScript Fundamentals............................................................... 117


Chapter 9: Basic JavaScript Syntax��������������������������������������������������������������������� 119
9.1 Elements of Syntax������������������������������������������������������������������������������������������������������������� 119
9.2 Assignment Statements������������������������������������������������������������������������������������������������������ 121
9.3 Control Structures��������������������������������������������������������������������������������������������������������������� 123
9.3.1 The if Statement��������������������������������������������������������������������������������������������������������� 123
9.3.2 The while Statement��������������������������������������������������������������������������������������������������� 126
9.3.3 The for Statement������������������������������������������������������������������������������������������������������� 128
9.3.4 Review������������������������������������������������������������������������������������������������������������������������ 130
9.3.5 Apply What You Have Learned������������������������������������������������������������������������������������ 131

vii
Table of Contents

Chapter 10: Introducing Functions and Scope����������������������������������������������������� 133


10.1 Your First Function������������������������������������������������������������������������������������������������������������ 134
10.2 More Function Examples��������������������������������������������������������������������������������������������������� 136
10.3 Functions Calling Functions���������������������������������������������������������������������������������������������� 138
10.4 Variable Scopes����������������������������������������������������������������������������������������������������������������� 138
10.4.1 Review���������������������������������������������������������������������������������������������������������������������� 141
10.4.2 Apply What You Have Learned���������������������������������������������������������������������������������� 142

Chapter 11: Grouping Values Together with Objects and Arrays�������������������������� 145
11.1 A Basic Introduction to Objects����������������������������������������������������������������������������������������� 146
11.2 Simplifying Object Creation����������������������������������������������������������������������������������������������� 149
11.3 Storing Sequences of Values Using Arrays����������������������������������������������������������������������� 150
11.4 Using Arrays in Programs�������������������������������������������������������������������������������������������������� 151
11.5 Mixing Objects and Arrays������������������������������������������������������������������������������������������������ 154
11.6 Object Methods����������������������������������������������������������������������������������������������������������������� 156
11.6.1 Review���������������������������������������������������������������������������������������������������������������������� 159
11.6.2 Apply What You Have Learned���������������������������������������������������������������������������������� 160

Chapter 12: Interacting with Web Pages�������������������������������������������������������������� 161


12.1 Using the JavaScript Console������������������������������������������������������������������������������������������� 161
12.2 Finding and Modifying Web Page Elements���������������������������������������������������������������������� 163
12.3 Creating New HTML Elements������������������������������������������������������������������������������������������ 165
12.4 Communicating with Input Fields������������������������������������������������������������������������������������� 166
12.5 Adding Functionality to Buttons���������������������������������������������������������������������������������������� 169
12.6 Putting It All Together�������������������������������������������������������������������������������������������������������� 170
12.7 Logging to the Console����������������������������������������������������������������������������������������������������� 172
12.7.1 Review���������������������������������������������������������������������������������������������������������������������� 174
12.7.2 Apply What You Have Learned���������������������������������������������������������������������������������� 175

viii
Table of Contents

Part IV: Intermediate JavaScript................................................................. 177


Chapter 13: Recursive Functions and the Stack��������������������������������������������������� 179
13.1 The Program Stack������������������������������������������������������������������������������������������������������������ 179
13.2 Local Variables in the Stack���������������������������������������������������������������������������������������������� 183
13.3 Recursive Functions���������������������������������������������������������������������������������������������������������� 188
13.3.1 Review���������������������������������������������������������������������������������������������������������������������� 192
13.3.2 Apply What You Have Learned���������������������������������������������������������������������������������� 193

Chapter 14: Manipulating Functions and Scopes������������������������������������������������� 195


14.1 Functions as Parameters to Functions������������������������������������������������������������������������������ 195
14.2 Functions That Return Functions�������������������������������������������������������������������������������������� 198
14.3 Functions That Create Functions�������������������������������������������������������������������������������������� 198
14.4 Currying Functions������������������������������������������������������������������������������������������������������������ 204
14.5 Anonymous Functions������������������������������������������������������������������������������������������������������� 205
14.5.1 Review���������������������������������������������������������������������������������������������������������������������� 206
14.5.2 Apply What You Have Learned���������������������������������������������������������������������������������� 207

Chapter 15: Intermediate Objects������������������������������������������������������������������������� 209


15.1 Attaching Functions to Objects����������������������������������������������������������������������������������������� 209
15.2 Using Objects Productively����������������������������������������������������������������������������������������������� 213
15.3 Constructing Objects��������������������������������������������������������������������������������������������������������� 215
15.3.1 Review���������������������������������������������������������������������������������������������������������������������� 216
15.3.2 Apply What You Have Learned���������������������������������������������������������������������������������� 217

Part V: Programming Applications.............................................................. 219


Chapter 16: Modernizing JavaScript�������������������������������������������������������������������� 221
16.1 Declaring Variables with let and const������������������������������������������������������������������������������ 221
16.2 Destructuring Assignments����������������������������������������������������������������������������������������������� 223
16.3 Accessing Properties with Strings������������������������������������������������������������������������������������ 225
16.4 Function Syntax��������������������������������������������������������������������������������������������������������������� 226
16.4.1 Review���������������������������������������������������������������������������������������������������������������������� 227
16.4.2 Apply What You Have Learned���������������������������������������������������������������������������������� 228

ix
Table of Contents

Chapter 17: Working with Remote Services (APIs)���������������������������������������������� 229


17.1 Getting an API Key������������������������������������������������������������������������������������������������������������� 230
17.2 JSON: The Language of Data��������������������������������������������������������������������������������������������� 231
17.3 Accessing the Network with JavaScript��������������������������������������������������������������������������� 232
17.4 The Query String��������������������������������������������������������������������������������������������������������������� 233
17.5 Interacting with a Web Page��������������������������������������������������������������������������������������������� 235
17.6 A Few Other Bits to Note��������������������������������������������������������������������������������������������������� 237
17.6.1 Review���������������������������������������������������������������������������������������������������������������������� 239
17.6.2 Apply What You Have Learned���������������������������������������������������������������������������������� 240

Chapter 18: Writing Server-Side JavaScript��������������������������������������������������������� 241


18.1 Programming Languages�������������������������������������������������������������������������������������������������� 241
18.2 Using JavaScript Outside of the Browser�������������������������������������������������������������������������� 242
18.3 A Small Web Service Using Node�������������������������������������������������������������������������������������� 243
18.4 Why We Need Frameworks����������������������������������������������������������������������������������������������� 244
18.5 Making Your Service Available������������������������������������������������������������������������������������������ 245
18.5.1 Review���������������������������������������������������������������������������������������������������������������������� 246
18.5.2 Apply What You Have Learned���������������������������������������������������������������������������������� 246

Chapter 19: Conclusion����������������������������������������������������������������������������������������� 249

Appendix A: Glossary�������������������������������������������������������������������������������������������� 251

Appendix B: Operating System and Browser Specifics���������������������������������������� 293


Appendix C: The JavaScript Toolbox on Docker��������������������������������������������������� 309

Appendix D: Character Encoding Issues��������������������������������������������������������������� 311

Appendix E: Additional Machine Language Programs������������������������������������������ 319

Index��������������������������������������������������������������������������������������������������������������������� 323

x
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
Jonathan Bartlett is a software developer, researcher, and
writer. His first book, Programming from the Ground Up, has
been required reading in computer science programs from
DeVry to Princeton. He has been the sole or lead author for
eight books on topics ranging from computer programming
to calculus. He is a senior software developer for McElroy
Manufacturing, spearheading projects in web, mobile, and
embedded software. He is now the author of several Apress
books including Electronics for Beginners and more.

xi
About the Technical Reviewer
Germán González-Morris is a polyglot software architect/engineer with more than 20
years in the field, with knowledge in Java(EE), Spring, Haskell, C, Python, and JavaScript,
among others. He works with web-distributed applications. Germán loves math
puzzles (including reading Knuth) and swimming. He has tech-reviewed several books,
including an application container book (Weblogic), as well as titles covering various
programming languages (Haskell, Typescript, WebAssembly, Math for coders, and
regexp). You can find more details at his blog site (https://devwebcl.blogspot.com/)
or Twitter account (@devwebcl).

xiii
Acknowledgments
I want to take a moment and thank everyone who helped me write this book. First, I want
to thank those who read and appreciated my first programming book, Programming
from the Ground Up. The encouragement I received from that book has given me the
encouragement to continue writing and educating throughout the years.
Next, I want to thank my homeschool summer co-op class for being guinea pigs
for this material. Your questions, your successes, and your difficulties all informed the
writing of this book. You were both my motivation to write in the first place and the first
proving ground for the material.
I would also like to thank my family, my friends, and my church, all of whom are
essential parts of my life. Thanks especially to my wife who puts up with me when I am
too focused on my writing to notice what the kids have been up to or to put a stop to
whatever trouble they have found themselves in!

xv
CHAPTER 1

Introduction
The modern world is filled with computers. Computers run our phones, our cars, and
even our refrigerators. Computers manage our businesses, our calendars, and our social
lives. With the world relying on computers for so many functions, it is important to know
how these devices work. Even if you never need to program a computer yourself, chances
are that, at some point in your life, you will be involved with software development.
You may be an accountant who needs to tell a computer programmer how you want
your purchasing system set up. You may be an engineer who needs to describe your
engineering process so that a programmer can automate it. In all such tasks as these, it
is important to know something about how computers are programmed, even if you are
not personally writing the software.

1.1 What You Will Learn


When programming computers, a programmer uses a programming language to tell
the computer how to do something. Because computers are not intelligent beings, they
can’t understand ordinary human languages. Computers understand a type of language
called machine language, which will be discussed further in Chapter 5. Machine
languages are very different from the kind of languages ordinary people use. Therefore,
programming languages were developed to meet programmers halfway—they are more
humanlike than machine language and more machinelike than human language.
Numerous programming languages have been developed over the years. Some that
you may have heard of include Java, JavaScript, Ruby, Python, C#, Go, Rust, and Swift.
Although each language looks different, they are all trying to do the same task of helping
you to interface with the machine in a way that is friendlier and easier to manage than
machine language. In fact, most programming languages are geared around very similar
concepts, and some of them even look similar. Therefore, learning any programming
language will help you more easily learn any other programming language. I have rarely

1
© Jonathan Bartlett 2023
J. Bartlett, Programming for Absolute Beginners, https://doi.org/10.1007/978-1-4842-8751-4_1
Chapter 1 Introduction

hired people for my development team who already knew the programming language
that my team uses. If someone learns one programming language and practices until
they are good at it, then the effort to learn a new language is fairly minimal.
You may wonder why, if the languages are so similar, there are so many
programming languages to choose from. The fact is, when engineering anything, trade-­
offs have to be made. Sometimes in order to make one type of task easier, another type
of task has to be made harder. In my kitchen I have both a mixer and a blender. Both of
them operate on the same basic principles—you put food into the main container area,
an electric motor turns, and some attachment combines the food together. While these
tasks are very similar and operate on the same principles, there are many types of food
in the world and many ways that they need to be mixed, such that the mixer works better
for some tasks and the blender for others. Similarly, with programming languages, some
of them are better suited to different tasks. Also, the choice of programming language
is dependent on the programmer. Just as different types of cars suit the preferences and
tendencies of different types of drivers, so do different programming languages suit the
preferences and tendencies of different types of programmers. Because of these reasons,
there are numerous programming languages available for nearly any task you might
want to perform.
The programming language covered in this book is called JavaScript. I like to teach
JavaScript as a first language for several reasons. First of all, JavaScript was developed
to be a first language. One of the goals of the language was to make it easy for new
programmers to get started quickly. Even though JavaScript was designed to make
programming easier for new programmers, it is not any less powerful as a language.
Second, JavaScript has become the de facto programming language for website
interfaces. If you use a website that does anything besides link to other web pages,
JavaScript is probably involved. Therefore, learning JavaScript will have immediate
practical benefits in learning how the Web operates. Third, the tools for programming
JavaScript are available on every computer. You don’t need to download any special tools
to program JavaScript. If you have a computer with a web browser, you can program
JavaScript! Finally, JavaScript is very similar to other popular programming languages
such as C#, Java, and Swift. Therefore, knowing JavaScript will not only be immediately
beneficial for programming websites, it is also a language that makes it easy to transition
to other popular systems.
This book is for the first-time programmer. No prior programming experience is
assumed. This book does assume that you have a basic understanding of how to use your
computer and browse the Internet. That is all that you need!
2
Chapter 1 Introduction

You will learn not only the basics of computer programming but also a more general
knowledge of how computers and data work. You will learn where computers came
from, how they work, how computers work with data, how data is transmitted, and how
web pages work. This book will not go in-depth in all of these subjects, but it will give
you a basic working framework that will help you better understand ideas that you may
encounter elsewhere.

1.2 How to Use This Book


This book follows several conventions to help you along your programming journey.
First, this book will introduce you to new terminology. In order to highlight the
important words, terms will be printed in bold print the first time that they are used.
You can find a complete list of terms in Appendix A. These terms are important, and you
should memorize their meanings.
When this book lists out computer programs, parts of computer programs, or
anything that should be typed in directly (and precisely), it will be offset from the text
and written in a special font to help you see that it is a computer program. Computer
programs will look like this:

window.alert("This is an example of a computer program.");

When discussing smaller pieces of code within a paragraph, code that is under
discussion will look like this.
Now, there are many different types of computers, each with different operating
systems and software loaded on them, with each of those having different versions.
There are also numerous different web browsers, each with different features available
and slightly different ways of working. This book attempts to walk you through setting
everything up on each operating system. If there is anything in this book that depends
on the specific operating system or browser that you are using, Appendix B has the steps
for several different systems, including Windows and Mac operating systems. This book
will refer you to the appropriate section of the Appendix when needed. Though this
book works with any modern web browser (basically anything released after 2008), I
recommend that you use Google Chrome. As of the time of this writing, Google Chrome
is the easiest browser to work with as a programmer. That being said, you should be just
fine with any web browser, including Brave, Firefox, Safari, Chrome, Opera, or Edge.

3
Chapter 1 Introduction

This book contains several practice questions and practice activities. The goal of
these questions and activities is to provide you with a hands-on way of understanding
the material. By doing the questions and activities, the text will become much more
meaningful and understandable. More importantly, they might show you the places
where you did not fully understand the text. Many people have a tendency to skip over
things if they don’t understand them well. Practice questions and activities give you a
chance to slow down and make sure you know which parts you understood and which
parts you need to read again and spend time thinking about. Practice questions build
on each other, so by doing them all in the order given, you can see exactly where you are
having problems.
At the end of every chapter is a review section which covers the most important
concepts of each chapter. After that is a section to help you practice applying your
knowledge to problems. These questions require you to further engage your brain and
really think about what you learned in that chapter and what it means.
Appendix A contains an extended glossary of terms used in this book, plus others
you are likely to encounter when reading about programming. This chapter will help you
find your bearings as you read and talk with other people about programming. I would
suggest that, concurrent with your readings, you also take the time to look through the
glossary for words that you may have heard but did not understand at the time.
Also, if you run into problems when writing code, Section B.6 has several suggestions
for getting you back on the right track.

1.3 For Younger Programmers


This book is primarily geared for people who are coming to computer programming as a
new career, college students, or even high school students. However, it can also be used
for middle school students with some modification. Middle school students, generally,
are not cognitively ready for all of the material after Part 3. This doesn’t mean it can’t be
covered or read, but it might be good to pick and choose material that is appropriate to
student interests and abilities. If parts are difficult to understand, they can be returned to
at a later time.
All right, are you ready? Let’s get started!

4
CHAPTER 2

A Short History
of Computers
The history of computers is weird and wonderful. What started as an abstract
philosophical quest ended up setting the course for society for over a century and
continues to be one of the most profound parts of modern life. The goal of this chapter is
to trace an outline of where computing started, where it has been, and where it is now.

2.1 The Prehistory of Computers


Humans have always had tools. Humans have built fires, made spears, and built houses
from the beginning. At first, however, technology was limited to standing structures or
tools that were extensions of yourself—like knives or bows and arrows. Very little early
technology was powered and free-functioning. It was manually powered by human
effort. Therefore, since the power of a machine was limited to what humans could drive,
only small machines could be devised.
The ability to power a machine led to huge advances in technology. The earliest
power source was probably water, where water could turn a wheel to grind wheat or
operate a sawmill. These water-based power sources, however, were fairly limited in the
types of devices they could drive. Such technology was mostly limited to standing wheel-­
based inventions.
This was essentially the state of technology from about 300 BC to the early 1700s
AD. At this point in history, technology had two main limiting factors. The first was
limitations of power availability, and the second was the need for customized parts.
The industrial revolution solved both of these problems. The steam engine allowed
the creation of powered machines anywhere. Powered machines were no longer tied

7
© Jonathan Bartlett 2023
J. Bartlett, Programming for Absolute Beginners, https://doi.org/10.1007/978-1-4842-8751-4_2
Chapter 2 A Short History of Computers

to being near streams but could now go anywhere, since the power could be generated
from fire and stored water. Eventually this even allowed the creation of trains, since the
power could move with the vehicle.
The other invention of the industrial revolution was interchangeable parts.
This allowed a standardization and maintenance of equipment that was previously
unattainable. Instead of having each part be a unique piece, the parts became
standardized which allowed for the machines to become more specialized. It is one
of the more curious paradoxes of technology that as the pieces of technology become
less unique, the more advanced and unique the systems created from those parts can
become. Standardization allows for users of technology to stop having to think about all
of the low-level decisions and focus on the larger, more meaningful decisions. This also
allows for better communication about systems, because the parts can be more readily
described. If I can give you a schematic that lists premade parts, it is much easier to
design and communicate that design than if I also had to describe how each individual
part was supposed to be made.
So the introduction of available powered machinery and standardized parts in the
industrial revolution led to an explosion of specialized machines. We then had machines
to perform any number of tasks that a person could want to do. The next step was the
introduction of machines which were directed not by people directly controlling the
machine but by coded instructions. The earliest of these machines was the Jacquard
Loom, which used punched cards to signify a pattern woven into a fabric. The cards had
punched holes to signify to the machine the raising or lowering of the particular thread
causing it to be visible or hidden in the pattern. Thus, the loom could be programmed
to make a pattern by specifying at each point whether each thread should be raised or
lowered.
Later inventions applied this concept to mathematics. Calculating machines had
been around for a long time, with Blaise Pascal’s mechanical calculator having been
invented in the mid-1600s. However, this required the power of physical manipulation
to actually accomplish the addition. Most mathematical tasks are not single-step like
addition but require a process of several steps, sometimes repeating steps, before finding
an answer. Charles Babbage invented a more advanced machine to perform navigational
calculations. In this machine, the user entered the input, and then the machine used
that input to run a series of steps which eventually yielded results. Babbage eventually
designed a machine that could take a list of arbitrary instructions much like a modern
computer, but he was never able to build that design.

8
Chapter 2 A Short History of Computers

Once humans had the ability to power a machine, create a machine that operated
on external instructions, and use those instructions to perform mathematical functions,
they had all of the pieces in place to create a computer. However, the revolution that
brought about computing took place not from an invention, but from a problem in
philosophy.

2.2 The Idea of a Computer


What separates modern computers from the calculating machines of the past is that
modern computers are general-purpose computers. That is, they are not limited to a
specific set of predesigned features. I can load new features onto a computer by inputting
the right program. How did we get the idea of creating such a general-purpose machine?
It turns out that a question in philosophy led to the creation of general-purpose
machines. The question was this—was there a way to create an unambiguous procedure
for checking mathematical proofs? This seems like an odd question, but it was a big
question in the nineteenth century. There had been many “proofs” where it was unclear
if the proof actually proved its subject. Thus, philosophers of mathematics tried to
find out if there was a way to devise what was then called an “effective procedure” for
checking the validity of a mathematical proof. But that leads to another question—what
counts as an “effective procedure” anyway? If I list out the steps of a procedure, how do I
know that I’ve given you enough details that you can accomplish this procedure exactly
as I have described it? How can I tell that my instructions are clear enough to know that
the procedure that I have listed can be unambiguously accomplished?
Alan Turing and Alonzo Church both tackled this problem in the 1930s. The
results showed that one could define unambiguous procedures with the help of
machines. By describing a machine that could perform the operation, one can be
certain that the operation of the procedure would be unambiguous. In addition,
Turing described a set of operations which could be used to mimic any other set
of operations given the right input. That is, Turing defined the minimum set of
features needed for a computing system to become truly programmable—where the
programmer had an open-ended ability to write whatever software he or she wanted.
Machines and programming languages that are at least as powerful as Turing’s set of
features are known as Turing-­complete or Universal programming languages. Nearly
every modern programming language in common usage is Turing-complete.

9
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!
Other documents randomly have
different content
events, wished to linger on as long as possible by the side of that
calm grand sea. More than once they pulled in the rein and stood to
gaze, though the ocean presented little for their contemplation
beyond the sublime of its own immensity; except, indeed, where a
distant sail skimmed along the waters, or a white bird dipped its long
pinions in the dark bosom of the deep.

They had returned very nearly to the spot where they had first
reached the seashore, when they came to a little cottage at about
the distance of a mile from the martello tower, and about twenty
yards apart from another, which stood close to the cliff. There was
nobody visible at the cottage-door, and a boat, which had lain high
and dry as they had passed before, was now beginning to float with
the tide, which was rolling rapidly in. The sea on that part of the
coast, as I have often witnessed, goes out as gently and softly as a
fine summer's day; but, even in the calmest weather, rushes in with
great rapidity and force. There was no other boat near, though, from
the appearance of the ground, and a spar or two which lay upon the
beach, there appeared to have been a larger one somewhat higher
up not long before, and it was natural to conclude that the
fishermen, on that fine day, had put out to sea.

Charles and Lucy drew up their horses not far from the boat to
gaze once more over the sea; but at that moment Charles Tyrrell
saw the little bark begin to slip down the sand as the water flowed
round it, and it instantly struck him that by some accident it had
become detached from whatever it had been moored to.

"They'll lose their boat," he exclaimed, "if they do not mind what
they are about;" and he turned his horse's head in order to tell the
people at the cottage; but Mr. Driesen, who had remarked the same
fact before him, and had turned for the same purpose, exclaimed,
"I'll go, I'll go. You and Miss Effingham are picturesque and
contemplative; an old fellow like I am can afford to have his reveries
broken into."
Thus saying, he rode up to the cottage first, but found nobody.
He then rode on leisurely to the second, and called in at the door:
"Good woman, are there no men about? You'll lose your boat to a
certainty, for it's adrift there--afloat."

A loud, shrill cry was the woman's only answer; and rushing out
to the spot where Charles and Lucy stood, with an infant at her
breast, she exclaimed, in a voice of agony, "Oh, the child, the child!"
and at the same moment, though the boat had drifted out some
way, the whole party could see a little pair of hands stretched over
the gunwale of the boat, and part of the head and face of a child of
about three or four years old.

The woman uttered another loud scream when she saw it; but
Charles Tyrrell was off his horse in a moment, and casting down his
coat and waistcoat on the sand, he plunged at once into the sea.

The ground, for a space of about ten yards from the spot where
the line of the rising water was rippling over the sand, was very
nearly level, but the boat was considerably beyond that by this time;
and after rushing across that first space, with the sea scarcely above
his knees, Charles Tyrrell found the ground rapidly shelved down
beneath him, while some low black rocks, slippery with seaweed,
impeded his way and made him fall twice. The second time he cut
his knee so severely as to cause him great pain; but, nevertheless,
exerting all his strength as he saw the boat getting farther and
farther out, he dashed on till he was clear of the rocks and out of his
depth; and then, swimming as rapidly as he could, approached the
boat and endeavoured to catch hold of the rope by which it had
been attached.

In the mean time, two, at least, of those who stood upon the
seashore watched with terrible anxiety for his success, and saw with
pain and apprehension that twice, as he attempted to catch hold of
the rope, a slight turn of the boat drew it out of his reach.
The child, by this time aware of its danger, was leaning over the
side towards the person who sought to deliver it, and they saw
Charles Tyrrell, unable to catch the rope, and apparently fatigued by
swimming in his clothes, place his hands on the gunwale of the boat
as if to get in and guide it back to the shore. The boat, however,
which was small and light, heeled under his weight and nearly
capsized; the child, thrown off its balance, pitched out, and for a
moment both Charles and the boy were lost to the sight. The next
instant, however, Charles appeared again, holding the child firmly
with his left hand and striking towards the shore with his right; and
Lucy Effingham and the mother saw him reach the rocks, sit down
for a moment as if to recover strength, and appear to sooth the
terrors of the child, placing it so as to be able to carry it more
conveniently to land. He waved with his hand at the same moment
to show that all was safe, and then slowly and carefully rose and
made the best of his way back to the sands with the child.

Three various impulses seized upon the fisherman's wife as soon


as she found that her boy was safe. The first was to clasp him to her
breast with all the vehemence of maternal affection; the next was to
scold him angrily for getting into the boat at all; the next was to
pour forth a torrent of grateful thanks to Charles Tyrrell for saving
the child. The principal force of her gratitude seemed to be excited
by the fact that such a gentleman as he seemed should have gone
into the sea and spoiled his clothes for the purpose of saving her
Johnny.

Mr. Driesen grinned a cynical smile at the turns taken by the


woman's emotion; but the eyes of Lucy Effingham, she could not tell
why, filled with tears, ay, and overflowed. She felt a little ashamed of
being so much moved, and, having no other refuge but a jest, she
laid her hand upon Charles's arm, saying, "Pray come home, Mr.
Tyrrell, and change your clothes as fast as possible! You have been
quite selfish enough, according to Mr. Driesen's opinion, already."
And her eye lighted up with a gay smile, though not enough to dry
up the tears through which it shone.
Charles Tyrrell thought her very lovely indeed at that moment; but
though he was not only wet, but suffering great pain from a
bleeding gash on his knee, he did not follow her counsel of returning
home till he had asked several questions of the fisherman's wife. He
found that her husband was partner in the fishing boats with the
master of the next cottage and his son, and that they had gone
away early that morning to try their fortune, with other boats, at
some distance. They had at first proposed to go in the boat which
had now drifted out, and had pushed her down nearly into the
water, when some circumstance, which the wife did not know, had
caused them to change their mind and take the larger boat. By some
carelessness they had forgotten to moor the boat they left to
anything; and while the little boy who was saved played about at the
door, as she thought, the poor woman had remained within, nursing
the child at her breast, and tending an elder child than either, who
was sick in the cottage.

By the time that he had learned these particulars, Charles Tyrrell


had resumed the clothes he had cast off and was ready again to
mount his horse.

"I am sorry, my good woman," he said, seeing her eyes turn with
a look of hopeless and bewildered anxiety towards the little bark,
"that there is no other boat near, to enable me to bring back the one
that is drifting out; but it is too far, I am afraid, for me to attempt to
swim to it. There are other boats, however, at those cottages about
half a mile on, and we saw men near the doors as we passed about
an hour ago. As I ride by now I will tell them to put out after your
boat, and I dare say they will do it willingly."

"Oh, that they will, sir," answered the woman. "My husband's
brother lives in the second cottage, and he is at home, I know."

Charles then mounted his horse, though with difficulty; and riding
on with Lucy and Mr. Driesen along the seashore, they came to the
cottage, where they found plenty of people willing to put out
immediately after the boat that had gone adrift. They then returned
home as fast as they could.

Were we writing a romance instead of a true history, this might be


a favourable opportunity for plunging our hero into a severe fit of
illness, and casting him almost entirely upon the society of Lucy
Effingham for resource and consolation. Such, however, we are
forced to admit, was not the case. Charles Tyrrell changed his
clothes indeed; but, farther than that, he had no occasion to think of
his having been in the water any more. He caught not the slightest
cold; the cut on his knee got well as rapidly as possible, and two
days after he drove down with Lucy, Lady Tyrrell, and Mrs.
Effingham, as far as the carriage could proceed on its way towards
the fisherman's cottage. They then walked the rest of the way, and
found both the boats drawn up upon the shore.

Three men were hanging about on the sands, two mending some
nets and cordage, and another, a stout, weather-beaten, thick-set
seaman, of the middle age, standing with a telescope at his eye,
gossiping in his own mind with a ship that appeared hull-down in the
offing. As he was the nearest to them, and as, situated in that little
remote nook, Charles Tyrrell judged that the inhabitants of the two
cottages must be looked upon as almost one family, the young
gentleman applied himself at once to the personage with the
telescope.

To the first words, however, the man replied nothing but "Ay, ay,
sir," keeping the glass still to his eye; but when Charles Tyrrell
proceeded to say, "We want to hear, my good sir, how the little
fellow gets on whom we saw nearly carried out to sea in the boat
the other day. Was he any the worse for his wetting?" the man
instantly dropped the glass by his side, as if he had been grounding
arms, and exclaiming, "I'm sure you're the gentleman that saved
poor Johnny!--me if I am not glad to see you!" confirming it with an
oath which it is unnecessary to repeat.
"Why, sir," he continued, "the boy's as well as can be, and a good
boy he is too; and though my wife has scolded me ever since for not
mooring the boat, I thank you, and am obliged to you, with all my
heart; and there's John Hailes's hand." And he held out to Charles
Tyrrell a broad, brown, horny hand, as large as the crown of his hat.

Charles took the honour as it was meant, feeling that the man
intended to imply, and perhaps with justice, that the hand of John
Hailes was that of an honest and an upright man, not given to
everybody without consideration. He therefore took it, as we have
said, and shook it frankly, saying, "I am very glad to hear that the
little fellow has received no hurt; and how is the other young one
who was ill?"

"Why, he's better, sir, he's better," replied the man; "I think the
fright did him good, for he heard all about his little brother that he's
so fond of, and he couldn't budge out to help him himself, poor
fellow. Won't the ladies come in? I'm sure my wife will be very glad
to see them. There's nothing catching about the child's illness. It's
only that the pot of hot tar fell down off the fire over his feet and
burned him badly."

Lady Tyrrell and Mrs. Effingham very willingly agreed to go into


the cottage, for they were both tired; and here new thanks awaited
Charles Tyrrell; for the mother, having recovered from the first
overpowering emotions of the moment, was now voluble, and even
eloquent, in her gratitude. Lady Tyrrell was pleased and affected, as
well as Mrs. Effingham, and Lucy turned to the window and looked
out upon the sea, which for some reason looked dull and indistinct
to her eyes. Charles, however, was overpowered, and would willingly
have escaped; but he was relieved, as well as the whole party, in
some degree, by the good father, John Hailes, cutting across his
wife, as if he suddenly recollected something, and planting himself
abruptly before Charles, with the words, "I'll thank you, sir, to tell me
what's your name."
This speech caused a general smile, and the fisherman proceeded
to comment upon it in explanation, saying, "You see, sir, the reason
why I ask is, that I had forgotten it, and so had my wife, when you
were here before, and I was afraid that we should both forget it
again, and you should go away without our knowing who it was that
saved our poor boy from the worst luck that can happen to any one,
being turned adrift in an empty boat."

"My name is Tyrrell," replied Charles; "and I am the son of your


neighbour here, Sir Francis Tyrrell; but you really owe me nothing,
my good friend, for no one could see a child in such a situation
without helping him."

"That don't matter, sir," replied Hailes; "the man that did it's the
man for me; so I am very much obliged to you; and if ever it should
be that even you should want a helping hand in your turn, why,
here's John Hailes."

While this conversation had been going on, the poor boy that was
sick had been looking up in Charles Tyrrell's face with a pair of large,
intelligent, dark eyes, as if he sought to catch his every look. He was
apparently about ten years old, and a good-looking boy, but very
pale from what he had suffered; and Charles, to put an end to all
farther expressions of gratitude, went up and spoke to him about
the accident he had met with. The boy answered sensibly and
clearly; but when he had done, he added, in a low voice, "Thank
you, sir, for saving poor little Johnny. I am sure I should have died if
he'd gone out to sea and nobody with him."

By this time the people from the other cottage had brought in the
little boy, who was, it seems, as much a pet of theirs as of his own
family: and the two sturdy fishermen were standing leaning against
the lintels of the door, looking into the cottage, which was by this
time wellnigh full.
There was nothing, perhaps, very moving in the scene which she
had witnessed; but yet it had agitated Lady Tyrrell, who was weak in
health; and now, finding the numbers too much for her, she rose
and wished the cottagers "good-by," giving the little boy some
money, with a friendly warning never to go and play in the empty
boat again. They then returned home, and, for the time, this little
adventure--and an adventure is always, abstractedly, a desirable
thing in a country house out of the sporting season--produced
nothing but matter for conversation and amusement while Mrs.
Effingham and Lucy remained at the Park.

Their departure, however, was now speedily approaching, and the


greater insight which Mrs. Effingham daily obtained of the temper
and disposition of Sir Francis Tyrrell made her hasten her
preparations as far as possible, to settle herself in the manor-house
with all speed.
CHAPTER VII.

In the ordinary commerce of one human being with another,


which takes place in the every-day routine of that dull machine
which is called society, especially in large cities, we pass on through
life, knowing little or nothing of the human beings with whom we
are brought in temporary contact. A cynic said, that language was
made to conceal our ideas; and he might have added, with equal
truth, that the expression of the human countenance was intended
to convey false impressions. A great part of the truth is not spoken,
because there is no necessity for speaking it; another great part is
swallowed up by conventional falsehoods; and the rest, or very
nearly the rest, is buried under lies that the liars think cannot be
discovered.

Thus, when we think of the great part of our ordinary


acquaintance, and ask ourselves what are their views, purposes,
opinions, thoughts, feelings, dispositions, characters, we may well
say with the moralist, poet, and philosopher, "We know nothing." It
is much to be feared, that if from society in general we were to take
away all that is false in word, look, and action, we should have
nothing but a pantomime in dumb show, performed by very stiff
automatons.

Such, however, cannot be the case entirely with those who spend
ten days together in a country house. There will come moments
when the machinery is somewhat deranged; when the springs will
appear; when the piece of mechanism will want winding-up; in
short, I believe it to be very difficult for the most habitual actor on
the world's stage to pass the whole of many days with an observant
companion without some trait appearing, some slight indication
taking place of the real man within, of the heart that beats, and the
character that acts underneath the mask of our ordinary
communications with the world.

At the end of ten days Mrs. Effingham was settled at the manor-
house, and she was perfectly satisfied in regard to every point of the
character of Sir Francis Tyrrell. She saw and knew, as she had before
believed, that he was a man who would on no account commit a
base, dishonourable, or dishonest action; that in everything
appertaining to money, when separated and apart from other
motives and passions, he was generous and liberal. But the violence,
the irritability, the exasperating nature of his temper and disposition,
it must be owned, went far beyond anything that she had expected
or even believed possible. For Lady Tyrrell she was deeply sorry; and
though she did not always think that lady acted wisely towards her
husband, yet she was evidently the suffering party, and therefore
engaged all Mrs. Effingham's best feelings in her behalf.

Some doubts in regard to her estimate of Charles Tyrrell's


character would occasionally insinuate themselves into the mind of
Mrs. Effingham. She saw that he possessed all his father's good
qualities, and almost all his mother's, improved and directed by a
mind of a higher tone, and by mingling, as a young man only can
mingle, with the world. But she perceived, also, that no small portion
of the fierce and fiery character of his father had descended to him.
She marked it in the flashing of his eye; she heard it in the quivering
of his voice; and she distinguished it in the sharp, uncompromising
reply which burst from his lips when his mother was assailed; and
she felt sure that in that noble and commanding form, already full of
high and manly graces, there dwelt a passionate and eager spirit,
difficult to control, and which might or might not, by habit and
indulgence, assume a character like that of his father.
She hoped and trusted, indeed, that it was not so; for she saw
that Charles was continually engaged in a struggle with himself, and
she fully appreciated the powers of his mind and the feelingness of
his heart. She doubted, however; she was not sure; and she thought
of Lucy, and the chance that existed of her daughter, sweet,
amiable, and gentle as she was, acting again the part of Lady Tyrrell,
and withering like a flower scorched by the lightning.

When, however, she reflected and compared which of the two she
would rather have for the husband of her daughter, Charles Tyrrell or
Arthur Hargrave, she was inclined to clasp her hands together, and
exclaim without hesitation, "Oh, Charles, by all means! With him
there is always some hope; with him there is always some resource.
It would be difficult, I should think, for a well-intentioned person to
miss the means of either moving him by his feelings or convincing
him by his reason. No, no," she added, "he can never become like
his father; but I fear, I very much fear, lest the intense and fiery
disposition which I see is so ungovernable within him, may lead him
to acts which will bring misery on himself and on those that love
him."

What were the feelings of Lucy Effingham herself, and what the
view which she took of the characters of Sir Francis Tyrrell's family,
we shall not pause to inquire. She had attached herself greatly to
Lady Tyrrell, and with her winning sweetness had wound herself so
closely round that lady's heart, that, ere she left Harbury Park, its
mistress looked upon her almost as a daughter.

The fourth personage which formed the society that Mrs.


Effingham and her daughter left behind when they proceeded to
take up their abode at the manor-house, was abhorred and disliked
by both; but Mr. Driesen did not, or would not, or could not, find it
out. He was plentifully furnished, as we have had occasion to show,
with that most serviceable and comforting of properties, self-conceit.
People might disagree with him in all his views, oppose him in
argument, or frankly acknowledge their dislike for the principles he
inculcated, without affecting his opinion of himself in the least. He
believed, in general, that the only thing for which anybody argued
was victory. He thought, with the utmost confidence, that he was
always victorious, and believed (as was indeed the case) that he was
always more or less eloquent, and therefore concluded that his
opponents must be convinced, and admire, even if they did not like
him.

At all events, his love of himself was an impregnable citadel which


nothing could storm. He had seldom, if ever, ventured out of it, it is
true, to attack any one else violently, though once or twice he had
done so in younger days, and had shown himself decidedly a man of
courage: valuing the life of this world very little, though he believed
that there was none other beyond the grave, and not at all
scrupulous of risking it for the purpose of punishing any one who
very deeply offended him.

These were rare cases, however, and, on the whole, Mr. Driesen
was considered a good-tempered and placable man; and those who
did not see very deeply had been heard to observe, that it was a pity
such a good-humoured fellow as Driesen, so talented and so
amusing, should be utterly unprincipled. However, one great source
of his good humour was his self-conceit, which seldom, if ever,
suffered him to take offence, and this, therefore, prevented him
from seeing that Lucy Effingham shrank from him whenever it was
possible to do so without rudeness, and that Mrs. Effingham
received all the civilities and attentions that he paid her with
coldness which would have repelled any other man.

We must now come to inquire into the most important point of all,
namely, with what feelings Charles Tyrrell saw Lucy Effingham quit
his father's house. He had thought her exquisitely beautiful from the
first. The grace which marked all her movements, and which seemed
to spring from a graceful mind, had not been lost to him either.
There had been also constant traits appearing of a kind and gentle
heart; and without attempting anything like display--for one of the
most marked and distinguishing characteristics of Lucy's mind was a
retiring, though not, perhaps, a timid modesty--she had suffered so
much to appear during her stay at Harbury Park, that Charles could
not doubt her mind had been as highly cultivated by her parents as
it had been richly endowed by Heaven. All this he had seen as a
mere observer; and, never forgetting what his mother had said in
regard to Arthur Hargrave, he fancied that he looked upon the whole
merely as a spectator, and that he examined, appreciated, and
admired Lucy Effingham merely as his father's guest and his
mother's affectionate friend.

Thus it went on till she had quitted the Park and taken up her
abode at the manor-house, and then Charles felt a vacancy and a
want far more strongly than he had expected. The house seemed to
have lost its sunshine; the Park, beautiful as it was, appeared cold
and damp; the melodious sound of her voice, too, which he had not
thought of while she was there, was now remembered when it was
no longer heard.

All these, and a thousand other feelings, came upon him at the
breakfast-table on the morning after their departure. He recollected,
however, before breakfast was over, that it would be but civil to go
down and inquire for Mrs. Effingham and her daughter, and to
ascertain whether they were comfortable in their new abode. He
accordingly did so, and by some strange combination of
circumstances, which Sir Francis Tyrrell, and Mr. Driesen, and Lady
Tyrrell all observed it so happened that not a day passed without
there being some very valid motive and excellent good reason why
Charles Tyrrell should go down to the manor-house, unless it
happened to be on a day when he was aware that Mrs. Effingham
and her daughter, or Lucy alone, were to be with Lady Tyrrell.

Once Charles thought of it himself, and for a single instant a


doubt crossed his bosom as to what his feelings might become; but
he laughed it off in a moment. The causes that took him to the
manor-house seemed so natural, that there was no fear, he thought,
of his feelings becoming anything but what they were already.
Indeed, there was no great necessity that they should; for by this
time Charles Tyrrell was as much in love with Lucy Effingham as he
well could be. The very consequence of his being so much in love
was, that he went on, confident he was not so at all; and how long
he would have remained in this state of ignorance would be difficult
to determine, if the period of his return to Oxford had not rapidly
approached, bringing with it thoughts and reflections which made
him look more accurately into his own heart.

He put off the hour of examination, indeed, till the very evening
before the day fixed for his departure. But on that evening Mrs.
Effingham and Lucy dined at the Park; and although there occurred
not one event which we could take hold of to write it down as a
legitimate cause why Charles Tyrrell should feel differently after that
evening, yet upon the whole the passing of it had the effect of
making him determine to sift his own sensations to the bottom. Of
course, there was a certain impression upon the whole party at the
Park, caused by his approaching departure. Lady Tyrrell felt it very
bitterly, as she always did, and did not scruple to suffer that feeling
to appear.

But it was the effect upon Lucy Effingham that principally moved
Charles Tyrrell. She said not a word but such as she was accustomed
to say: no one single incident took place to show that there was a
difference in her feelings; and yet a certain softness, a degree of
sadness coloured her thoughts, and was heard in the tone of her
voice, which Charles Tyrrell did remark. He was anything but vain,
and would never, probably, have applied what he did remark to
himself, had not hope been busy with imagination, and imagination
with Lucy Effingham. But, as it was so, he did remark, in addition to
the softness and sadness of Lucy's tone and manner, that the
softness and sadness were always somewhat increased after his
approaching departure had been mentioned.
As he gazed upon her, too, he thought that she was lovelier than
ever. As he stood beside her while she sang, her voice seemed to
him melody itself; and when he put her into the carriage which was
to bear her away, the thrill which ran through his heart as she shook
hands with him and bade him farewell, made him pause for a
moment in the vestibule ere he returned to the rest of the world.

As soon as he had retired to his own room, Charles began his


commune with his own heart. The interrogatory, as far as the actual
facts were concerned, was soon at an end; for when he asked
himself if he loved Lucy Effingham really, truly, and sincerely, his
heart answered "yes" at once.

There were other questions, however, to be asked, referring only


to probabilities. The first question was whether there existed any
chance of obtaining het love in return, notwithstanding the previous
attachment which she entertained towards Arthur Hargrave. This
was a difficult problem to solve; for though there were hopes, from
the friendship with which Lucy Effingham seemed to regard him, and
from her demeanour during that evening, which made his heart beat
high, yet there had been nothing so decided in word, or even in
manner, as to justify him in any very sanguine expectations. Love
and hope, however, are almost inseparable: and the smiling goddess
first produced one argument from her store, and then another, to
show him that there was no reason to despair. In the first place,
Lucy had seen this young man, this Lieutenant Hargrave, not very
often, according to his mother's account; in the next place, she
knew that he was disapproved, disliked, and contemned by all whom
she had cause to esteem; and, in the third place, she had made no
resistance to the will of her parents, nor proffered a word of
opposition. In short, he settled it in his own mind that there was
hope for him; but then came the question, could he be satisfied with
that portion of affection which he could hope to gain from a heart
that had loved before. He asked himself if it were possible that any
heart could love really twice; and he felt inclined to answer in words
almost equally strong, but not so beautiful, as those of Walter
Savage Landor, when the great poet says:

"Tell me: if ever, Eros! are revealed


Thy secrets to the earth: have they been true
To any love who speak about the first?
What! shall these holier lights, like twinkling stars
In the few hours assigned them, change their place,
And, when comes ampler splendour, disappear?
Idler I am; and pardon, not reply,
Implore from thee, thus questioned. Well I know
Thou strikest, like Olympian Jove, but once."

But Charles Tyrrell loved, and though he would have given worlds
that Lucy Effingham had never felt one feeling of attachment to
another; though he knew, if he would have owned it, that her
having done so would be a bitter drop in his cup through life, even if
she accepted him willingly; though he could not have denied, if he
had still gone on to question himself closely, that no signs of
affection to himself, in after life would ever convince him that she
loved him as fully, as truly, as entirely as if she had never loved
another, yet Charles Tyrrell loved, and the hope of possessing Lucy
Effingham was sufficient to make him stride over every objection.

All this being settled, and his determination taken, the next thing
to be considered was the course which he should pursue. He was
not yet of age; but a few months only were wanting, and he felt
that, when they were past, he should be in a different position, and
enabled to treat the matter in a different manner. He was sure that
there was a certain perversity in the disposition of Sir Francis, which
would make his expressed wish to marry Lucy Effingham the very
reason why the baronet would throw obstacles in the way, though
he had been himself the first to seek the alliance.

In regard to his mother, after all that had passed between them,
upon the subject, after what had been said of Lucy Effingham's first
attachment, and their both agreeing that he never could be satisfied
with anything but affection in its first young strength, he felt a
degree of shame, a sort of shyness as to mentioning his changed
views and purposes.

Under these circumstances he determined to set out for Oxford


without informing either his father or his mother of the state of his
feelings. He was too upright and straightforward to affect towards
his father any dislike to one whom he loved and admired as he did
Lucy, although he well knew that such would be the means to hurry
on Sir Francis into some irrevocable step towards the promotion of
their marriage; but he felt himself quite justified in saying nothing on
the subject, and returning to Oxford as if with unconcern, and he
consequently determined to do so the next day.

At the same time, however, his was by far too eager a nature to
leave the affections of Lucy Effingham to be lost or won during his
absence without an effort; and he therefore resolved to acquaint his
mother by letter with feelings which he did not choose to speak, and
to induce her to make known those feelings to Lucy, and to
endeavour to ascertain more accurately the state of her affection in
return.

All those resolutions and determinations were formed with great


and calm deliberation before he lay down to rest; but, unfortunately,
while he had been resolving one way, Fate had been resolving
another, and not one single thing that he determined upon that night
did he succeed in executing.

Thoughts such as those that occupied him are very matutinal in


their activity, and before five o'clock on the following morning
Charles Tyrrell was up and dressed. The vehicle that was to convey
him did not pass the gates of the Park till about eleven o'clock, and
he would have had time, if he had chosen so to act; to go down and
see Lucy once more, and learn his fate from her own lips. He did not
choose to do so, however; but, to fill up the hours till breakfast time,
he determined to wander about the park, and in the spots where he
had more than once passed some of the sweetest moments of
existence in her society, to call up the delicious dream of the past,
now that he was just about to place between it and hope's bright
vision of the future an interval which seemed to him a long, long
lapse of weary hours and dull realities.

Opening the doors for himself--for, though it was daylight, none of


the servants were yet up--he went out upon the lawn and gazed
around him on the sparkling aspect of reawakening nature. Beauty,
and peace, and harmony were over all the scene; many a glossy
pheasant was strutting about here and there within the precincts of
a spot where guns were never heard, and only jostled from their
path by some old familiar hare, grown fat and gray on immunity and
abundant food, or else startled to a half flight by the rush of the
rapid squirrel darting across the lawn to some opposite tree.

The opening of the door, the aspect even of man, the great
destroyer of all things, did not disturb the tenants of the wood. One
or two of the hares crouched down as if asleep indeed; but those
who had passed many years there undisturbed showed no farther
sign of apprehension than by standing up high on their hind feet,
and with their ears projecting in all sorts of ways, seeming to inquire
who it was that had got up as early as themselves. Having satisfied
themselves of that fact, the utmost that they condescended to do
was to hop a few steps farther from the house; and Charles Tyrrell
was proceeding on his walk, when a window above was opened, and
the voice of Mr. Driesen pronounced his name.

Now of all people on earth, perhaps Mr. Driesen was the last
whom Charles Tyrrell would have chosen to be his companion at a
moment when such feelings as those that agitated him then were
busy in his bosom, he therefore affected a deafness to Mr. Driesen's
call, and, without taking the slightest notice, walked on quietly into
the wood. Ere he had been absent from the house half an hour,
however, and while he was yet walking up that long straight walk of
beeches, from which, as we have said, Harbury Hill was visible, and
which we have fully described in the first or second chapter of this
book, he was joined by Mr. Driesen, who, coming straight up to him,
gave him no opportunity of escaping.

"I called to you, Charles, from the window," said the modern
philosopher, "and you would not hear me, as is always the case
when one wants to do a man a service. There is nothing on earth so
deaf as a man that you wish to assist or to counsel; a post, why a
post is all ears compared to it."

"I really did not know," replied Charles Tyrrell, "that you had any
particular wish to assist or to counsel me, as I was not at all aware
that I was in need either of counsel or assistance. However, if you
will advise me as to what ought to be the price of small beer, I shall
be obliged to you, as the wine I got at Oxford during the last term
was so bad that I shall have no more of it."

"Why, the value of small beer," replied Mr. Driesen, curling his
snout, "is just equal to the value of small jokes multiplied by four; a
quart of one to a gallon of the other, Charles, eh? Why, you are
emulous of your father, which I certainly did not think to see in your
harmonious little family. But, to put aside all such sour and bitter
figures, you do want both counsel and assistance; and though I do
not mean to say that ninety-nine people out of a hundred would not
be better calculated to give it to you than I am, because our views
and opinions upon so many subjects differ, yet, as you have nobody
else in the world near you who has anything like experience or
judgment, wit, wisdom, or common sense, except, indeed, persons
whom I know you do not choose to apply to, you had better take up
with mine than none. I did not expect you to ask it; but, when it is
offered, you can take it or reject it, as you think best."

He spoke with a degree of frankness that Charles Tyrrell had


seldom heard him use, and he replied, "I am really very much
obliged to you, Mr. Driesen, and will, of course, hear with respect
and attention whatever advice you think fit to give me; but you must
take the trouble of telling me upon which subject it is to be, for I
confess myself ignorant."

"Of course I will, of course I will," replied Mr. Driesen; "for I


intend it to be what the ancients used to call a free gift: now, if I
were to expect you to give me your confidence in return, it would be
a matter of trade, traffic, barter, commerce. You would value it more,
doubtless, but I care nothing about that. I will, in the first place, set
out then by telling you the points of your situation on which you
require advice and assistance, some of which you know, and some
of which you don't. But let us go up and down the walk, for my old
blood does not run so quickly as once it did, and I am rather chilly."

Charles Tyrrell followed his suggestion; and having made his


pause just sufficiently long to be impressive, Mr. Driesen went on.

"In the first place, Charles, you are in love." Charles Tyrrell
coloured a little, more from surprise than any other feeling; but the
other proceeded: "In the next place, you know your father, and are
puzzled how to act in the business. I saw it all in your face last night
when you came in from handing Miss Effingham into the carriage; so
do not say a word, but let me go on. In the next place," continued
Mr. Driesen, "you are not going to Oxford to-day--"

"Indeed," replied Charles Tyrrell, "you are quite mistaken.


Everything is packed up and ready, and, whenever the coach passes,
I intend to get up and go to Oxford."

"You intend," said Mr. Driesen, with a grim smile; "I never said
you did not intend, I only said you are not going; and the very fact
of your fully intending it is one of the reasons why you won't go.
Your father thinks that you are getting too fond of Oxford; that you
like being away from home. Here you are going two days before it is
necessary; I am quite sure you would like to remain those two days
here now, only you are ashamed of saying so, because you fixed the
day for going back on the very day you came. However, your father
won't let you go. He thinks you wish it, and the consequence, you
know, is certain. He will take hold of the very first excuse for making
you stay. See if he does not. I am not very sure that he will let you
go at all; but that is doubtful. However, you can prevent it at once, if
you like, by strongly pressing to go."

"You mistake, my good sir," replied Charles Tyrrell; "such means I


will never consent to use with my father, even supposing I did not
wish to go; but certainly, on the contrary, I do wish to go, and to
remain till I have taken a degree of some kind."

"Well, so be it then," replied Mr. Driesen; "and though in love and


war all things are fair, I suppose you will be equally scrupulous about
the means of obtaining your father's consent to your marriage."

"Certainly, equally scrupulous," replied Charles, "inasmuch as not


affecting to oppose the very things that I desire."

"Well, well," answered Mr. Driesen, "I have told you the facts, and
now I come to give you the advice. In the first place, never dream of
saying one word to Sir Francis about your attachment till he
proposes the marriage to you himself, which he will do ere long,
depend upon it."

"I do not intend to mention anything upon the subject to him,"


replied Charles Tyrrell. "As you are come so clearly to the point, Mr.
Driesen, in regard to my father's conduct towards myself, I do not
scruple to acknowledge that I know no cause for placing in my
father that implicit confidence, which, under any other
circumstances, I should be most anxious to do. If he should think fit
to propose to me a marriage with a person I love, of course, such an
event would be doubly pleasing. But should he not do so, I shall not,
of course, consider myself bound to speak with him at all upon the
subject till the time arrives when it may be fit for me to marry at all,
which, of course, I do not regard as the case at present."
"So far, so well," replied his companion; "but take my advice, my
young friend; do not let him see the slightest inclination on your part
towards such a marriage; an inclination which was somewhat too
evident last night. If you will but be careful till you go to Oxford--
that is, if your father lets you go at all--and will leave the rest to me,
I will undertake that, before a month is over, your father shall have
so committed himself in regard to your marriage with Lucy
Effingham, that his sense of honour will prevent him from ever
retracting."

"Pray, how long do you intend to remain here, Mr. Driesen?"


demanded Charles, considering only what the worthy gentleman
proposed to perform, without in the slightest degree recollecting that
the question might be an awkward one.

Whether Mr. Driesen took it up in an unpleasant sense or not, it


did not in the least put him out of countenance, as, indeed, nothing
ever did. He replied, however:

"Why, you see, Charles, your father's cook is an excellent one; his
mutton very fine; excellent fish from the sea and from the river;
better wine nowhere in Europe; and as comfortable a bed as one
would wish to sleep in: all these are circumstances to be considered
when one is asked how long one intends to stay. I should think that
my adhesiveness might last another month."

Charles Tyrrell could not help smiling at the great coolness with
which Mr. Driesen treated the matter; but he replied, "I did not
mean at all to put an impertinent question, but only to know how
much time you would nave to give to the object you proposed. In
anything you may think fit to do, of course, I cannot interfere, and I
will not deny, as I know that you have very great influence with my
father, that nothing would give me so much gratification as if my
father did propose this affair to me himself, and in such terms as
would bind him to give it his speedy sanction."
"Much more reasonable, indeed, than could be expected of a
Tyrrell," cried Mr. Driesen; "why, Charles, you will discredit your
family. However, put your mind at ease. I will undertake that your
father shall do what you wish, and that very speedily, if you will but
be careful, and for the next two or three days let him remain in
ignorance of your feelings upon the subject."

"Depend upon it, my dear sir," replied Charles Tyrrell, "depend


upon it, you are mistaken; and that I shall go to Oxford to-day
without opposition."

"Poo, poo, Charles!" said Mr. Driesen; "I have known your father
for thirty years too well to be mistaken in what he intends to do. You
will soon see, and judge by that how right I am regarding all the
rest. As far as we have gone yet, Charles, I have been acting quite
disinterestedly, and out of regard for my friend's son, as well as for
my friend himself, who does not always know his own interests. I do
not mean to say that the day will not come when I may ask a favour
of you in return; but that period, I should think, is far distant.
However, if ever it should, you will remember what I do for you on
the present occasion, and, if I know you right, you will be very
willing to return it."

"That I will, Mr. Driesen," replied Charles, warmly, for the other
had touched exactly the right point; but before he could proceed any
farther, either in thanks or professions, he saw a servant at the other
end of the walk apparently seeking him, and in a minute or two after
the man came up and told him that Sir Francis wished to see him
immediately, as there had occurred important business which he
feared might prevent the journey to Oxford that day. Mr. Driesen
grinned slightly, and, with the servant following, accompanied
Charles into the house.
CHAPTER VIII.

We must now leave the party of Harbury Park for a short period;
ay! and the party at the manor-house also, and go to a somewhat
humbler scene, though not without its comforts and even elegances.
We must also go back in point of time for somewhat more than one
day, and yet not quite two, and ask the gentle reader to accompany
us to a small but neat white stone house, situated among the
woods, which we have mentioned as crowning the summits of the
high cliffs that guarded the seashore. The house was perched upon
the top of one of the highest of these, which overhung the group of
small fishermen's cottages, in which the brother of good John Hailes
dwelt, and at the distance of about a mile from John's own abode.
Through the wood and down to the shore was practised a small,
well-trimmed path, from the gate of the little garden over the face of
the cliff, guarded in the precipitous parts by neat wooden
balustrades, from which a pleasant scene of ocean and seacoast was
visible at various points to the walker who chose to pause, and,
leaning his folded arms upon the railing, gaze over at the view
below.

There was no carriage-way through the wood up to the house,


and for about a quarter of a mile there did not appear even a cart-
road; but there was an excellent, well-beaten footpath, wide enough
for a horse or two abreast, which led out into the way made for the
wood-carts, and thence to a small by-road, by which the fishermen
sent up their fish to the county town. Those were not days when
everything on earth went to London.
The house itself was neat, the garden kept in beautiful order, and,
in a warm situation upon a genial coast, was prolific of every kind of
flower that had been at that time introduced into England; but
although these were signs of a landsman's tastes, there were not
wanting indications of nautical habits and associations. There was a
tall pole, with a vane at the top, carried sufficiently high above the
neighbouring trees to indicate truly what wind was blowing at the
time. A difficulty having been found in carrying this pole up to the
proper height in one piece, it had been managed as a mast, with a
step and sort of topmast; and, to make the whole sure, various stays
and braces had been carried down and made fast to the roof of the
house; so that, seen over the tops of the trees, it appeared exactly
like the mast of a ship rising out of the wood. In the garden was
seen a little summer-house, formed from a large boat sawn in two;
and at the other end of the house, opposite to the mast, was raised
a flagstaff, with a block and pulley, for running up and down a flag
upon occasion.

As far as description goes, this will be enough; and we will now


immediately proceed to the dwellers in that house, and those with
whom they were in communication about six-and-thirty hours
previously to the period at which we last left Charles Tyrrell.

The evening sunshine was at that time bright over the world; but
it reached not the house or the gardens around it, the trees
throwing them at that period into shadow. The door, however, was
open, and leaning against one of the doorposts was a stout, elderly
man, strong in limb, rather bulky in size, and with a form apparently
better adapted for the exertion of slow but vigorous efforts, than for
anything like grace or activity. His features were good, though
somewhat heavy; except, indeed, the eyes, which were keen and
even sharp in expression. His complexion was of that dark brown
hue which is generally called weather-beaten, and his hair was gray
and rather short, except, indeed, behind, where it was gathered into
an enormously long, thin queue, as was not uncommon among
seamen at that time. This queue was bound tightly up with black
riband, and in colour, form, and length resembled very much a lady's
riding-whip of the present day.

He was raised upon the step of the door, and was, consequently,
looking down upon another person, whom he spoke to, standing on
the little gravel semicircle before the house, and who was also
somewhat shorter than himself. His companion, however, was
apparently not less endowed with corporeal vigour, and though not a
young man by any means, was two or three years younger than the
master of the house. He was broadly built, with large, strong limbs,
a rough, hale countenance, and a frank, clear blue eye. There were
one or two deep scars upon his face, which somewhat disfigured
him; but in every other respect his countenance was good and
pleasing, though there was about it, at the moment, a sort of
thoughtfulness and sternness which betokened occupation with
matters of importance and moment.

While talking to the other, he remained with his large brawny


hands behind his back, looking up in the face of his companion with
the queue, and the subject they spoke upon was marked as one of
considerable interest, more by the pauses for reflection which took
place between every sentence and its rejoinder, than by any great
changes of expression called up in the speakers' countenances. They
evidently understood each other perfectly, so that whatever was to
be said was only, in fact, half expressed, and that in a particular
slang of their own, eked out by a shrug of the shoulders, a lifting up
of the eyebrows, or an occasional ejection of tobacco-juice from the
mouth, which seemed to be looked upon as very expressive.

"Well, good-night, Master Longly," said the shorter of the two,


taking a step back from the door and shaking hands with the other:
"I'll do as you think fit, you know; but I think myself--the sooner
gone the better."

"So do I, so do I," answered the other. "Good-night, old Will."


But, though they mutually wished each other good-night, they by
no means parted, nor, indeed, seemed to have the slightest idea that
they were going to part; for Master Longly, or, as the people about
the country used generally to call him, Captain Long, descended
from his doorway as the other turned away, and sauntered after him
through the garden; while Old Will, as he termed him, perfectly sure
that the other was following, continued his observations in rejoinder
to what had taken place at the door.

Thus they walked on, putting one slow step before another till
they reached the top of the cliff, where they again came to a pause
and another discussion, and then breaking off again, old Will began
to descend the zigzag towards the shore, while Longly, after taking
two or three steps farther, leaned over the railing as he had done
forty times before in the same circumstances, and continued talking
with the other till he was half way down. Then came the quicker and
final good-night, and Captain Long took his way back with a
somewhat more rapid step.

The history of Captain Long, or, as he is more accurately


described in some of his official papers, Mr. Thomas Longly, Master
Mariner, is soon told: and it was a history then very common among
the inhabitants of the seacoast of England. He had been a somewhat
wildish youth in the nearest seaport town; had received a good plain
education; but, smitten with a love of adventure, had volunteered on
board a king's ship; for which his father, who was a dealer in marine
stores, had instantly disinherited him, and declared he would cut him
off with a shilling, in imitation of his betters. The boy was clever and
active, bold and enterprising, but by no means fond of any kind of
restraint, and with a strong spice of obstinacy in his nature, which,
notwithstanding the subordination of a ship of war, made him set out
with resisting and attempting to run as soon as he found that his
majesty's service was not quite so easy and joyous a life as he had
expected. He was not easily broken of such bad propensities; but
the cat-o'nine-tails was applied, and not in vain, the youth soon
finding that it was less disagreeable to obey and exert himself, than
to make in effectual efforts at resistance and be flogged for his
pains.

His commander was a smart officer, but a just man. Occasions of


difficulty and danger soon presented themselves, for England was
then in the midst of a hot war; and the boy proving active as a
squirrel and bold as a lion, gained attention and distinction; was
noticed by the captain, and after a few years' service turned out one
of the best seamen in the ship. After a certain period of time, when
he was returning to England from the West Indies, and it was
supposed the crew were to be paid off, he was suddenly raised to
the rank of a warrant officer, probably with a view of keeping him in
the service.

On returning to his native town, however, he found his father at


the point of death; a point at which men are not fond of executing
all that they have threatened against their refractory children. The
consequence was, as might have been expected, a full share of the
worthy dealer's money came to his son Thomas; and, with a capital
of a few thousand pounds, he thought it would be much better to
set up in command of a ship of his own, than to continue any longer
in the king's service when there was no war going on. He therefore
bought shares in a large cutter, with the understanding that he was
to command her, and set out as a trader, in which capacity, to say
the truth, he was not particularly fortunate. He did not lose, indeed,
but his gains at the end of four or five years had only been sufficient
to enable him, in conjunction with the other shareholders, to
abandon the cutter, and buy a handsome, well-built schooner.

Just about the same time, however, a fresh war broke out. Longly
applied for letters of marque, mounted some handsome brass guns
on the deck of his schooner, with some heavy caronades for close
quarter, and set sail from the port with the determination of doing
the enemy's commerce as much harm as possible. This sort of trade
he understood much better than the other, and, consequently, he
was far more fortunate. Captain Long became known upon the
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.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookmass.com

You might also like