100% found this document useful (2 votes)
15 views

Rails Angular Postgres and Bootstrap Powerful Effective and Efficient Full Stack Web Development 1st Edition David Bryant Copeland pdf download

The document provides information about the book 'Rails, Angular, Postgres, and Bootstrap: Powerful, Effective, and Efficient Full Stack Web Development' by David Bryant Copeland, including its digital download link and praise from various professionals in the field. It covers full-stack web development using contemporary technologies and aims to enhance the reader's understanding of different components in the application stack. The book is designed for both beginner and experienced developers looking to improve their skills in Rails, Angular, and PostgreSQL.

Uploaded by

slyviekeb
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
15 views

Rails Angular Postgres and Bootstrap Powerful Effective and Efficient Full Stack Web Development 1st Edition David Bryant Copeland pdf download

The document provides information about the book 'Rails, Angular, Postgres, and Bootstrap: Powerful, Effective, and Efficient Full Stack Web Development' by David Bryant Copeland, including its digital download link and praise from various professionals in the field. It covers full-stack web development using contemporary technologies and aims to enhance the reader's understanding of different components in the application stack. The book is designed for both beginner and experienced developers looking to improve their skills in Rails, Angular, and PostgreSQL.

Uploaded by

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

Rails Angular Postgres and Bootstrap Powerful

Effective and Efficient Full Stack Web


Development 1st Edition David Bryant Copeland
pdf download
https://ebookfinal.com/download/rails-angular-postgres-and-
bootstrap-powerful-effective-and-efficient-full-stack-web-
development-1st-edition-david-bryant-copeland/

Explore and download more ebooks or textbooks


at ebookfinal.com
We have selected some products that you may be interested in
Click the link to download now or visit ebookfinal.com
for more options!.

Rails Angular Postgres and Bootstrap Powerful Effective


Efficient Full Stack Web Development 2nd Edition David
Bryant Copeland [David B. Copeland]
https://ebookfinal.com/download/rails-angular-postgres-and-bootstrap-
powerful-effective-efficient-full-stack-web-development-2nd-edition-
david-bryant-copeland-david-b-copeland/

Web Development with Bootstrap 4 and Angular 2 2nd Edition


Sergey Akopkokhyants

https://ebookfinal.com/download/web-development-with-bootstrap-4-and-
angular-2-2nd-edition-sergey-akopkokhyants/

Agile Web Development with Rails 7 2nd Edition Sam Ruby

https://ebookfinal.com/download/agile-web-development-with-
rails-7-2nd-edition-sam-ruby/

Agile web development with rails a Pragmatic guide 1st


Edition Dave Thomas

https://ebookfinal.com/download/agile-web-development-with-rails-a-
pragmatic-guide-1st-edition-dave-thomas/
Agile Web Development with Rails 4 4th Revised edition
Edition Sam Ruby

https://ebookfinal.com/download/agile-web-development-with-
rails-4-4th-revised-edition-edition-sam-ruby/

Build Awesome Command Line Applications in Ruby 2 Control


Your Computer Simplify Your Life 1st Edition David Bryant
Copeland
https://ebookfinal.com/download/build-awesome-command-line-
applications-in-ruby-2-control-your-computer-simplify-your-life-1st-
edition-david-bryant-copeland/

Web Development with MongoDB and NodeJS 2nd Edition Build


an interactive and full featured web application from
scratch using Node js and MongoDB Mithun Satheesh
https://ebookfinal.com/download/web-development-with-mongodb-and-
nodejs-2nd-edition-build-an-interactive-and-full-featured-web-
application-from-scratch-using-node-js-and-mongodb-mithun-satheesh/

Web Services on Rails 1st Edition Kevin Marshall

https://ebookfinal.com/download/web-services-on-rails-1st-edition-
kevin-marshall/

Node js Web Development 3rd revised Edition David Herron

https://ebookfinal.com/download/node-js-web-development-3rd-revised-
edition-david-herron/
Rails Angular Postgres and Bootstrap Powerful Effective
and Efficient Full Stack Web Development 1st Edition
David Bryant Copeland Digital Instant Download
Author(s): David Bryant Copeland
ISBN(s): 9781680501261, 1680501267
Edition: 1
File Details: PDF, 8.68 MB
Year: 2016
Language: english
www.it-ebooks.info
www.it-ebooks.info
Early praise for Rails, Angular, Postgres, and Bootstrap

This book is a fantastic resource for anyone looking to gain a practical understand-
ing of full-stack development using contemporary, ubiquitous technologies. I was
particularly impressed by how well the author was able to cover so many different
software components in such a constructive and cohesive manner. As an engineer
who spends most of my time at the data layer, I walked away with a ton of helpful
insight into the other layers of the typical application stack.
➤ Matthew Oldham
Director of data architecture, Graphium Health

A book that deals with integrating Angular into Rails is something I’ve been
waiting a long time for, and what’s here is a definite step above existing online
tutorials. Like the author, I’m used to viewing different database management
systems as black boxes that are much like each other, and this book made me
reconsider that line of thinking. I highly recommend this book for Rails developers
who want to try Angular and make use of PostgreSQL’s advanced features.
➤ Nigel Lowry
Company director, Lemmata

Rails, Angular, Postgres, and Bootstrap is a powerful resource for all software en-
gineers interested in full-stack development. No matter your proficiency at each
level in the stack, you’ll acquire a new technique that’s immediately applicable to
your project.
➤ Simeon Willbanks
Lead software engineer, Stitch Fix

www.it-ebooks.info
This book provides beginner developers with solid steps to get “your” application
running and to be able to see/do it yourself. I recommend the book to Rails devel-
opers beginning their learning journey with Angular.
➤ Maricris Nonato
Senior Ruby on Rails developer, Premiere Speakers Bureau

www.it-ebooks.info
Rails, Angular,
Postgres, and Bootstrap
Powerful, Effective, and Efficient
Full-Stack Web Development

David Bryant Copeland

The Pragmatic Bookshelf


Dallas, Texas • Raleigh, North Carolina

www.it-ebooks.info
Many of the designations used by manufacturers and sellers to distinguish their products
are claimed as trademarks. Where those designations appear in this book, and The Pragmatic
Programmers, LLC was aware of a trademark claim, the designations have been printed in
initial capital letters or in all capitals. The Pragmatic Starter Kit, The Pragmatic Programmer,
Pragmatic Programming, Pragmatic Bookshelf, PragProg and the linking g device are trade-
marks of The Pragmatic Programmers, LLC.
Every precaution was taken in the preparation of this book. However, the publisher assumes
no responsibility for errors or omissions, or for damages that may result from the use of
information (including program listings) contained herein.
Our Pragmatic courses, workshops, and other products can help you and your team create
better software and have more fun. For more information, as well as the latest Pragmatic
titles, please visit us at https://pragprog.com.

The team that produced this book includes:


Fahmida Y. Rashid (editor)
Potomac Indexing, LLC (index)
Liz Welch (copyedit)
Dave Thomas (layout)
Janet Furlow (producer)
Ellie Callahan (support)

For international rights, please contact rights@pragprog.com.

Copyright © 2016 The Pragmatic Programmers, LLC.


All rights reserved.

No part of this publication may be reproduced, stored in a retrieval system, or transmitted,


in any form, or by any means, electronic, mechanical, photocopying, recording, or otherwise,
without the prior consent of the publisher.

Printed in the United States of America.


ISBN-13: 978-1-68050-126-1
Encoded using the finest acid-free high-entropy binary digits.
Book version: P1.0—January 2016

www.it-ebooks.info
Contents

Acknowledgments . . . . . . . . . . . ix
Introduction . . . . . . . . . . . . . xi

1. Create a Great-Looking Login with Bootstrap and Devise . . 1


Setting Up Devise for Authentication 2
Installing Bootstrap with Bower 10
Styling the Login and Registration Forms 16
Validating Registration 22
Next: Using Postgres to Make Our Login More Secure 23

2. Secure the Login Database with Postgres Constraints . . 25


Exposing the Vulnerability Devise and Rails Leave Open 25
Prevent Bad Data Using Check Constraints 26
Why Use Rails Validations? 31
Next: Using Postgres Indexes to Speed Up a Fuzzy Search 32

3. Use Fast Queries with Advanced Postgres Indexes . . . 33


Implementing a Basic Fuzzy Search with Rails 34
Understanding Query Performance with the Query Plan 45
Indexing Derived and Partial Values 46
Next: Better-Looking Results with Bootstrap’s List Group 50

4. Create Clean Search Results with Bootstrap Components . 51


Creating Google-Style Search Results Without Tables 52
Paginating the Results Using Bootstrap’s Components 57
Next: Angular! 60

5. Build a Dynamic UI with AngularJS . . . . . . . 61


Configuring Rails and Angular 62
Porting Our Search to Angular 65

www.it-ebooks.info
Contents • vi

Changing Our Search to Use Typeahead 79


Next: Testing 81

6. Test This Fancy New Code . . . . . . . . . 83


Installing RSpec for Testing 84
Testing Database Constraints 87
Running Headless Acceptance Tests in PhantomJS 91
Writing Unit Tests for Angular Components 103
Next: Level Up on Everything 117

7. Create a Single-Page App Using Angular’s Router . . . 119


Using Angular’s Router for User Navigation 121
Serving Angular Templates from the Asset Pipeline 124
Adding a Second View and Controller to Our Angular App 127
Next: Design Using Grids 135

8. Design Great UIs with Bootstrap’s Grid and Components . 137


The Grid: The Cornerstone of a Web Design 138
Using Bootstrap’s Grid 140
Adding Polish with Bootstrap Components 146
Next: Populating the View Easily and Efficiently 150

9. Cache Complex Queries Using Materialized Views . . . 151


Understanding the Performance Impact of Complex Data 152
Using Materialized Views for Better Performance 160
Keeping Materialized Views Updated 165
Next: Combining Data with a Second Source in Angular 169

10. Asynchronously Load Data from Many Sources . . . . 171


Understanding How Asynchronous Requests Work 172
Using Angular-Resource to Connect to Rails 175
Nesting Controllers to Organize Code 180
Using Bootstrap’s Progress Bar When Data Is Loading 183
Passing Data Between Controllers 186
Testing Controllers That Use Angular-Resource 189
Next: Sending Changes Back to the Server 191

11. Wrangle Forms and Validations with Angular . . . . 193


Managing Client-Side State with Bindings 194
Validating User Input with Angular Forms 195
Styling Invalid Fields with Bootstrap 200
Saving Data Back to the Server 205

www.it-ebooks.info
Contents • vii

Understanding the Role of Rails Validators 209


Next: Everything Else 211

12. Dig Deeper . . . . . . . . . . . . . 213


Unlocking More of Postgres’s Power 213
Leveling Up with Angular 225
Getting Everything Out of Bootstrap 234

A1. Full Listing of Customer Detail Page HTML . . . . . 249


A2. Creating Customer Address Seed Data . . . . . . 253

Bibliography . . . . . . . . . . . . 257
Index . . . . . . . . . . . . . . 259

www.it-ebooks.info
Acknowledgments
I’d like to first thank my wife Amy, who gave me the encouragement and space
to spend time every morning writing this book.

I’d also like to thank my editor, Fahmida Rashid, who managed to take what
started as a functional requirements document for a customer service appli-
cation and helped me turn it into a useful book.

I’d further like to thank the many people who reviewed the in-progress book,
including Chris Hoffman, David McClain, J. Daniel Ashton, Jacob Chae, John
Cater, Maricris Nonato, Matthew Oldham, Nell Shamrell, Nigel Lowry, Simeon
Willbanks, and Jeremy Frens (who had particular insights that I hope I’ve
reflected well). And a huge thanks to the various readers who pointed out
errors in the beta version of the book (including some rather embarrassing
omissions): Andrea Bufalo Riva, Bradford Baker, Brent Nordquist, C. R. Myers,
Chris McCann, Harri Jauri, J. Daniel Ashton, Jamie Finlay, Jesus Alc, John
Lyons, Michael Pope, Narongsak Jirajaruwong, Nick Clyde, Patrick Joyce,
Russ Martin, Sernin van de Krol, Stephen Lloyd, and Volker Wiegand.

Finally, I’d like to thank the contributors to the software you’re learning about
in this book. The people who have given their free time to make Ruby, Rails,
Postgres, Angular, Bootstrap, PhantomJS, Teaspoon, Poltergeist, Devise,
Capybara, RSpec, Angular-UI, Database Cleaner, Bower, and all other open
source software are far too numerous to list here, but without their work,
most developers would have a hard time doing their jobs.

www.it-ebooks.info report erratum • discuss


Introduction
Think about what part of an application you’re most comfortable working
with. If you’re a Rails developer, there’s a good chance you prefer the back
end, the Ruby code that powers the business logic of your application. What
if you felt equally comfortable working with the database, such as tweaking
queries and using advanced features of your database system? What if you
were also comfortable working with the JavaScript and CSS necessary to
make dynamic, usable, attractive user interfaces?

If you had that level of comfort at every level of the application stack, you
would possess great power as a developer to quickly produce high-quality
software. Your ability to solve problems would not be restricted by the tools
available via a single framework, nor would you be at the mercy of hard-to-
find specialists to help you with what are, in reality, simple engineering tasks.

The Rails framework encourages developers not to peer too closely into the
database. Rails steers you away from JavaScript frameworks in favor of its
sprinkling approach, where content is all rendered server-side. This book is
going to open your eyes to all the things you can accomplish with your
database, and set you on a path that includes JavaScript frameworks. With
Rails acting as the foundation of what you do, you’ll learn how to embrace
all other parts of the application stack.

The Application Stack


Many web applications—especially those built
User Interface
with Ruby on Rails—use a layered architec-
ture that is often referred to as a stack, since Middleware
most diagrams (like the one we use in this
Data Store
book) depict the layers as stacked blocks.

Rails represents the middle of the stack, and


is called middleware. This is where the core logic of your application lives.
The bottom of the stack—the data store—is where the valuable data saved

www.it-ebooks.info report erratum • discuss


Introduction • xii

and manipulated by your application lives. This is often a relational database


management system (RDBMS). The top of the stack is the user interface. In a
web application, this is HTML, CSS, and JavaScript served to a browser.

Each part of the stack plays a crucial role in making software valuable. The
data store is the canonical location of the organization’s most important
asset—its data. Even if the organization loses all of its source code, as long
as it retains its data, it can still survive. Losing all of the data, however, would
be catastrophic.

The top of the stack is also important, as it’s the way the users view and enter
data. To the users, the user interface is the database. The difference between
a great user interface and a poor one can mean the difference between happy
users and irritated users, accurate data and unreliable data, a successful
product and a dismal failure.

What’s left is the part of the stack where most developers feel most comfort-
able: the middleware. Poorly constructed middleware is hard to change,
meaning the cost of change is high, and thus the ability of the organization
to respond to changes is more difficult.

Each part of the stack plays an important role in making a piece of software
successful. As a Rails developer, you have amassed many techniques for
making the middleware as high quality as you can. Rails (and Ruby) makes
it easy to write clean, maintainable code.

Digging deeper into the other two parts of the stack will have a great benefit
for you as a developer. You’ll have more tools in your toolbox, making you
more effective. You’ll also have a much easier time working with specialists,
when you do have access to them, since you’ll have a good grasp of both the
database and the front end. That’s what you’ll learn in this book. When you’re
done, you’ll have a holistic view of application development, and you’ll have
a new and powerful set of tools to augment your knowledge of Rails. With
this holistic view, you can build seemingly complex features easily, sometimes
even trivially.

You’ll learn PostgreSQL, AngularJS, and Bootstrap, but you can apply many
of the lessons here to other data stores, JavaScript libraries, and CSS
frameworks. In addition to seeing just how powerful these specific tools can
be, you’re going to be emboldened to think about writing software beyond
what is provided by Rails.

www.it-ebooks.info report erratum • discuss


The Application Stack • xiii

PostgreSQL, Angular, and Bootstrap: The Missing Parts of Our Stack


If all you’ve done with your database is create tables, insert data, and query
it, you’re going to be excited when you see what else you can do. Similarly, if
all you’ve done with your web views is sprinkle some jQuery calls to your
server-rendered HTML, you’ll be amazed at what you can do with very little
code when you have a full-fledged JavaScript framework. Lastly, if you’ve
been hand-rolling your own CSS, a framework like Bootstrap will make your
life so much simpler, and your views will look and feel so much better.

In this book, we’re going to focus on PostgreSQL (or simply Postgres) as our
data store—the bottom of the stack—and AngularJS (or just Angular) with
Bootstrap as our front end—the top of the stack. Each of these technologies
is widely used and very powerful. You’re likely to encounter them in the real
world, and they each underscore the sorts of features you can use to deliver
great software outside of what you get with Rails.

With these chosen technologies, our application stack looks like this:

Angular Bootstrap

Rails

Postgres

In each chapter, we’ll highlight the parts of the stack we’ll be focusing on and
call out the various aspects of these technologies you’ll be learning. Not every
chapter will focus on all parts of the stack, so at the start of each chapter,
you’ll see a roadmap like this of what you’ll be learning:

Feature we're
working on
Not part of Focus of
this chapter this chapter

LOGIN

Focus of Form
this chapter Angular Bootstrap Styles Aspects of
the technologies
Devise we'll see in
Rails this chapter

Postgres

Let’s get a taste of what each has to offer, starting with PostgreSQL.

www.it-ebooks.info report erratum • discuss


Introduction • xiv

PostgreSQL
PostgreSQL is an open source SQL database released in 1997. It supports
many advanced features not found in other popular open source databases
such as MySQL1 or commercial databases such as Microsoft SQL Server.2
Here are some of the features you’ll learn about (and I’ll show you how to use
them with Rails):

Check constraints
You can create highly complex constraints on your table columns beyond
what you get with not null. For example, you can require that a user’s email
address be on a certain domain (which we’ll see in Chapter 2, Secure the
Login Database, on page 25), that the state in a U.S. address be written
exactly as two uppercase characters, or even that the state in the address
must already be on a list of allowed state codes.

While you can do this with Rails, doing it in the database layer means
that no bug in your code, no existing script, no developer at a console,
and no future program can put bad data into your database. This sort of
data integrity just isn’t possible with Rails alone.

Advanced indexing
In many database systems, you can only index the values in the columns
of the database. In Postgres, you can index the transformed values. For
example, you can index the lowercased version of someone’s name so that
a case-insensitive search is just as fast as an exact-match search. We’ll
see this in Chapter 3, Use Fast Queries with, on page 33.

Materialized views
A database view is a logical table based on a SELECT statement. In Postgres
a materialized view is a view whose contents are stored in an actual
table—accessing a materialized view won’t run the query again like it
would in a normal view. We’ll use one in Chapter 9, Cache Complex
Queries, on page 151.

Advanced data types


Postgres has support for enumerated types, arrays, and dictionaries (called
HSTOREs). In most database systems, you have to use separate tables to
model these data structures.

1. https://www.mysql.com/
2. http://www.microsoft.com/en-us/server-cloud/products/sql-server/

www.it-ebooks.info report erratum • discuss


The Application Stack • xv

Free-form JSON…that’s indexed


Postgres supports a JSON data type, allowing you to store arbitrary data
in a column. This means you can use Postgres as a document data store,
or for storing data that doesn’t conform to a strong schema (something
you’d otherwise have to use a different type of database for). And, by using
the JSONB data type, you ensure that the JSON fields can be indexed, just
like a structured table’s fields.

Although you can serialize hashes to JSON in Rails using the TEXT data
type, you can’t query them, and you certainly can’t index them. JSONB
fields can interoperate with many systems other than Rails, and they
provide great performance.

AngularJS
AngularJS3 is a JavaScript Model-View-Controller (MVC) framework created
and maintained by Google (Angular bills itself as a Model-View-Whatever
framework, but for this book, the Whatever will be a controller). Angular treats
your view not as a static bit of HTML, but as a full-blown application. By
adopting the mind-set that your front end is a dynamic, connected interface,
and not a set of static pages, you open up many new possibilities.

Angular provides powerful tools for organizing your code and lets you structure
your markup to create intention-revealing, testable, manageable front-end
code. It doesn’t matter how small or large the task—as your UI gets more
complex, Angular scales much better than something more basic like jQuery.

As an example, consider showing and hiding a section of the DOM using


jQuery. You might do something like this:
jquery_example.html
<section>
<p>You currently owe: $123.45</p>
<button class="reveal-button">Show Details</button>
<ul style="display: none" class="details">
<li>Base fee: $120.00</li>
<li>Taxes: $3.45</li>
</ul>
</section>
<script>
$(".reveal-button").click(function($event) {
$(".details").toggle();
});
</script>

3. https://angularjs.org

www.it-ebooks.info report erratum • discuss


Introduction • xvi

It’s not much code, but if you’ve ever done anything moderately complex, your
markup and JavaScript becomes a soup of magic strings, classes starting
with js-, and oddball data- elements.

An Angular version of this might look like this:


angular_example.html
<section ng-app="account" ng-model="showDetails"
ng-init="showDetails = false">
<p>You currently owe: $123.45</p>
<button ng-click="showDetails = !showDetails">Show/Hide Details</button>
<ul ng-if="showDetails">
<li>Base fee: $120.00</li>
<li>Taxes: $3.45</li>
</ul>
</section>
<script>
var app = angular.module("account",[]);
</script>

Here, the view isn’t just a description of static content, but a clear indication
of how it should behave. Intent is obvious—you can see how this works
without knowing the underlying implementation—and there’s a lot less code.
This is what a higher-level of abstraction like Angular gives you that would
otherwise be a mess with jQuery or just plain JavaScript.

Unlike Postgres—where there are very few comparable open source alternatives
that match its features and power—there are many JavaScript frameworks
comparable to Angular. Many of them are quite capable of handling the fea-
tures we’ll cover in this book. We’re using Angular for a few reasons. First,
it’s quite popular, which means you can find far more resources online for
learning it, including deep dives beyond what we’ll get to here. Second, it
allows you to compose your front end similarly to how you compose your back
end in Rails, but it’s flexible enough to allow you to deviate later if you need
to.

If you’ve never done much with JavaScript on the front end, or if you’re just
used to jQuery, you’ll be pleasantly surprised at what Angular gives you:

Clean separation of code and views


Angular models your front end as an application with its own routes,
controllers, and views. This makes organizing your JavaScript easy and
tames a lot of complexity.

www.it-ebooks.info report erratum • discuss


The Application Stack • xvii

Unit testing from the start


Testing JavaScript—especially when it uses jQuery—has always been a
challenge. Angular was designed from the start to make unit testing your
JavaScript simple and convenient.

Clean, declarative views


Angular views are just HTML. Angular adds special attributes called
directives that allow you to cleanly connect your data and functions to
the markup. You won’t have inline code or scripts, and a clear separation
exists between view and code.

Huge ecosystem
Because of its popularity, there’s a large ecosystem of components and
modules. Many common problems have a solution in Angular’s ecosystem.

It’s hard to fully appreciate the power of a JavaScript framework like Angular
without using it, but we’ll get there. We’ll turn a run-of-the-mill search feature
into a dynamic, asynchronous live search, with very little code.

Bootstrap
Bootstrap4 is a CSS framework created by Twitter for use in their internal
applications. A CSS framework is a set of CSS classes you apply to markup
to get a particular look and feel. Bootstrap also includes components, which
are classes that, when used on particular HTML elements in particular ways,
produce a distinct visual artifact, like a form, a panel, or an alert message.

The advantage of a CSS framework like Bootstrap is that you can create full-
featured user interfaces without writing any CSS. Why be stuck with an ugly
and hard-to-use form like this?

By just adding a few classes to some elements, you can have something pol-
ished and professional like this instead:

4. http://getbootstrap.com

www.it-ebooks.info report erratum • discuss


Introduction • xviii

In the next chapter we’ll do this to the login and registration forms provided
by the Devise gem. We’ll have a great-looking user sign-up and sign-in expe-
rience, without writing any CSS.

Bootstrap includes a lot of CSS for a lot of different occasions.

Typography
Just including Bootstrap in your application and using semantic HTML
will result in pleasing content with good general typography.

Grid
Bootstrap’s grid makes it easy to lay out complex, multicolumn compo-
nents. It can’t be overstated how important and powerful this is.

Form styles
Styling good-looking forms can be difficult, but Bootstrap provides many
CSS classes that make it easy. Bootstrap-styled forms have great spacing
and visual appeal, and feel cohesive and inviting to users.

Components
Bootstrap also includes myriad components, which are CSS classes that,
when applied to particular markup, generate a visual component, like a
styled box or alert message. These components can be great inspiration
for solving simple design problems.

It’s important to note that Bootstrap is not a replacement for a designer, nor
are all UIs created with Bootstrap inherently usable. There are times when a
specialist in visual design, interaction design, or front-end implementation
is crucial to the success of a project.

But for many apps, you don’t need these specialists (they are very hard to
find when you do). Bootstrap lets you produce a professional, appealing user
interface without them. Bootstrap also lets you realize visual designs that
might seem difficult to do with CSS. In Chapter 4, Create Clean Search Results,
on page 51 and Chapter 8, Design Great UIs with, on page 137, you’ll see just
how easy it is to create a customized UI without writing CSS, all thanks to
Bootstrap.

Even if you have a designer or front-end specialist, the skills you’ll learn by
using Bootstrap will still apply—your front-end developer isn’t going to write
every line of markup and CSS. They are going to hand you a framework like
Bootstrap that enables you to do many of the things we’ll do in this book.

Now that you’ve gotten a taste of what we’ll be covering, let’s talk about how
you’re going to learn it.

www.it-ebooks.info report erratum • discuss


Postgres, Angular, and Bootstrap—At the Same Time • xix

Postgres, Angular, and Bootstrap—At the Same Time


If you’ve already looked at the table of contents, you’ll see that this book isn’t
divided into three parts—one for Postgres, one for Angular, and one for
Bootstrap. That’s not how a full-stack developer approaches development. A
full-stack developer is given a problem to solve and is expected to bring all
forces to bear in solving it.

For example, if you’re implementing a search, and it’s slow, you’ll consider
both creating an index in the database as well as performing the search with
Ajax calls to create a more dynamic and snappy UI. You should use features
at every level of the stack to get the job done.

SEARCH FEATURE

Search Ajax
Angular Bootstrap Form Calls
Results
View

Search
Rails Logic

Postgres Indexes

This holistic approach is how you’re going to learn these technologies. We’ll
build a Rails application together, adding features one at a time. These features
will demonstrate various aspects of the technologies we’re using.

To keep things simple, each chapter will focus on a single technology, and
we’ll complete features over several chapters. For example, in the next chapter
we’ll set up a simple registration system for our application and use Bootstrap
to style the views. In Chapter 2, Secure the Login Database, on page 25, we’ll
continue the feature but focus on using Postgres to add extra security at the
database layer. This will allow us to see each feature evolve as we bring in
relevant parts of the application stack. This will give you the confidence to
do the same for other features that you build in your own apps.

It’s also worth emphasizing the role of Rails in all of this. Although Rails
doesn’t have built-in APIs for using Postgres’s advanced features, nor support
for Angular’s way of structuring code, it doesn’t outright prevent our using
them. And Rails is a great middleware; probably one of the best.

www.it-ebooks.info report erratum • discuss


Introduction • xx

So, in addition to learning Postgres, Angular, and Bootstrap, you’re going to


learn how to get them working with Rails. You’ll see not just how to create
check constraints on columns in our tables, but how to do that from a Rails
migration. And you won’t just learn how to style Angular components with
Bootstrap—you’ll do it using assets served up by the asset pipeline.

Let’s learn about the Rails application that we’ll be building in this book.

Shine, the Application We’ll Build


In this book we’ll create and add features to a Rails application. We’re creating
this application for the customer service agents at the hypothetical company
where we work. Our company has a public website that its customers use,
but we want a separate application for the customer service agents. You’ve
probably seen or heard about internal-facing apps like this. Perhaps you’ve
even worked on one (most software is internally facing).

The application will be called Shine (since it allows our great customer service
to shine through to our customers). The features that we’ll build for this
application involve searching for, viewing, and manipulating customer data.

For example, we’ll allow the user to search for customers.

Shine: Customer 1234


http://shine.example.com/customers/1234 Google

Bob

Bob Jones bobert1234 JOINED 10/12/2014


bjones18@somewhere.net

Darrell Bobbins dbob JOINED 1/13/2014


bjones18@somewhere.net

Bobby Smith bbysmith JOINED 10/12/2014


bjones18@somewhere.net

And they can click through and view or edit a customer’s data.

www.it-ebooks.info report erratum • discuss


Discovering Diverse Content Through
Random Scribd Documents
The dinner is a quiet meal, and tends to solemnity. Mrs. Hill and her
daughter sit opposite the farmer and me. Little is said, but for me
there is absorbing interest in the meal itself. It is worthy of the best
traditions of country life, clean in all its appointments to a degree of
spotlessness, really elegant in its quiet simplicity, and appetizing?—
how was I ever to stop eating those potatoes that spread under the
pressure of my fork into a mass of flaky deliciousness, or the ears of
sweet-corn fresh from a late field, or the green peas that swim in a
sweet stew of their own brewing, or, best of all, the little pond
pickerel that are grilled to a crisp brown turn?
In our more artificial forms of living we habitually eat when we are
not hungry, and drink when we are not thirsty, and we know little of
the sheer physical delight in meat and drink when our natures seize
joyously upon the means of life, and organs work in glad adaptation
to function, and the organism, in full revival, responds to its
environment!
The work moves uninterruptedly in the afternoon; and at six o'clock,
as I wearily drag my feet along the lane by the farmer's side, I can
see his daughter driving the cattle through the pasture to the
cowyard, and I wonder how I shall fare at the evening milking. But I
am not put to that test; for the farmer declines my offer of help,
with the explanation that, under our arrangement, my day's work is
done at six o'clock, and that he is not entitled to further help, nor
does he need it, he adds, for his wife and daughter always lend a
hand at the chores.
Supper is almost a repetition of dinner, with a pitcher of rich milk
kindly pressed upon me when I decline the tea, and with apple-
sauce and cake in the place of pumpkin-pie. Soon after, I am lighting
my way with a lantern through the dark to my cot in the loft, and for
ten hours I sleep the sleep of a child, and awake at six in the
morning to the farmer's call of "John, hey John!" from under the
window.
All of that day, which was Wednesday, was given to completing the
work on the dam. The necessary excavation was soon finished, and
then we laid the timbers, and nailed the new planks into place, and
filled in and packed the earth behind them. Over the completed job
the farmer expressed such a depth of satisfaction that I felt a glow
of pride in the work, and a sense of proprietorship, which was
splendidly compensating for the effort which it had cost.
The remaining three days of the week we spent in picking apples.
Behind the wagon-house was an orchard. Mr. Hill first selected a
tree, and then we placed under it the number of empty barrels,
which, in his judgment, corresponded to its yield, a judgment which
was always singularly accurate. Then, each supplied with a half-
bushel basket with a wooden hook attached to the handle, we next
climbed among the branches, and suspending our baskets, we
carefully picked the apples with a quick upward turn of the fruit,
which detached them at the point at which the stem was fast to the
twig. Both baskets were usually full at about the same moment, and
then we took turns in climbing down and receiving the baskets from
the tree, and emptying the apples into the barrels with great caution
against possible bruising.
All this was Arcadian in its joyous simplicity. All day we moved
among the boughs, breathing the fragrance of ripened fruit and the
mellow odor of apple-trees turning at the touch of frost; picking
ceaselessly the full-juiced apples "sweetened with the summer light,"
while above us white clouds fled briskly before the northwest wind
across the clear blue of the autumn sky; and below us lay the
pasture, where the patient cattle grazed, and beyond stretched open
country of field and forest, which, in that crystal air, met the horizon
in a clean, sharp line.
Mr. Hill and I were growing very chummy. A faint uncomfortable
distrust of me, which I suspected through the first two days, had
wholly disappeared. We talked with perfect freedom now and with a
growing liking for each other, which, for me, added vastly to the
charm of those six days on the farm.
I tried at first to lead the talk, and to draw Mr. Hill into expressions
of his views of life, that I might learn his attitude toward modern
progress, and catch glimpses of the growth of things from his point
of view. But Mr. Hill was proof against such promptings. He was a
shrewd, practical farmer, with a masterful hold upon all the details of
his enterprise, and with a mind quickened by thrifty conduct of his
own affairs to a catholic taste for information. His schooling had
been limited, he said, but he must have meant his actual school
training; for life itself had been his school, and admirably had he
improved its advantages. He was a trained observer and a close
student of actual events. Instead of my getting him to talk, he made
me talk, but with so natural a force as to rob it of all thought of
compulsion.
The talk drifted early into politics, and I soon found that my light-
hearted generalizations would not pass muster. Back and back he
would press me upon the data of each induction, until I was forced
to tell what I knew, or was confronted with my ignorance.
And then he delighted in talk of other people than our own, and his
knowledge of a somewhat general contemporaneous history was
curiously varied and accurate. Stories of succeeding English
ministries, and even of the short-lived French cabinets, were ready
to his use, and he tactfully righted me in my errors. But he held me
closest to my memories of things among the common people, the
agricultural laborers in England, and their relation to the farmers,
and theirs in turn to the landed proprietors, and the promise which
the land could give of continued support to three classes, under the
changed conditions of modern life. All that I could remember of a
typical laborer's home, and of its manner of life, and of the general
aspect of an English farm, seemed only to whet his appetite, and to
strengthen his demand for what I knew of the continental peasantry.
His interest centred strongly in the French, and there was plainly a
peculiar charm for him in every detail which I could give of the
French farmers, with their small holdings, and their inherited habits
of thrift, and of the close culture of their lands. But he would even
lead me on to speak of great cities, and of the life in them of the
rich and poor, and of any signs, of which I knew, of growing social
discontent. And with an interest that never flagged, he questioned
me on works of art; and followed patiently, and with a zest that
warmed one's own enthusiasm, through endless churches, and long
dim galleries, and by narrow, crooked streets of a modern city to the
ruins of its distant past. And there we restored the crumbling piles,
until there stood clear to his imagination a vision of Imperial Rome,
and his eyes kindled to some great general's triumph moving
through the Via Sacra, and the people swarming to the very
chimney-tops, their infants in their arms, and on the air the deep,
rich moving roar of high acclaim!
Sunday was the last day of my stay on the farm. When, in the
middle of the week, I found that Mr. Hill was likely to keep me, I was
conscience-stricken, because I had not told him that my stay would
be short. He said nothing at first in reply to my announcement, but
presently remarked that it was very hard to get men in that part of
the country.
"But, surely," I said, "more men apply to you for work than you can
possibly employ."
He looked at me with some wonder, at my ignorance.
"For a long time I have been looking for a man to help me," he said.
"I'm growing old, and I can't do the work that I once did. If I could
find the right man, I'd keep him the year round, and pay him good
wages. But the best young fellows go to the cities, and the rest are
mostly a worthless lot. There's hardly a day in the year when I
haven't a job for any decent man who'll ask for it. I have to go
looking for men, and then I generally can't find one that's any
account."
This was much the longest speech that he had made to me so far,
and a very interesting one I thought it, and I am only sorry that I
cannot reproduce the exact phraseology, with its Anglo-Saxon words
set, by an instinctive choice, into rugged sentences which admirably
expressed the man. I waited hopefully for further speech from him,
and at last it came, quite of its own accord; for I had given up trying
to draw him out.
We were sitting together on Sunday evening on the platform of the
pump in front of the farm-house. It had been a very restful Sunday.
In the morning I went to the village church, where two services
followed each other in quick succession. The first was a prayer-
meeting, attended by a little company of farming people and village
folk, who conscientiously parted company at the door on the basis of
sex, and sat on opposite sides of a central aisle.
The service was a simple one. The leader read a passage from the
Bible, and offered prayer, and then gave out a hymn. When the
singing ceased, one after another, the older men, with nervous
pauses between, rose to "testify" or sank to their knees, and prayed
aloud. I chiefly remember one as a typical figure—an old man,
whose thick white hair mingled with a bushy beard that covered his
face. I noticed him first in comfortable possession of a bench along
which he stretched his legs. On his feet were loose carpet-slippers;
and with his shoulders braced against the wall, and his head thrown
back, and his eyes closed, he looked the vision of physical ease,
which matched the expression of deep contentment that he wore.
There was no suspicion of sleep about him. Most evidently he
followed with liveliest sympathy every word that was said or sung. I
looked up presently at the sound of a new voice, and found the old
man on his feet. He was adding his "testimony" to what had gone
before, and was speaking rapidly in a deep, gruff voice with blunt
articulation. There was a strong reminder in the performance of a
school-boy's "speaking his piece;" the monotonous, unnatural tone;
the rapid flow of conventional, committed phrase; and the nervous
tension, which communicated itself to his hearers in a fear that he
might forget.
But there came at length, without calamity, the final "Pray for me
that I may be kept faithful," and then he knelt in prayer. Invocations
from the Prophets, and supplications from the Psalms, and glowing
exhortations from the Epistles, were interwoven with strangest
interpolations of his own, while his voice rose and fell in regular
cadences and he audibly caught his breath between. But he was
losing himself in his devotion, and presently his voice fell to a natural
tone, and his words grew plain and direct, as he held converse with
the Almighty about our common life—of sin and its awful guilt, of
temptation and its fateful trial, of suffering and its terrible reality, of
sorrow and its cruel mystery. Then, as though quickened by the
touch of truth, his faith rose on surer wings, and his prayer breathed
the sense of sin forgiven, and of life made strong by a power not our
own, and of hope exultant in the knowledge "of that new life when
sin shall be no more!"
A solemn stillness held us when he rose, and made us feel the
presence in our common lot of things divine and that deep
sacredness of life which awes us most.
A short preaching service followed. The preacher drove up on the
hour from another parish, and started off, at the meeting's end, for
yet a third appointment.
This is a long digression from Mr. Hill's talk of the evening, and I
have said nothing yet of the afternoon. We took chairs out on the
grass in front of the cottage, after dinner, and sat in the shade. We
soon had visitors. Mr. Hill's brother and his wife walked up from the
lower farm, and a little later there came Mr. Hill's son and his young
bride. The son is a physician, whose practice covers much of that
country-side; and it was interesting to me to learn that his
professional training was got at the College of Physicians and
Surgeons in New York.
Fearful of disturbing the family gathering, I drew off a little, and
gave my attention to a book. Late in the afternoon I was roused by
the coming of another guest. He was an old neighboring farmer out
in search of a heifer which had broken through the pasture-fence. As
he joined us he was speaking so swiftly and incoherently about the
heifer's escape that I felt some doubt of his sanity, but he quieted
down in a moment, and threw himself on the grass with the evident
purpose of resting before resuming the search. He was lying flat
upon his back, and his long bony fingers were clasped under his
head. He wore no hat, nor coat, nor waistcoat, and a dark gingham
shirt lay close to the sharp outlines of his almost fleshless body.
Braces that were patched with strings passed over his lean
shoulders, and were made fast to faded blue jeans, whose
extremities were tucked into an old pair of cowhide boots. A long
white beard rested on his breast, reaching almost to his waist. Only
a thin fringe of hair remained above his ears; and over the skull the
bare skin was so tightly drawn that you could almost trace the
zigzagging junctures of the frontal and the cranium bones.
But skeleton as he was, he was marvellously alive. His eyes were
aflame, and prone as he lay and resting, he impressed you as a man
so vitalized, that with a single movement he could be upon his feet
and in intense activity. He was talking on about the heifer, nervously
repeating to us, again and again, the details of where he had seen
her last, and the rift which he had found in the fence, and how he
had sent his hired man in one direction, and had gone in another
himself.
He was a rich farmer, Mr. Hill told me afterward, and he lived alone,
except for an occasional hired man whom he could induce to stay
with him for a season. But even in his old age he worked on his farm
with the strength and endurance of three men, laying aside, year by
year, his store of gain. Without a single human tie he worked on as
though spurred by every claim of affection and the highest sense of
responsibility to provide for those whom he loved; and all the while a
vast misanthropy grew upon him, and he would see less and less of
his fellow-men, and an almost life-long scepticism hardened into
downright unbelief.
So far he had not noticed me; but now he turned my way, lifting
himself upon his elbow, and fixing his sunken, burning eyes on mine,
while the white hairs of his beard mingled with the blades of grass.
"You're hired out to Jim, ain't ye?"
Jim was his designation of Mr. Hill.
"Yes," I said.
"What's he payin' you?"
I told him.
Mr. Hill was squirming in nervous discomfort.
"What's your name?"
I gave it him.
"Where are you come from?"
"Connecticut."
"Connecticut? That's down South, ain't it?"
"No, that's down East."
"Was you raised there?"
I do not know into what particulars of my history and of my
antecedents this process might have forced me had not the heifer
come to my relief. She was a beautiful creature, with a clean sorrel
coat, and wide, liquid, mischievous eyes; and as she ran daintily
over the turf at the side of the lane, saucily tossing her head, you
knew that she was closely calculating every chance of dodging the
gawky country boy who, breathing hard, lunged after her.
Without a word of parting, and as abruptly as he came, the old man
was gone to head her off in the right direction at the mouth of the
lane. And so he disappeared, as strange a human being as the world
holds, living tremendously a life of strenuous endeavor, yet Godless
and hopeless and loveless in it all, except for the greedy love of
gain, which holds him in miserable bondage, as he works his life
away.
It was soon after supper that Mr. Hill and I sat down together on the
platform of the pump. There was little movement in the air, and it
was very mild for the twenty-seventh of September. As the stars
appeared, they shone upon us through a mellow warmth, like that of
summer, in which they seem magically near, and one feels their calm
companionship in human things.
"And you've made up your mind to go in the morning?" Mr. Hill
began.
"Yes," I said, "I must be off. I am truly sorry to go. But you surprise
me by what you tell me of the difficulty in the country of getting
men to work. One hears so much about 'the unemployed,' that any
demand for labor, which remains unsupplied, seems to me an
anomalous condition."[A]
"That's a big question," he said, with a deep sigh, as he leant back
against the pump and looked at me out of blue eyes that were gray
and keen in the starlight. "It reminds me of what we used to call a
hard example in arithmetic in the district school when I was a boy.
There's a good many things you've got to take account of, if you
work it out right, and there's a good many chances of mistake, and a
mistake goes hard with your answer. I haven't worked this sum and
I haven't seen it worked, but I've studied it a good while, and I think
I know how to do parts of it."
He paused for a moment and then went on: "In the last hundred
and fifty years there have been great changes in the world in the
ways of producing things—'improved methods of production' the
books call it. Some say it ain't really 'improved,' only faster and
cheaper, but I'm not arguing that point. The power of people to
produce the necessaries of life is a big sight greater than it was a
hundred and fifty years ago—that's my point. It's what the books call
'increased power of production.' And among civilized people there's
been this increase of producing power in about all the forms of
production. In some forms it's been very great, and in others not so
great; but I guess there ain't many kinds of business that haven't
been changed by it.
"Now, I think that the farming business has lagged behind the rest.
Not that there ain't been improvement, for there's been great
improvement. There's the steam-ploughs, and the reapers, and
harvesters, and mowers, and the threshing-machines; and then
there's the science of agricultural chemistry. But I'm judging of what
I know of the farming business as it's carried on.
"Now, here's my farm: it's part of a tract that my great-grandfather
settled on and cleared. I've heard my grandfather tell many a time
of the Indians that were all about here when he was a boy, and even
my father often went hunting deer down on the lake this side of the
woods.
"Well, I know this country pretty well, and I find that a farmer now
don't work any bigger farm than my grandfather did, nor the work
isn't much lighter, nor he doesn't get much more for it. There's been
a good many changes, but as the farming business goes, there ain't
any increased production that's kept up with other kinds of business
when you calculate how many farmers there are and how much they
do.
"I read in a book the other day that twenty-five men, with modern
machinery, can produce as much cotton cloth as the whole
population of Lancashire could produce in the old way; but there
ain't any twenty-five men who could work the farms of this township
with all the modern farming machinery.
"Take it day in and day out the whole year round on the farms, and
a man's work or a team's work is pretty much what it was a hundred
years ago.
"And here's another thing that makes a great difference between
farming and other kinds of business. When I go to the city I most
generally visit some factory and go through it as carefully as I can.
The machinery is interesting and wonderful, and if it's something
useful they're making, I like to compare the productive power of the
factory hands with what it would be if they were all working
separately by the old methods. But besides this, there's the
wonderful economy that I see. The factory is built so as to save all
the carting that's possible, and there's men always studying how
they can make it more convenient, and can improve the machinery
and cut down the costs. And then I don't find any leakage anywhere
that can be helped; and it's most wonderful what they do in some
kinds of manufacturing with what you'd think was the very refuse,
working it up into some by-product that makes the difference
between profit and loss in the whole business. It's close culture of
the closest kind applied to manufacture.
"Sometimes I've had a chance to talk to a superintendent of a
factory, and he's told me about the business from the inside—how
carefully he must study the market and how closely he must
calculate a hundred things; and how exactly his books must be kept,
and how easy it is for a little thing that's been miscalculated or
overlooked to ruin the business.
"I tell you that I've come to see pretty clearly that the business that
pays in these times of competition is a powerful lucky one and
powerful well managed. When the year's work is done and the
wages have been paid, and the rent and the interest on the capital
paid up, and the salaries paid to the brains that run the thing, it's a
remarkable business that's got anything over in the way of profit.
"Now, the farming business, as I look at it, is a long way behind all
that. We don't know much about close culture in farming in America,
and I don't believe there's one farmer in five hundred that keeps
books and can tell you exactly where he stands; and these things
we've got to learn. It's terrible easy to let things go their own way
pretty much—until the fences are falling down and your buildings are
out of repair, and your tools are going to ruin with rust, and your
children are not having good advantages. You may think that you're
too poor to afford anything different and that it's economy to live so.
But it ain't; it's the worst kind of waste. It takes a sight of hard
work, brainwork, and handwork, too, to get good, substantial
buildings and fences, and tools and stock, and to keep them good
and to raise your children well. You've got to make a close
calculation on every penny, but it's the only true economy. The
difference between the economy of shabbiness and the economy of
thrift is the difference between waste and saving.
"My father could not give me much school learning, but he learnt me
to farm it thoroughly. I've been at it a good many years now, and I
know by experience the truth of what he taught me. If there's ever
been anything more than our living at the end of the year, it's only
because we all worked hard, my wife and daughter as hard in the
house as me and my son on the farm; and because we studied to
raise the best of everything we could, and to get the best prices we
could, and we saved every penny that could be saved.
"My son wanted to study to be a doctor when he was growing up,
and so I gave him the best schooling that he could get around here;
and when he was old enough, and I saw his mind was made up, I
sent him to the best medical college I could find. And I've given my
daughter all the schooling she's had the strength for. It's the best
economy to get the best, whether it's buildings, or tools, or stock, or
education; and there's a great deal more satisfaction in it besides. I
tell you this because it's my experience, and I know it, but I owe it
mainly to the raising my father gave me. It's hard work, and it's hard
study, and it's awful careful economy in little things as well as big,
that makes a man succeed in any business.
"You've heard the saying that 'the luxuries of one generation are the
necessities of the next.' That's certainly true in the country. I've
heard my grandfather say that when he was a boy it didn't take
more than ten dollars a year to pay for everything that the family
bought. All that they wore and ate and drank they raised on the
farm, and they built their own buildings, and made their own tools,
mostly, and worked out most of their taxes.
"I'm not saying that farmers must go back to that. It ain't possible.
It's every way better now to buy your cloth than to make it, and so
with your tools, and many other things; but when I see a farmer's
family spend in a year for clothes and feathers and finery as much
as ten families did for all they bought in the old days, and at the
same time their fences are falling and their stock suffering from
neglect, I see that these people don't know their business. And
when I see a farmer mortgage a piece of land to give his daughter a
fashionable wedding, and then complain that there ain't a living to
be made any more in farming, I'm sorry for him.
"You see, in the old days the ways of farming were primitive and
simple, and the ways of living were primitive and simple, too, and
they matched each other. Now both have changed. Farming is
different, and living in the country is different. The style of living in
the country is copied from the towns, where there's been the
greatest increase of producing power; and I argue that the increase
of producing power on the farms hasn't by any means kept up to
what it is in the cities.
"Now, this difference ain't unnatural. Everybody knows that the big
fortunes of the last hundred years have mostly been made in
manufacture in the cities, and in the increase of land values in the
cities, and in the development of railroads and mines. And where the
big fortunes have been made, there's been the best chances for
brains and energy and enterprise. And where brains and energy and
enterprise are at work, there all kinds of labor will go, for it's these
that make employment for labor.
"Now, it ain't saying anything against farmers to say that the best
brains that have been born on the farms for the last hundred years
haven't stayed on the farms. The farming business hasn't had the
benefit of them, but they've gone to the professions, and the
business in the cities, where the most money was to be made.
"So that through all this time of 'increasing power of production'
there's been a constant drain from the country of its best brains and
blood, and it ain't strange that the farming business has lagged
behind the others which these have gone into.
"I believe there's going to be a change. I believe the change is
begun. Competition is so keen now in about all kinds of business,
that the chances of making a fortune and making it quick are very
few. There's about so much interest to be got for your capital, and if
the security is good, the interest is very low, and there's about so
much to be got for your brains, unless you've got particular rare
brains; and as the competition grows keener, brains begin to see
that there's about as much to be made out of farming as out of
other kinds of business. Invention has done a lot already, and when
the same economy and thrift and thorough business principles are
used in farming as are used in other kinds of production, the farming
business will soon catch up with the others. And where the brains
and enterprise and energy go, labor will soon follow; and for a time
anyway, there won't be as many unemployed in the cities, nor as
many farmers in the country looking for men to work. But why are
there unemployed in the cities, while there is already a demand for
men in the country? Why, because many of the unemployed ain't fit
for us to take into our homes as hired men, and many don't know
that there's such a chance for them, and many if they do know,
would sooner starve in the cities than work and live on a farm. I've
got an idea that when the farming business is developed, there'll be
a big change in country life. Where there's plenty of brains and push
and enterprise, there's likely to be excitement.
"But it's got to come naturally; you can't pump interest into country
living by legislation. I had to laugh the other day when I was reading
a speech that Mr. John Morley made in Manchester, I think it was.
Anyway, he was arguing for parish councils, and he said that this
'gregarious instinct' that makes country people flock into towns that
are already overcrowded, is something that we ought to counteract
by making country life more interesting, and he thought that parish
councils would help to do that. Lord Salisbury got into him pretty
well a short time after, when he said in a speech that he never had
thought it was the duty of the government to provide amusement
for the people, but if he was making a suggestion in that line, he
would like to recommend the circus.
"There's another reason besides the keen competition in other kinds
of business that makes me think that farming is going to be brought
up to the others, and that is, that so many of the colleges are
teaching scientific farming. You ain't going to see any very great
result from this in a year, nor in ten years, for there's a pretty big
field to work on. But when smart young fellows that are raised in the
country, and other smart young fellows that see a good chance to
make something at farming—when they all get a thorough training
in scientific farming, and when they all get down to work, just as
they would in some other highly developed form of production, you
will see results. There won't be much in shiftless farming when the
scientific kind pretty generally sets the pace.
"I've read a good deal, of late years, about 'organized charities' in
the cities, and it certainly does seem as if charity was a good deal
more sensible than it used to be. It's hard to see how there can be
any kind of serious destitution in the cities that ain't got some
society to relieve it. And the rich in the cities do certainly spend a
powerful lot of time and work and money in keeping up these
charities and amusements for the poor; but I don't see any signs
that the poor love the rich any more, nor that there's any less
danger but that some day they'll rise up in war against society.
"It seems to me that a good deal of all this time, and labor, and
money, and a good deal more besides, might be better spent in
providing that no child among the poor grows up without proper
education, technical education in useful trades; especially, I think, in
scientific farming.
"If the rich lived simpler and less showy, the poor wouldn't envy
them as much, nor feel as bitter against society, and the money that
was saved could be pretty well invested in kinds of education that
would cure poverty and destitution by preventing them, and the
people that would be thrown out of work by the economies of the
rich might be a good deal better employed in more productive work.
It seems a pity, anyway, to keep people at practically useless labor,
when the brains and the money that keep them employed in that
way might be used in keeping them at productive labor, and it's all
the greater pity as long as there's bitter want in the world for the
necessaries of life."
This, in substance, is what he said. I apologize for the injustice of
the account, its vagueness in contrast with his clearness, its
circumlocutions in contrast with his crisp sententiousness, its
weakened renderings of his vigorous forms of native speech; but I
have tried to suggest it all, and to give the sense of its manly,
wholesome spirit.
Under the stars we sat talking until nearly midnight, and, quite
inevitably, we launched upon the subject of religion. Mr. Hill
appeared curiously apathetic, I thought, as I urged what seemed to
me vital. And when, at the end, he narrowed it all to the single
inquiry as to whether I believed in a real recognition in some future
life among those who have loved one another here, I found myself
wondering, with a feeling of disappointment, at so wide a drift from
essentials, on the part of a mind which had impressed me as so
natively clear and strong. I looked up in my surprise. Even in the
starlight I could see the tears, and from a single halting sentence, I
got the hint of a daughter dead in early childhood, and of a sorrow
too deep for human speech, and of an eager questioning of the
future that was the soul's one great desire.
"For now we see through a glass, darkly; but then face to face; now
I know in part, but then shall I know even as also I am known," was
all that I could say to him, and I went to bed pitying myself for my
shallow judgment, and my ignorance of life.

FOOTNOTE:
[A] I have presented here, together with ideas advanced by Mr. Hill,
others secured in fragmentary conversations with various farmers by
the way. These ideas seem to me to represent a body of accordant
thinking. It is fair to say that I also found among the farmers quite
another school of thought. This I shall try to present later with equal
fulness.
CHAPTER VI
IN A LOGGING CAMP

Fitz-Adams's Camp, English Centre, Lycoming


County, Pa., Tuesday, October 27, 1891.
In spite of the fast-falling rain, Fitz-Adams, the boss, ordered us up
at half-past four, as usual, this morning; but when breakfast was
over, the rain was too heavy to admit of our going to work. Some of
the woodsmen are gone back to bed, and some are mending their
clothes in the loft, and the rest of the gang are loafing in the
"lobby," smoking, and playing what they call "High, low, Jack and
the game," except Mike, a superb young Irishman, who, seated on a
bench, with his back braced against the window-sill, is reading a
worn paper copy of one of the Duchess's novels, which is the only
book that I have so far seen in the camp. Jennie, the head-cook and
housekeeper, has given me leave to write at one of the long tables
where the gang is fed.
It is a relief sometimes to get away from the men. There may be
ennui that is more soul-destroying, but I have never known any that
caused such evidently acute suffering as the form which seizes upon
workingmen of my class in hours of enforced idleness. When the
day's work is done, they take their rest as a matter of course, and
enjoy it. But a day like this, which lays them off from work, and
shuts them within doors, furnishes awful evidence of the poverty of
their lives. Most of the men here can read, but not to one of them is
reading a resource. The men at play are in blasphemous ill-temper
over the cards, and are, apparently, on the brink of blows, while
Mike is laboriously spelling his way through a page, and nervously
squirming in an effort to find a comfortable seat. And I know, from
the experience of Sundays, in what humor the men will come down
to dinner from the loft, to face an afternoon of eternal length to
them, which, in some way, must be lived through.
I note the contrast with their normal selves the more, because, as a
body of workmen, this is much the most wholesomely happy
company which I have so far fallen in with. We are about twenty in
number, a curiously assorted crew, all bred to the roughest life. Far
up in the mountains, miles from any settlement, we live the healthful
life of a lumber camp, working from starlight to starlight; breathing
the mountain air, keen with the frosty vigor of autumn, and fragrant
of pine and hemlock; eating ravenously the plain, well-cooked food
which is served to us, now in the camp and now on the mountain-
side, where we sit among the newly stripped logs; sleeping deeply at
night in closely crowded beds in the cabin-loft, where the wind
sweeps freely from end to end through the gaping chinks between
the logs, and where, on rising, we sometimes slip out of bed upon a
carpeting of snow. This is the life which these men know and which
half-unconsciously they love, breaking from it at times, in a passion
of discontent, and spending the earnings of months in a short, wild
abandon of debauch, but always coming back again, remorseful,
ashamed to meet the faces of the other men, yet reviving as by
miracle under the touch of their native life. They charm you with
their freedom of spirit, and their rude sturdiness of character, until
you find your heart warming to them with a real affection, and
feeling for them the intimate pain of personal sorrow at sight of their
cruel limitations. Away from their work, their one notion of the
necessary accompaniment to leisure is money; and possessed of
time and treasure, their first instinctive reach is after liquor and lust.
Even now as Fitz-Adams and his brother, in yellow oil-cloth coats and
wide tarpaulins, set out through the pouring rain in an open rig for
English Centre, there is a chorus of voices from the door and
windows of the cabin, shouting to them to bring back whiskey and
plenty of it. If they do, and the rain continues, only God knows what
the camp will be to-night.
* * * * * * * *
It is sixty miles, I should judge, from Pleasant Hill to Williamsport,
and it proved a two days' march. Although the distance covered
must have been about the same on both days, the difference that
they each presented in actual experience of the journey was of the
kind-of contrast which a wayfarer must expect.
Monday was a faultless autumn day. The air was quick, and the
roads were in good condition, and I was feeling fit, and was "passing
rich" with three dollars and seventy-five cents, the wages of five
days on the farm.
The region through which I walked was typical of the open country
of the Middle States. Over its rolling surface was the varied
arrangement of wood and field and pasture-land, with the farmers'
houses and barns attesting separate possession. There were
frequent brooks and narrow winding country roads; roads lined with
zigzag rail fences and loose stone walls, along which dwarfed birches
grew, and elderberry bushes, and sumach, with wild grape-vines and
clematis creeping on the walls; while in the coarse turf on the banks,
there blossomed immortelles, and purple aster, and golden-rod.
Mr. Hill had given me clear directions. At the post-office of Irish Lane
I turned sharply toward Marshall's Hollow, and passed on the way a
camp-meeting ground, where deep in the shadows of a grove stood
numbers of rough wooden huts; grouped in chance community, and
little suggesting in the weird stillness of desertion, the sounds of
revival worship, with which they are made to ring through a part of
every summer. At Harveyville I turned abruptly up the hillside in the
direction of Cambra. It was high noon when I reached that village,
and I was but a few miles beyond it, on the way to Benton, when I
stopped to get something to eat. It was the evident poverty of the
house where I stopped that interested me. I knew that there was no
hope of earning a meal at such a place, but I could pay for what I
ate, and I was sure of being less of an annoyance there than at
some well-to-do farmer's house.
The cottage was an unpainted wooden shell, and, like it, the corn-
crib and pig-pen and little barn beyond seemed tottering to a fall.
Faded leaves of a woodbine, that climbed upon the cottage, were
thick about the door-way, and lay strewn by the wind upon the bare
floor within. There was but one room on the ground floor, and a
stove and a sewing-machine and a small wooden chest were all its
furniture. I knocked at the open door. Through an opposite one,
communicating with a lean-to, a woman appeared. She was large
and muscular, but in her face was the sickly pallor of ill-nourishment,
and her hair was dishevelled, and the loose, ragged dress which she
wore was covered with dark, greasy stains.
I asked for bread and milk; she explained that the family had just
finished dinner, but that she could give me something, if I would
wait, and she invited me to a seat on the chest.
I drew from my pack an unfinished newspaper, and as I read I could
feel innumerable eyes upon me. Through the cracks in the door, and
the ragged breaks in the plaster, came the inquisitive gaze of
children's eyes, and I could hear their eager whispers as a swarm of
children crowded one another for possession of the best peep-holes.
Their mother asked me in, and set before me, on a table littered
with remnants of dinner, a pitcher of fresh milk and some huge slices
of coarse bread, a large yellow bowl, and a pewter tablespoon. The
children stared at me as I ate, and I tried to form an accurate
estimate of their number, but despaired when, after I thought that I
had distinguished eight, I found my estimate upset by sudden
apparitions of faces hitherto unrecognized. The oldest child seemed
not more than twelve, and the youngest lay asleep in a cradle near
the stove, where its mother could rock it as she worked. They all
were as ragged and dirty as the children of the slums, but they had
nothing of the vivacity of these, nor of the quick adjustment to
changing circumstances which gives to children, bred upon the
street, their first hold upon your interest.
Stolid and wide-eyed they stood about the room, intently watching
me, moving here and there for new points of view; until their
mother, who had showed no wish to talk as she washed the dishes,
now broke the silence with a sounding cuff upon the ear of a little
boy, as, with a loud command, she sent him sobbing into the back
yard to fetch her wood.
The children scattered instantly, except a little girl with flaxen hair
and grotesquely dirty face, who clung to her mother's skirts, and
seemed to hamper her immeasurably; the more so as the baby had
wakened in the noise, and had begun to cry. I grew sick with fear of
what was coming next, but the mother's mood had changed; for
catching the crying baby in her arms, she almost smothered it with
kisses, and sitting down she fondled it, and gently stroked the head
of the child beside her.
It was a veritable country slum, with nearly all the barren squalor of
a crowded tenement. You thought of life in it as some hard
necessity, from which all choice and spontaneity are gone. And so in
great part it must have been, and the wonder was the stronger at
sight of the instinct of mother love, springing like a living fountain in
an arid plain.
The village of Benton wore a preoccupied air when I entered it. I
soon found the cause in an auction sale of horses in the stable-yard
of the tavern. The horses huddled close, as if for common
protection, in an angle formed by the buildings. They were watched
by a mounted rider, whose duty it was to prevent any from breaking
loose. A small crowd of farmers and village men, all of them coatless
and in their working clothes, formed a semicircle about the animals.
The surrounding doors and windows were full of women's faces,
alive with interest in the progress of events; and children perched
upon the fences, or dodged in and out among the groups of men. A
fat and ruddy auctioneer walked back and forth excitedly before the
crowd, loudly repeating a call for bids; or having caught one,
running it rapidly through changes of inflection and intonation, until
a fresh bid started him anew on his flight of varying tones, which
ended at last in the dying cadences of "Going! going! gone!"
Presently I found a man who was so far unoccupied by the sale as to
have leisure to direct me on my way. Taking his advice I started for
Union Church and Unityville. In the outskirts of Benton, as I left the
village, an urchin sat upon the door-step of a cottage, idly beating
about him with a stick, consoling himself apparently as best he could
for not having been allowed to go to the sale. The sight of a tramp
with a pack upon his back diverted him; and far as the sound could
carry there came following me, as I climbed the hill beyond the
village, his shouts of "Git there, Eli!"
The contrast with Monday's march appeared at once on Tuesday
morning. The clouds which were threatening when I made an early
start grew more threatening while I walked on, and they broke in
torrents of rain as I entered Lairdsville, with Williamsport still twenty-
four miles away.
A tavern gave me shelter, but presently the rain slackened and I
made up my mind to push on to Williamsport in spite of the storm,
for my letters were there; and once on the road with your mail
definitely in view, you grow highly impatient of delays.
An hour's rain had worked great changes in the roads. Hard and
dusty when I set out in the early morning, they were quagmires now
and were running with muddy streams. The rain pelted my face and
dripped through my ragged hat, and trickled down my back and
washed into my boots. I was a dangerous-looking vagrant when I
reached Hughesville at noon. I walked rapidly through the village
street in some fear of arrest, but the storm had passed, and I soon
learned the road to Williamsport by way of Hall's Landing.
Splashing wearily along the heavy roads with that awful load chafing
my back, I knew vaguely that I was passing through an exceedingly
rich and beautiful farming region, but my interest was all in the
surest footing to be found, and it was with glad relief that late in the
afternoon I stepped upon the solid pavements of the town.
I had been told, on the road, of a laborer's cottage in Church Street
where cheap board and lodging could be had. From the post-office I
readily found my way to this cottage, and was soon propped up in
bed reading my letters, while the laborer's wife hung up my clothes
to dry in the kitchen and put my boots under the stove.
In the morning all the brilliance of the clear, cold autumn had
returned. It was such a day as seems to emerge renewed with fresh
and ample vigor from the cleansing of a storm.
The streets presented a really singular picture. The town itself is the
conventional American, provincial, manufacturing centre, with its
business portion built up in "brick blocks," which are innocent of any
attraction but utility. From this quarter it shades gradually, in one
direction, into the workshops and cottages of the region of the
proletariat, and in another into the wide, well-shaded avenues where
are the somewhat ostentatious homes and churches of the well-to-
do.
Long lines of booths now crowded the curves about the central
public square and reached far down the communicating streets. In
these booths the farming people of the surrounding country sold
their fruits and garden vegetables, and butter and eggs and poultry;
and white-aproned butchers spread their meats in tempting array. It
was an Oriental bazaar in all but color and the highly pitched jabber
of Eastern bargaining. But still more perfect as a reproduction of
foreign scenes were the groups of women who, with colored shawls
tied round their heads and falling about their shoulders, sat on the
steps of public buildings with baskets of provisions about them and
talked among themselves, and came to terms with customers in
their oddly mixed vernacular.
It recalled at once the Platz of a German city thronged by peasant
women on market days, only here, too, was a lack of color. The
women were unmistakably Teutonic. All had the generous contour of
countenance which approaches to a family likeness in a whole race
of peasantry, but the red of the old country complexion had faded to
our prevailing pallor.
In Spite of a large foreign element, or in virtue of it, I do not know
which, the town itself is aggressively American. The fact that some
hundreds of million feet of lumber come each year from its mills
gives to it great importance as a lumber centre. And the good
fortune of this form of industry the city certainly shows in its
freedom from the usual begriming effects of manufacture on a large
scale.
In one of the morning papers of the town I found the spirit of the
place expressed in a reported speech of a local celebrity, an ex-
member of Congress. The chief burden of it was the note of
congratulation to the people of the town on their progress and
prosperity, as indicated in their electric lights and rapid transit
system, and in their growing industries and increasing numbers,
which, he declared, "had passed the stopping-point."
But I must hurry on. Early on Friday afternoon, October 9th, I set
out from Williamsport, with Oil City as my next objective point. I had
no money, but this did not disturb me, for I was entering the open
country and felt sure of finding work. The road lay along the fertile
river bottom and then began to climb the range of hills which walls
in the valley on the north. The lasting impression here is of a region
of most uncommon natural wealth. Many square miles of farms
come into the range of vision; the soil looks like a deep, rich loam.
And a like impression comes to you from the opposite bank of the
river, where the land lies flat to the foot of the southern range of
hills.
From such a vantage ground you see at a glance how the river, shut
in by these barriers, could have risen to so great a height in the
flood of 1889 and have worked such appalling disaster.
There are constant references to "the flood" among the inhabitants
of the valley, and it plainly holds for them the place of a
chronological mark not unlike that held farther East by the "blizzard"
of 1888, only it sounds not a little odd at first to hear common
reference to antediluvian events.
Presently I came to a road which forked at Linden to the right, and
made in the direction of a gap in the hills. Its general course seemed
westward, and so I followed it. An hour or two later it had led me
into a forest, where the sunlight was fast fading. I was intent on the
question of finding work before nightfall, when I heard the rumble of
wheels behind me, and a voice singing a German song.
I looked up as the wagon came alongside. The horses were walking
slowly up the hill, and a young man lounged at leisure on the seat.
His legs were crossed, and the reins lay loosely in one hand. A light,
wide-brimmed felt hat was pushed back on his crown, and from
under the rim the yellow hair rested on his forehead. He was singing
from sheer lightness of heart; and young and strong and handsome
as he was, he made you think of Alvary in his part of Siegfried.
"Have a ride?" he called to me, and there was no trace of foreign
accent in his speech.
"Thank you," I said; and in another moment my pack was in the
bottom of the wagon and I on the seat beside the driver.
"Where are you going?"
"I'm looking for a job."
"You want work on a farm?"
"Yes, that or any other kind of work that I can get."
"Well, there ain't much doing on the farms now. I don't know
nobody that's looking for a hired man. There's Abe Potter, I heard
him say as how he wanted to hire a man to work for him all winter;
but Miss' Potter, she told my wife last night that he'd got Jim Hale's
boy, Al, to live out to him. Say, did you ever work in the woods?"
"No."
"Well, there's plenty of work in the woods. It's a rough life, but it
ain't so bad when you're used to it. I worked in the woods before I
was married. I could go out to the woods now, and earn two dollars
a day and my keep; but my wife wouldn't let me. And it's a pretty
rough life, only I come to like it. But I've got my farm now, and my
wife and children; and her old folks lives with us, and I've got to stay
to home, and take care of things. Say, where are you going to-
night?"
"I don't know. I'll try to find some place to stay where I can help
with the work to pay for my keep; and then to-morrow I'll go to the
woods, and try to get a job."
"I tell you, stranger, you stay at my house to-night, and in the
morning you can go to English Centre. I guess you'll get a job on
one of the camps."
My thanks could have expressed but little of the gratitude I felt. I
shared his light-hearted mood at once, and was a very interested
and attentive listener to the narrative of his early life; his
disagreements with his father, and how he had inherited the farm
from him burdened with debt, but had almost paid the mortgages,
and had his eye now upon a neighbor's farm with a view to
purchasing that.
He was singing again as we drove up the lane toward his home, and
was plainly expectant. The cause was clear when two children, a girl
and boy of about six and four, came running toward the wagon, with
excited cries of welcome. They drew up sharply at sight of a
stranger, and their father loudly greeted them with a medley of
affectionate diminutives in English and German, until they lost their
fear, and began to talk rapidly with him in the quaintest German,
which sounded as though it might be one with the strange dialects
which you see in Fliegende Blätter.
I helped to unhitch the horses, and then asked whether there was
more that I could do. There were apples to be picked up from under
the trees in the orchard, and I worked at this task until dark, when
there came the call to supper.
After that meal the children were put to bed, and the rest of us
gathered in the kitchen, where a large open fire burned, and an oil-
lamp lent its light. An "apple-butter making" was to be the feature of
the next day's work, and we spent the evening in getting ready for
it.
We sat in a semicircle in front of the fire, first the farmer's wife, and
then the patriarchal grandfather, who was almost deaf, and was
known to all the household by the not euphonious name of "Gross-
pap," and next to him the grandmother, and last the guest. The
farmer himself sat at a table near us, briskly working an apple-
peeler, while the rest of us removed the cores, and cut the apples
into small sections.
It was a very comfortable place which I seemed to have found in the
household. I was taken in with natural hospitality, and the family life
moved on unhampered by my presence, while I, a welcome guest,
could sit and watch it at my ease.
The old man had every excuse for silence, and he and his wife spoke
rarely, and always in their native tongue, but they evidently
understood English perfectly. The farmer and his wife spoke English
to each other, and spoke it as though born to its use, but they used
that quaint German dialect in talking with the old people and the
children.
The wife was a plain woman, inclined to fretfulness, I thought, and
she had a certain air with her husband, which is not uncommon to
plain women whose husbands are distinctly handsome. She had little
to say, but she listened attentively to the farmer's talk.
He was entertainment for us all. Good-looking, high-spirited, manly
fellow—in perfect unconsciousness of self, he talked on with the
genial freedom of a true man of the world.
His trip to Williamsport was a fruitful theme, and no least event of
the journey was without its interest. He told us of the neighbors
whom he met on the road, and all of his conjectures regarding their
probable errands. He had taken a load of vegetables to town, and
now recounted every sale and purchase, for he had been charged
with many commissions. One was the purchase of braid for his wife's
new dress. He was full of good-humor at each fresh departure in his
tale; but, for some reason, the story of this last commission pleased
him most. With high regard for circumstantial detail, he told it to us
at least five times, and ended every narrative with a beaming smile,
and the unvarying remark that "I'd have got it wider if I'd only
known," to which his wife replied each time with unfaltering
insistence upon the last word: "But you might have known."
In the morning he was as cheerful as on the night before, and he
put me in high spirits as, with many good wishes for my success, he
told me again how sure he was that I could find work in the woods.
At Salladasburg I stopped for further directions about the way to
English Centre; and the tavern-keeper, at whose door I inquired,
confirmed me strongly in my expectation of ready employment.
An old plank road lead me through a mountain-pass, and along the
course of a stream, far into the interior. The earlier miles of the
march were among mountains that had long been stripped of all
valuable timber, and that now stood ragged and uncouth in their
new growths, and in the blackened remnants of forest fires.
Here there were a few scattered farms; stony and of thin soil,
where, for fences, uptorn stumps of trees had been placed side by
side, with their twisted roots so interwoven as to form an
impenetrable barrier.
A caravan of gypsies met and passed me; but except for these, the
road was almost deserted, and seemed to be leading into yet
lonelier regions.
Mountains now succeeded, on which the forests were untouched,
and which, in autumn colors, were like huge mounds of foliage
plant, so richly did the gorgeous hues of the maple-trees and
chestnuts and beeches blend with the dark greens of hemlock and
pine.
At a little after noon I came quite suddenly upon an iron bridge that
crossed the wide bed of a mountain-stream, which was little more
than a brook now, but gave evidence of rising, at times, to the
volume and strength of a torrent. A large tavern stood near the
bridge, and beyond it, to the right, was a huge tannery which plainly
provided the chief industry of the place. The village street was lined
with rows of wooden cottages, each an unpainted duplicate of its
neighbor, and all eloquent, I thought, of the monotony of the life
which they held.
I went at once to the post-office, and there learned that my journey
was by no means at an end; for the lumber camps were yet some
miles farther in the mountains. The camp of "Wolf Bun" was
mentioned as an important one, where work was plenty, and I set
out at once for that.
I was tired and not a little hungry; for this mountain-air acts always
as a whet upon your appetite, and I had eaten nothing since the
early morning, and had already walked some fifteen miles. But the
camp road, although rough, was easy to follow, and I found much
satisfaction in dramatizing my approach to some short-handed
employer, who would take me on at once. I dwelt longingly on
supper and a restful night and Sunday in the camp, and thought
hopefully of the work to be begun on Monday morning.
And then there was a peculiar interest in meeting lumbermen on the
way. Some were teamsters, who sat high in air on top of immense
loads of bark, which they were carting to the tannery. Many of these
wore wide sombreros, and jackets made of blanket stuff in gay
plaids. Others were on foot, small companies of four and five
together, walking to the village, for it was Saturday afternoon.
I was prepared for some degree of roughness in a lumber camp, and
in the woodsmen themselves, but there was something in the
appearance of these men whom I met that hinted at my not having
guessed all the truth. I judged of roughness by what I knew of the
gang at West Point, and in the sewer ditch at the Asylum, but here
was something of a widely different kind from the hardness of
broken-spirited, time-serving laborers. Instinctively you knew these
men for men; and I respectfully kept silence, and looked to them for
greeting, and got none.
When you, a total stranger, try to meet the questioning gaze of five
strong men at once, all of them sturdy and lean, and deeply lined in
face and keen of eye, there is bred in you a vague unease, not of
fear, but an answering to that wonder as to what you are and what
you are doing there. I was conscious then only of the disturbing of
my earlier confidence in entering the woods. I could not analyze the
look which met me, but now I know it for meaning, reft of its
strongest words, "Who in —— are you? Gospel sharks we know, and
camp cooks, and honest Jew pedlers who get our wages from us for
their brass-gold watches and glass jewels, but such a ——! ——!
——! ——! ——! ——! as you, we never saw before."
It was about the middle of the afternoon when a turn in the
mountain-road brought to view a cluster of log-cabins, which I knew
to be the camp of Wolf Run. The cabins were splendid buildings of
their kind. The logs were clean and fresh and were securely fitted,
while the chinks were well plastered with mud, and the roofs tightly
shingled, and the gables closely boarded-up.
No one was in sight from where I stood; but there issued, from one
of the smaller cabins, the ring of a blacksmith's hammer, and I found
a group of men about the cabin-door.
The camp stood in a little clearing on the mountain; and in contrast
with the shadowy gloom in the forest around it, the sunlight flooded
this open rift with concentrated light. The chestnut-trees on the
edge of the wood shone like burnished gold, and the maple leaves,
still green, nearest to the trees, and but lightly touched with red
along the boughs, deepened gradually, until, in the full sunlight, they
blazed in crimson splendor. It was still with the stillness of autumn,
and the sound of the blacksmith's stroke and the answering ring of
the anvil were echoed far into the forest, where you could hear,
fretting down its stony bed, a mountain-stream, which, in the speech
of the lumbermen, is called a "run."
I had slipped the pack from my back, and carrying it in my hand I
went up to a group of men. One of them stood leaning against the
door-post. He was very tall and straight, and under his wide
sombrero, the upper forehead was white and smooth as a girl's. The
brows were arched above dark-brown eyes, and his nose was
straight and sharply chiselled; the cheeks were lean and ruddy
brown; and under a light mustache was a clean-cut, shapely mouth
that answered in strength to a well-rounded, slightly protruding chin.
His hands were thrust into the side-pockets of a bright blanket
jacket, and his dark trousers were tucked into a pair of top-boots,
that were laced over the insteps and up the outer sides of the legs.
All the men were eying me with that disturbing look; even the
blacksmith had quit his work and joined them. In the questioning
silence I summoned what courage I had, and walked up to young
Achilles at the cabin-door, and thus addressed him:
"Is this the camp of Wolf Run?"
"Yes."
"Is Mr. Benton here?" [Benton is my version of the superintendent's
name.]
"No, he's in English Centre."
"Is the camp boss here?" [That was a rash plunge on my part, but it
was successful.]
"Yes, that's him," and Achilles' head nodded slightly in the direction
of the largest cabin. From the door nearest us there stepped an
elderly man of massive frame, bent slightly forward, and with arms
so long that the hands seemed to reach to his knees. He was
dressed in an old suit of dark material—a long-tailed coat that fitted
very loosely, and baggy trousers—and a soiled linen shirt and collar,
and a black ribbon necktie. His face was very set and stern, not with
an expression of unkindness, simply the face of a man to whom life
is a serious matter, and who means business all the time.
He was evidently absorbed, and, carrying an iron bar, he was about
to enter the forge with no least notice of any of us, when I
interrupted him.
"I beg your pardon, sir, I understand that you are the boss."
He stood still, and looked down upon me out of keen black eyes
from under shaggy brows that bristled with coarse hairs; and in the
deepening silence, I wondered what I should say next.
"I'm looking for a job, and I heard in English Centre that men were
wanted here."
"Have you ever worked in the woods?"
"No."
"Then you'll not get work in the woods this side of hell."
He moved on at once, and the blacksmith followed him into the
shop. I was left standing in the midst of the other men, who had
listened intently, and were now soberly enjoying the quality of that
bon mot, and were eyeing me in leisurely curiosity.
Again I appealed to Achilles:
"Is there another camp near here?"
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!

ebookfinal.com

You might also like