100% found this document useful (4 votes)
31 views52 pages

JavaScript and Node FUNdamentals 1st Edition by Azat Mardan ISBN B00HDYHKN6 Instant Download

The document provides information about the book 'JavaScript and Node FUNdamentals' by Azat Mardan, including its publication details and a link for purchase. It also lists several other recommended JavaScript and Node.js related books, with links for downloading. The contents outline various fundamental topics in JavaScript, CoffeeScript, Backbone.js, Node.js, and Express.js.

Uploaded by

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

JavaScript and Node FUNdamentals 1st Edition by Azat Mardan ISBN B00HDYHKN6 Instant Download

The document provides information about the book 'JavaScript and Node FUNdamentals' by Azat Mardan, including its publication details and a link for purchase. It also lists several other recommended JavaScript and Node.js related books, with links for downloading. The contents outline various fundamental topics in JavaScript, CoffeeScript, Backbone.js, Node.js, and Express.js.

Uploaded by

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

JavaScript and Node FUNdamentals 1st Edition by

Azat Mardan ISBN B00HDYHKN6 pdf download

https://ebookball.com/product/javascript-and-node-
fundamentals-1st-edition-by-azat-mardan-isbn-b00hdyhkn6-13414/

Explore and download more ebooks or textbooks


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

JavaScript Data Structures and Algorithms An Introduction


to Understanding and Implementing Core Data Structure and
Algorithm Fundamentals 1st Editon by Sammie Bae ISBN
1484239873 9781484239872
https://ebookball.com/product/javascript-data-structures-and-
algorithms-an-introduction-to-understanding-and-implementing-core-
data-structure-and-algorithm-fundamentals-1st-editon-by-sammie-bae-
isbn-1484239873-9781484239872-15798/

Node Up and Running 1st Edition by Tom Hughes Croucher,


Mike Wilson ISBN 9781449336950 1449336957

https://ebookball.com/product/node-up-and-running-1st-edition-by-tom-
hughes-croucher-mike-wilson-isbn-9781449336950-1449336957-20224/

jQuery and JavaScript Phrasebook 1st Edition by Brad


Dayley ISBN 0133410854 9780133410853

https://ebookball.com/product/jquery-and-javascript-phrasebook-1st-
edition-by-brad-dayley-isbn-0133410854-9780133410853-12804/

JavaScript and Ajax for Dummies 1st Edition by Andy Harris


ISBN 0470417994 9780470417997

https://ebookball.com/product/javascript-and-ajax-for-dummies-1st-
edition-by-andy-harris-isbn-0470417994-9780470417997-13728/
JavaScript Mini FAQ 1st Edition by Danny Goodman ISBN

https://ebookball.com/product/javascript-mini-faq-1st-edition-by-
danny-goodman-isbn-11420/

Beginning HTML XHTML CSS and JavaScript 1st edition by Jon


Duckett ISBN 8126525515 9788126525515

https://ebookball.com/product/beginning-html-xhtml-css-and-
javascript-1st-edition-by-jon-duckett-
isbn-8126525515-9788126525515-10940/

Web Animation using JavaScript Develop and Design 1st


Edition by Julian Shapiro ISBN 0134096703 9780134096704

https://ebookball.com/product/web-animation-using-javascript-develop-
and-design-1st-edition-by-julian-shapiro-
isbn-0134096703-9780134096704-16170/

JavaScript and jQuery Interactive Front End Web


Development 1st Edition by Jon Duckett ISBN 1118531647
9781118531648
https://ebookball.com/product/javascript-and-jquery-interactive-front-
end-web-development-1st-edition-by-jon-duckett-
isbn-1118531647-9781118531648-16160/

Advanced JavaScript 2nd Edition by Chuck Easttom ISBN


155622852X 9781556228520

https://ebookball.com/product/advanced-javascript-2nd-edition-by-
chuck-easttom-isbn-155622852x-9781556228520-13370/
JavaScript and Node FUNdamentals
A Collection of Essential Basics

Azat Mardan
This book is for sale at http://leanpub.com/jsfun

This version was published on 2014-05-29

This is a Leanpub book. Leanpub empowers authors and publishers with the Lean Publishing
process. Lean Publishing is the act of publishing an in-progress ebook using lightweight tools and
many iterations to get reader feedback, pivot until you have the right book and build traction once
you do.

©2013 - 2014 Azat Mardan


Tweet This Book!
Please help Azat Mardan by spreading the word about this book on Twitter!
The suggested hashtag for this book is #JavaScriptFUNdamentals.
Find out what other people are saying about the book by clicking on this link to search for this
hashtag on Twitter:
https://twitter.com/search?q=#JavaScriptFUNdamentals
Also By Azat Mardan
Rapid Prototyping with JS
Oh My JS
Express.js Guide
Contents

1 JavaScript FUNdamentals: The Powerful and Misunderstood Language of The Web . 2


1.1 Expressiveness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Loose Typing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Object Literal Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.5 Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.6 Prototypal Nature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.7 Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.8 No Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.9 Immediately-Invoked Function Expressions (IIFEs) . . . . . . . . . . . . . . . . . . . 8
1.10 Keyword “this” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.11 Pitfalls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.12 Further Learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2 CoffeeScript FUNdamentals: The Better JavaScript . . . . . . . . . . . . . . . . . . . . 11


2.1 Semicolons, Whitespace and Parentheses . . . . . . . . . . . . . . . . . . . . . . . . 11
2.2 Vars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.3 Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.4 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.5 Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.6 Arrays and Slicing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.7 Splats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.8 Comprehensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.9 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

3 Backbone.js FUNdamentals: The Cornerstone of JavaScript MV* Frameworks . . . . . 25


3.1 Typical Backbone.js App Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.2 Setting up Backbone.js App from Scratch . . . . . . . . . . . . . . . . . . . . . . . . 26
3.3 Dependencies for the Backbone.js Project . . . . . . . . . . . . . . . . . . . . . . . . 27
3.4 Working with Backbone.js Collections . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.5 Event Binding with Backbone.js and jQuery . . . . . . . . . . . . . . . . . . . . . . 39
3.6 Backbone.js Views and Subviews with Underscore.js . . . . . . . . . . . . . . . . . . 44
3.7 Super Simple Backbone Starter Kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
3.8 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
CONTENTS

4 Node.js FUNdamentals: JavaScript on The Server . . . . . . . . . . . . . . . . . . . . . 55


4.1 Read-Eval-Print Loop (a.k.a. Console) in Node.js . . . . . . . . . . . . . . . . . . . . 57
4.2 Launching Node.js Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
4.3 Node.js Process Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
4.4 Accessing Global Scope in Node.js . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
4.5 Exporting and Importing Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
4.6 Buffer is a Node.js Super Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
4.7 __dirname vs. process.cwd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
4.8 Handy Utilities in Node.js . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
4.9 Reading and Writing from/to The File System in Node.js . . . . . . . . . . . . . . . . 62
4.10 Streaming Data in Node.js . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
4.11 Installing Node.js Modules with NPM . . . . . . . . . . . . . . . . . . . . . . . . . . 63
4.12 Hello World Server with HTTP Node.js Module . . . . . . . . . . . . . . . . . . . . 63
4.13 Debugging Node.js Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
4.14 Taming Callbacks in Node.js . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
4.15 Introduction to Node.js with Ryan Dahl . . . . . . . . . . . . . . . . . . . . . . . . . 65
4.16 Moving Forward with Express.js . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

5 Express.js FUNdamentals: The Most Popular Node.js Framework . . . . . . . . . . . . 67


5.1 Express.js Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
5.2 Express.js Command-Line Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
5.3 Routes in Express.js . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
5.4 Middleware as The Backbone of Express.js . . . . . . . . . . . . . . . . . . . . . . . 69
5.5 Configuration of an Express.js App . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
5.6 Jade is Haml for Express.js/Node.js . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
5.7 Conclusion About The Express.js Framework . . . . . . . . . . . . . . . . . . . . . . 70
5.8 Update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

6 About the Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71


6.1 Errata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
6.2 Contact Us . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
CONTENTS 1

If it’s not fun, it’s not JavaScript.


1 JavaScript FUNdamentals: The
Powerful and Misunderstood
Language of The Web
1.1 Expressiveness
Programming languages like BASIC, Python, C has boring machine-like nature which requires
developers to write extra code that’s not directly related to the solution itself. Think about line
numbers in BASIC or interfaces, classes and patterns in Java.
On the other hand JavaScript inherits the best traits of pure mathematics, LISP, C# which lead to a
great deal of expressiveness¹ (and fun!).
More about Expressive Power in this post: What does “expressive” mean when referring to
programming languages?²
The quintessential Hello World example in Java (remember, Java is to JavaScript is what ham to a
hamster):

1 public class HelloWorld {


2 public static void main(String[] args) {
3 System.out.println("Hello World");
4 }
5 }

The same example in JavaScript:

1 console.log('Hello World')

or from within an HTML page:

¹http://en.wikipedia.org/wiki/Expressive_power
²http://stackoverflow.com/questions/638881/what-does-expressive-mean-when-referring-to-programming-languages
JavaScript FUNdamentals: The Powerful and Misunderstood Language of The Web 3

1 <script>
2 document.write('Hello World')
3 </script>

JavaScript allows programmers to focus on the solution/problem rather that to jump through hoops
and API docs.

1.2 Loose Typing


Automatic type casting works well most of the times. It a great feature that saves a lot of time and
mental energy! There’re only a few primitives types:

1. String
2. Number (both integer and real)
3. Boolean
4. Undefined
5. Null

Everything else is an object, i.e., mutable keyed collections. Read Stackoverflow on What does
immutable mean?³
Also, in JavaScript there are String, Number and Boolean objects which contain helpers for the
primitives:

1 'a' === new String('a') //false

but

1 'a' === new String('a').toString() //true

or

1 'a' == new String('a') //true

By the way, == performs automatic type casting while === not.

1.3 Object Literal Notation


Object notation is super readable and compact:
³http://stackoverflow.com/questions/3200211/what-does-immutable-mean
JavaScript FUNdamentals: The Powerful and Misunderstood Language of The Web 4

1 var obj = {
2 color: "green",
3 type: "suv",
4 owner: {
5 ...
6 }
7 }

Remember that functions are objects?

1 var obj = function () {


2 this.color: "green",
3 this.type: "suv",
4 this.owner: {
5 ...
6 }
7 }

1.4 Functions
Functions are first-class citizens, and we treat them as variables, because they are objects! Yes,
functions can even have properties/attributes.

1.4.1 Create a Function


1 var f = function f () {
2 console.log('Hi');
3 return true;
4 }

or

1 function f () {
2 console.log('Hi');
3 return true;
4 }

Function with a property (remember functions are just object that can be invoked, i.e. initialized):
JavaScript FUNdamentals: The Powerful and Misunderstood Language of The Web 5

1 var f = function () {console.log('Boo');}


2 f.boo = 1;
3 f(); //outputs Boo
4 console.log(f.boo); //outputs 1

Note: the return keyword is optional. In case its omitted the function will return undefined upon
invocation.

1.4.2 Pass Functions as Params


1 var convertNum = function (num) {
2 return num + 10;
3 }
4
5 var processNum = function (num, fn) {
6 return fn(num);
7 }
8
9 processNum(10, convertNum);

1.4.3 Invocation vs. Expression


Function definition:

1 function f () {};

Invocation:

1 f();

Expression (because it resolve to some value which could be a number, a string, an object or a
boolean):

1 function f() {return false;}


2 f();

Statement:
JavaScript FUNdamentals: The Powerful and Misunderstood Language of The Web 6

1 function f(a) {console.log(a);}

1.5 Arrays
Arrays are also objects which have some special methods inherited from Array.prototype⁴ global
object. Nevertheless, JavaScript Arrays are not real arrays. Instead, they are objects with unique
integer (usually 0-based) keys.

1 var arr = [];


2 var arr2 = [1, "Hi", {a:2}, function () {console.log('boo');}];
3 var arr3 = new Array();
4 var arr4 = new Array(1,"Hi", {a:2}, function () {console.log('boo');});

1.6 Prototypal Nature


There are no classes in JavaScript because objects inherit directly from other objects which is called
prototypal inheritance: There are a few types of inheritance patterns in JS:

• Classical
• Pseudo-classical
• Functional

Example of the functional inheritance pattern:

1 var user = function (ops) {


2 return { firstName: ops.name || 'John'
3 , lastName: ops.name || 'Doe'
4 , email: ops.email || '[email protected]'
5 , name: function() { return this.firstName + this.lastName}
6 }
7 }
8
9 var agency = function(ops) {
10 ops = ops || {}
11 var agency = user(ops)
12 agency.customers = ops.customers || 0
13 agency.isAgency = true
14 return agency
15 }
⁴https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/prototype#Properties
JavaScript FUNdamentals: The Powerful and Misunderstood Language of The Web 7

1.7 Conventions
Most of these conventions (with semi-colons being an exception) are stylistic, and highly preferential
and don’t impact the execution.

1.7.1 Semi-Colons
Optional semi-colons, except for two cases:

1. In for loop construction: for (var i=0; i++; i<n)


2. When a new line starts with parentheses, e.g., Immediately-Invoked Function Expression
(IIFE): ;(function(){...}())

1.7.2 camelCase
cameCase, except for class names which are CapitalCamelCase, e.g.,

1 var MainView = Backbone.View.extend({...})


2 var mainView = new MainView()

1.7.3 Naming
_,$ are perfectly legitimate characters for the literals (jQuery and Underscore libraries use them a
lot).
Private methods and attributes start with _ (does nothing by itself!).

1.7.4 Commas
Comma-first approach

1 var obj = { firstName: "John"


2 , lastName: "Smith"
3 , email: "[email protected]"
4 }

1.7.5 Indentation
Usually it’s either tab, 4 or 2 space indentation with their supporters’ camps being almost religiously
split between the options.
JavaScript FUNdamentals: The Powerful and Misunderstood Language of The Web 8

1.7.6 White spaces


Usually, there is a space before and after =, +, { and } symbols. There is no space on invocation, e.g.,
arr.push(1);, but there’s a space when we define an anonymous function: function () {}.

1.8 No Modules
At least until ES6⁵, everything is in the global scope, a.k.a. window and included via <script> tags.
However, there are external libraries that allow for workarounds:

• CommonJS⁶
• AMD and Require.js⁷

Node.js uses CommonJS-like syntax and has build-in support for modules.
To hide your code from global scope, make private attributes/methods use closures and immediately-
invoked function expressions⁸ (or IIFEs).

1.9 Immediately-Invoked Function Expressions (IIFEs)


1 (function () {
2 window.yourModule = {
3 ...
4 };
5 }());

This snippet show an example of a object with private attribute and method:

⁵https://wiki.mozilla.org/ES6_plans
⁶http://www.commonjs.org/
⁷http://requirejs.org/
⁸http://en.wikipedia.org/wiki/Immediately-invoked_function_expression
JavaScript FUNdamentals: The Powerful and Misunderstood Language of The Web 9

1 (function () {
2 window.boo = function() {
3 var _a = 1;
4 var inc = function () {
5 _a++;
6 console.log(_a);
7 return _a;
8 };
9 return {
10 increment: inc
11 };
12 }
13 }());
14 var b = window.boo();
15 b.increment();

Now try this:

1 b.increment();
2 b.increment();
3 b.increment();

1.10 Keyword “this”


Mutates/changes a lot (especially in jQuery)! Rule of thumb is to re-assign to a locally scoped variable
before attempting to use this inside of a closure:

1 var app = this


2 $('a').click(function(e){
3 console.log(this) //most likely the event or the target anchor element
4 console.log(app) //that's what we want!
5 app.processData(e)
6 })

When in doubt: console.log!

1.11 Pitfalls
JS is the only language that programmers think they shouldn’t learn. Things like === vs. ==, global
scope leakage, DOM, etc. might lead to problems down the road. This is why it’s important to
understand the language or use something like CoffeeScript, that take a way most of the issues.
Random documents with unrelated
content Scribd suggests to you:
The Project Gutenberg eBook of The Trinity
Archive, Vol. I, No. 1
This ebook is for the use of anyone anywhere in the United
States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it away
or re-use it under the terms of the Project Gutenberg License
included with this ebook or online at www.gutenberg.org. If you
are not located in the United States, you will have to check the
laws of the country where you are located before using this
eBook.

Title: The Trinity Archive, Vol. I, No. 1

Author: N.C.) Trinity College (Randolph County

Release date: September 24, 2019 [eBook #60351]


Most recently updated: October 17, 2024

Language: English

Credits: Produced by Richard Tonsing, hekula03, and the Online


Distributed Proofreading Team at http://www.pgdp.net
(This
book was produced from images made available by the
HathiTrust Digital Library.)

*** START OF THE PROJECT GUTENBERG EBOOK THE TRINITY


ARCHIVE, VOL. I, NO. 1 ***
Vol. I. No. 1.
TRINITY ARCHIVE.
PUBLISHED BY THE LITERARY SOCIETIES.

Monthly. TRINITY COLLEGE, N. C. Price, 15 cts.


CONTENTS.

Explanatory Page 3

Editorial Notes: Prohibition in Trinity 4

Examinations and Degrees 4

More Room 4

The Sugar Planters 4–5

Reed & Kellogg 5

English Orthography 5

Editorials: Endow the Colleges 6

A College Library 6

The Chicago Anarchists 6–7

England’s Irish Policy 7

Lynch Law 7–8

A Temperance Party 8

Uncharitableness in Politics 8–9

Reviews: Genung’s Elements of Rhetoric 9–10


Joynes-Messner German Grammar 10

King Solomon’s Mines—Haggard 10–11

Labor Movement in America—Ely 11–12

Colleges 12

Exchanges 13–14

Locals 15–16

Alumni 17–18
MANAGERS’ NOTICES.

Correspondents will please send all matter intended for


publication to Prof. J. L. Armstrong, Trinity College, N. C.
Terms of Subscription.
One dollar, per scholastic year (nine issues), if paid in advance; if
not paid in advance, one dollar and twenty cents.
To any one who will send us a Club of Five cash yearly subscribers,
we will give a year’s subscription, free.
Remittances should be made by postal note, postal order, or
registered letter, and made payable to “Business Managers of the
Trinity Archive.”
Terms of Advertising.
1 column, per issue, $3.00; per scholastic year, $20.00
½ 〃〃 1.75; 〃 12.00
⅓ 〃〃 1.25; 〃 9.00
1 inch, 〃 .75; 〃 5.00

All business communications should be forwarded to


NICHOLSON & JONES,
Business Managers,
Trinity College, N. C.

Entered as second-class matter in Post Office at Trinity College, N.


C.

F. FISHBLATE,
THE

Leading Clothier
OF NORTH CAROLINA.

WE KEEP ALL THE LATEST STYLES IN

Clothing, Hats,
—AND—

Furnishing Goods.
Our line of Fine Dress Suits and Overcoats is the largest and finest
ever seen. In our Hat and Furnishing Goods Department you can
find anything you could ask for. All we ask is a call to convince you
that our stock is the largest, finest and cheapest you have ever seen.
Respectfully,

F. FISHBLATE,
GREENSBORO, N. C.

C. M. VANSTORY, Manager.

P. S. Suits made to order from samples a specialty. Orders by mail


will receive prompt attention.

A FREE TICKET

TO

Farrior & Crabtree’s


Boot and Shoe Store,
South Elm St., GREENSBORO, N. C.

Sole Agents for

Zeigler Bros., Jas. Means’ $3,

And Wm. Dorsch & Son’s

FINE GOODS.

C. B. Hayworth,
The People’s Liveryman.
HIGH POINT, N. C.
Good Stock and conveyances. Prices reasonable. Patronage of
Trinity Students solicited.

JOHN H. TATE,
Wholesale and Retail

Grocer and Confectioner.

Fancy Groceries, Fine Confections,

TOBACCO AND CIGARS SPECIALTIES.

FINEST DOMESTIC AND TROPICAL FRUITS


always on hand in season.

Headquarters for High Grade


PATENT FLOUR,
SUGAR, COFFEE,
TEA, SPICES,
FLAVORING EXTRACTS,
CANNED GOODS,

Wood and Willow Ware, Tin Ware,

BROOMS, &c.

New Corner Store, next door to Post Office,

HIGH POINT, N. C.
Richmond Straight Cut No. 1 Cigarettes.
Cigarette smokers who are willing to pay a little more
than the price charged for the ordinary trade cigarettes, will
find this brand superior to all others.
The Richmond Straight Cut No. 1 Cigarettes

are made from the brightest, most delicately flavored and highest cost gold leaf
grown in Virginia. This is the old and original brand of Straight Cut Cigarettes, and
was brought out by us in the year 1875. Beware of imitations and observe that the
firm name as below is on every package.

ALLEN & GINTER, Manufacturers,


Richmond, Virginia

GREENSBORO
Female College,
GREENSBORO, N. C.
The Sixty-Sixth Session of this well-equipped and prosperous
School will begin on the 11th of January, 1888. Faculty (consisting of
three Gentleman and eleven Ladies) able, accomplished and faithful.
Instruction thorough in all departments. Superior advantages offered
in the departments of
Music, Art, Elocution and Modern Languages.
Location, healthful and beautiful; fare good. Premises large, with
ample walks for out-door recreation. Buildings large, convenient,
comfortable, and furnished with all the appliances of A FIRST CLASS
FEMALE COLLEGE.
Special attention paid to physical health, comfort, and
developement, and moral and spiritual culture.
For catalogue apply to
T. M. JONES, President.

Group Photographs.
I would announce to the students of Trinity College that with a
view to doing school work I have specially fitted myself for making
LARGE GROUPS,
such as Classes, Fraternities, Literary Societies, &c. Will be glad to
serve with whatever they need in Photography, in that or any other
line of work. I also make
Portrait Frames and Mats to Order.
Respectfully,

S. L. ALDERMAN,
Greensboro, N. C.
THE
Trinity Archive.

Published under the Supervision of the Professor of English.


Trinity College, Nov., 1887.

Goe, little booke! thy selfe present!


Spenser.

The movement set on foot by the Board of Trustees to advance the


interests of Trinity exerts a stimulating influence upon the College
itself. The students, feeling the impetus given, have entered heartily
into sympathy with the new management. That another door to
literary work might be opened to them, they have planned and, with
the approbation of the Faculty, established The Archive. Its
columns will receive and preserve their best work. Dull efforts to say
nothing in many words, mild platitudes on ancient classics, and
meanderings through hazy sentiment will be buried in the dust of the
top-shelf along with “Which is mightier, the pen or the sword?” A
concise statement, however, of original investigation in any
department, whether from student or from member of the Faculty,
will be welcomed; for it has been determined that its aim shall not be
solely a literary one. It is desired, also, that the paper be a means of
communication between College and patrons. To this end, the
circulation will be extended as far as possible over the territory
covered by the North Carolina Conference. Trinity news, Trinity
interests, Trinity announcements will be made prominent. The co-
operation of clergy and laity, especially of the Alumni, is asked in
putting The Archive into general circulation; for Trinity claims as
her patrons the whole membership of the Conference.
The responsibility of publication is undertaken by the two Literary
Societies. The two Managers and ten Editors are chosen out of their
members, and the Professor of English has been designated Censor.
Training in journalism is a legitimate part of College work. A
proposition, however, to establish a Chair of Journalism merits the
jocular tone with which the press has greeted it. The practical
exercise afforded in publishing a paper helps to make ready writers,
and is a valuable auxiliary to the regular course.
The College dominates the village, and liquor cannot gain a foot-
hold. Friends of the institution could not lay too much stress upon
the fact. It is a comforting assurance to parents that their sons will
not be exposed to this temptation. Trinity lies next to a strong
temperance community, and there is no danger that rum-shops will
be set up just beyond the College limits.

Examinations for admission to College classes will be held twice a


year, in June and in September, on the latter date exclusively at
Trinity College, beginning at ten A. M. on the day before the opening.
Applicants for admission in 1888 will be required to stand
examinations on the following subjects:

1. Arithmetic, including Metric System;


2. Algebra to Quadratics;
3. History of the United States;
4. English Grammar and Analysis;
5. Geography, Descriptive and Physical;
6. Physiology and Hygiene;
7. Latin Grammar, three Books of Cæsar.
All students, on coming up to enter, will be required to fill out a
blank form of enrollment.
The entrance examinations, though this year necessarily
incomplete, have secured beneficial results.
The students have in the main fallen into their proper classes
without waiting for the regular examinations to show them their
mistake.
In the A. B. Course, fourteen hours a week in recitation will be
required of the Seniors. Six hours will be filled by assigned subjects,
the other eight being made up out of subjects chosen by the student.
The same number of hours will be required of those applying for the
Ph. B. degree, but there will be eight hours assigned work to six
hours elective.

The recitation rooms are full. Larger ones with more black-board
space will be a pressing need, if the numbers grow. The preparatory
department also demands that help which its importance merits.
Will the Methodists of North Carolina see it, too, firmly established
and able to offer all the advantages of a well-equipped school? Other
denominations, as well as the State, are doing this. Few boys will
remain for a sentiment; they go where the greatest inducements lie.

Till Congress meets and while Congress shall wrangle over


measures, there is daily piled up in the national Treasury a
dangerous balance withdrawn from circulation. Wall street is
nervous. Some permanent relief must be devised. High tariff has the
majority and must solve the problem. The Nation says:
“Looking about for some lamb to slaughter or some pig to shear,
the protectionists have fixed their eyes upon the sugar-planters as
the class likely to yield the largest fleece with the least squealing. The
revenue from sugar is upwards of $50,000,000; the number of
planters is very small. Although they have been reinforced to some
extent by the manufacturers of glucose and a few sorghum and beet-
root enthusiasts, they amount altogether to a very feeble contingent.
Sugar is an article of prime necessity. * * * * *
“Accordingly we find such admirable defenders of protection as
Senators Sherman, Dawes and Hiscock advocating a reduction or
repeal of the duties on sugar, with a compensating bounty to the
growers of cane, beets, &c., at home. * * * * *
“A bounty of $7,000,000 a year to the sugar-planters, paid by
warrants drawn on the Treasury, would be a very different thing in
appearance from a like bounty paid under the operation of the tariff,
although it would be the same thing in fact. A bounty of $17,000,000
to the steel-rail makers, if paid directly from the Treasury, could not
last a year. Yet that bounty has been paid during the present year in
the indirect method of customs duties. We can think of nothing more
likely to expose protection to irresistible assaults than the adoption
of the bounty system in any single instance. We cannot believe that
the high-tariff fraternity will be so short-sighted as to sanction it as
part of their scheme of ‘tariff reform.’ We are persuaded that they
will offer up the sugar-planters and the beet and sorghum cranks as a
sacrifice without more ado, and be glad to get off so cheaply.”

It has been reserved for Reed and Kellogg from the foundation of
the world to catch the Fleeting Thought and marry it to Geometry. O
tempora! O mores!

English is rich in puzzles. Its orthography is a conundrum the size


of “Webster’s Unabridged.” The foreign crew of printers that
followed Caxton made high sport of rigging it out in fantastic shape.
Then old Dr. Johnson fetched it a heavy blow with his paw and
finished it. Presently China will offer her 50,000 symbols, or the
pyramids will tender the use of their hieroglyphs, as a relief from this
oppressive system.

Polydore de Keyser, Alderman for Farringdon Without, and a


Roman Catholic, has been elected Lord Mayor of London,
Editorials.

J. S. BASSETT, Hesperian, }
} Editors.
G. N. RAPER, Columbian, }

Senator Leland Standford has in view the endowment of a


university for California. His purpose is to build it with “a sole regard
to the poor,” so that “no rich man’s son will want to come there.”
This is as it should be. When the poor boys and girls of America find
an opportunity to become educated men and women, they prove to
be the strongest and most energetic workers in the cause of
enlightenment; and all those who desire the perpetuity of our
political, social and religious institutions hail this action of Mr.
Standford with a special joy. Now, as never before in this century,
does our country need great men at its head; and, if we survive, must
we not look, as in the past crises, for our statesmen among the frugal
and uncorrupted laboring class? Then let him who, having
accumulated a goodly fortune of this world’s goods, desires to be
remembered for his benevolence, not forget that in the intellectual
and moral education of the masses lies the destiny of the grandest
nation on earth.

Nothing is more vital to the welfare of a college than a good


library. There is something else connected with the acquisition of an
education, besides transferring to the mind the contents of text-
books. It is necessary to get broad ideas and extended information on
each subject. This can best be done by obtaining the opinion of
several authors on that subject, for it is only when one has come to
look at a subject from several standpoints that he can form a correct
opinion relative to it. It is here that the library makes its influence
felt by affording students access to works which, owing to their cost,
they could not own. Those who contend that the function of the
library is only supplemental to the college course, should remember
that life also is supplemental to the college course, and that the
college course is but introductory to the library function, both in turn
being introductory to life and all three being links of the chain of
enlightened existence, the removal of either of which would be
detrimental.

The convicted anarchists now in the Chicago jail awaiting


execution are making, through their friends, strenuous efforts to
have their punishment lessened. A petition has been presented
asking for a reprieve. The plea is that the peace will be preserved.
While we boast a reasonable amount of mercy, still we can see
nothing to commend to our favor a petition which is, at the same
time, a threat. There is abundant evidence that the introduction of
anarchists into our country is for no good, and now is the best time
to strike a blow, which, being dealt against a pernicious organization
in its incipiency, shall be all the more effective in crushing it. Many
people imagine that, because eight thousand names have been
secured to this petition, it deserves consideration; but, let the sense
of the people at large be taken, and then we shall see how many
million names of good American citizens, demanding the execution
of this sentence as a safeguard to them in the enjoyment of their
rights as free people, shall be secured. Where the safety of a nation is
at stake, there is no place for timid sentiment in the hearts of those
who are custodians of that safety. Then, since a “jury of twelve of
their peers” has declared the six anarchists guilty, let them hang and
let others of their organization take warning.

The policy of England toward Ireland as expressed in her dealings


with O’Brien is peculiarly cowardly. It should not be the part of
unaffected spectators to express themselves too strongly on either
side of a national question like this, but no man, sane and honest,
can know the facts in the case and not feel in his soul both contempt
for the English government and sympathy for Ireland. That country
is indeed to be pitied whose proud boast it is that the sun never sets
on her dominion, and yet is under the guidance of a government
which, to forward its purpose deems it necessary to resort to such
measures as those employed against Ireland’s patriotic editor. The
history of nations shows that a policy of oppression toward any part
of a government will re-act disastrously on the oppressors, and the
rulers of England, if they are wise, will adopt a conciliatory policy
before they goad to desperation a race of people who have more than
once shown themselves no unworthy foemen for some of the
proudest armies of Europe. In the present condition of the
international political affairs of our neighbors across the Atlantic, an
outbreak in Ireland would mean something more than a rebellion to
be crushed; and the sovereign, the beginning of whose reign was
marked by serious trouble in the East, might close her career with
that same East either entirely snatched from her hands by her
Muscovite neighbor or the scene of a long struggle for the mastery.

Read the papers and what spirit of ferocity is often manifested in


the “criminal columns.” There is an account of some wretched man
who, after he has suffered death at the hands of an infuriated mob,
has had his body riddled with bullets. Granting his crime merited
death, there is no principle of justice in such action. It is a violation
of that right which the English noblemen obtained from King John at
Runnymede, the right of trial by jury. Moreover, it seems as if
“judgment had fled to brutish beasts and men had lost their reason.”
Besides usurping authority, the mob is moved by vengeance alone to
inflict punishment. Every reasonable man should discountenance
such procedure, but is at the same time desirous of the just execution
of punishment upon him that doeth wrong.

The Nestor of Southern statesmen has recently given to the public


his opinions on prohibition. We heartily agree with him that one of
the strongest weapons possible for man to wield against the progress
of intemperance is found in the duty of every mother to implant in
the very souls of her children the true principles of temperance.
While the children are young is the time to give lasting life to ideas
which in later years will produce good results for the suppression of
the liquor traffic and the elevation of mankind. But this weapon is
not used so successfully as is necessary. We do not agree with Mr.
Davis that any inalienable rights would be taken from the citizens by
the success of a new political party with temperance for its issue. If
the State needs and even demands a reform, if both Democrats and
Republicans are afraid to touch the liquor problem, the formation of
a party that does not fear to suppress social evils is a necessity. Times
change, and parties must change. Moreover, it is no disgrace, nay,
even it shows a spirit of fortitude for a man to change his politics, if
he finds that he can better promote the welfare of his country.
Slavery once impeded our healthy development and it took the
organization of a party to abolish it. The impediment of our age is
intemperance, and the demand of the times is some political force—
call that force what you may—which will free us from the tendency
toward degradation.

There will be contests this fall in several States, between the two
political parties, and the press in its comments may attempt, as is too
often done, to vilify the candidates of the opposite party. The best
way to secure success is for both candidate and editor to treat every
man according to his worth and not rely upon low ribaldry and
exaggerated invective. The man who attempts to succeed through
bitter recitals of the deeds of the past will not only offend the finer
sensibilities of the best citizens but often stands in danger of defeat
among his equals. Such a person ought to be put on the retired list
and preserved as a specimen of humanity of two centuries ago. Every
man is expected to be strong and enthusiastic for his party, but no
man should so far forget the use of his reason as to call his neighbor
a rascal simply on account of different political views. When a man’s
character will not bear the test then let the press expose him. The
publication of prejudiced accusations, and the display of cartoons
devised by narrow-minded partisans tend only to corrupt our
civilization. It is the purpose of The Archive to condemn whatever
may be wrong in every political party and at the same time to
maintain such views as can be considered at least liberal.

As we go to press, the two Literary Societies make a proposition to


the Board of Trustees to raise $5000 for a combined library and
society building, if the Board will raise a like amount. This
proposition will be laid before the Executive Committee at their
meeting in Greensboro, Nov. 4.
Reviews.

G. T. ADAMS, Hesperian, }
} Editors.
D. C. ROPER, Columbian. }

The Practical Elements of Rhetoric, with Illustrative Example,


By John F. Genung, Ph. D. (Leipsic), Professor of Rhetoric in
Amherst College. Boston: Ginn & Company. 1887. pp. xii, 488.
Cloth.
This book has two parts, Style and Invention. Part First analyzes
style, elements of style, qualities of style, kinds of composition. Of
the eight chapters that make up the second half, the first two are
devoted to a discussion of the principles that belong to any literary
work, and the remaining six to the practical application of them, as
seen in the leading forms of discourse. The author attempts to give
only the practical elements of rhetoric, and in so doing his supreme
effort is directed to the demands of his subject in order to bring out
in its fullness what is really beneficial to the student. As old things, in
proportion to their living value, need from time to time to be newly
defined and distributed, so the author has made a new and
admirable division of topics, each of which he introduces with a
simple and yet strictly accurate definition. The arrangement of topics
and the treatment of the same are, to say the least, fine, and plainly
show that the purpose of the author has been very successfully
accomplished, both in the expository and in the illustrative matter.
Genung’s style is clear and impressive. He has not merely compiled
from other authors, but, for the principles laid down, has gone to the
true sources, the usage of the best contemporaneous writers, to verify
old rules and to lay down new ones. He has by no means tied himself
to rhetoric descended from the classics, his practical standard
excluding on the one hand, points whose interest is merely
speculative, and on the other, discriminations that are only named
and defined, without directions looking to use or avoidance.
Furthermore, the publishers have done well their part, using every
artifice to place the treatise clearly before the student. It is to be
regretted, however, that a word and phrase index was not added to
the other indexes.

A German Grammar for schools and colleges based on the Public


School German Grammar of A. S. Meissner, M. A., Ph. D., D. Lit.
By Edward S. Joynes, M. A., Professor of Modern Languages in
South Carolina College. Boston: D. C. Heath & Co., 1887. pp. ix,
322.
While the author has based his work upon that of Meissner, he has
by no means slavishly followed that Grammar, but has greatly
extended the syntax so as to suit the higher schools. In doing this,
Prof. Joynes has consulted the standard grammars of Whitney and
Brandt, and has received the aid of distinguished scholars. The
subjects are excellently arranged, the rules briefly worded, but clearly
and accurately expressed. There is nothing superfluous. It is to be
regretted, however, that Prof. Joynes did not see fit to treat more
fully the prepositions; for many dictionaries, especially such as the
student can own, are incomplete in this very regard. A discussion,
therefore, of the prepositions with a list of their constructions
arranged for reference would be of incalculable value to the student.
This Grammar is already having a run and will prove itself a
formidable rival to those in the field. Last but not least, the part
intrusted to the publishers has been admirably executed, leaving in
typography nothing to be desired.

King Solomon’s Mines. By H. Rider Haggard. Cassell & Co., N. Y.


This is a book that all may read with pleasure, mainly because it is
something out of the usual order. Being rather a compromise
between Robinson Crusoe and the Arabian Nights, you are
constantly catching glimpses of these books and yet at the same time,
reading a new story. The author takes an Englishman to South
America in search of a lost brother who, as the Englishman thinks,
has found his way to King Solomon’s Mines. Guides and other
necessaries being procured, the party set out across the desert for
these inaccessible mines. After overcoming many and varied
difficulties, they find the diamonds. The party is shut up by the old
witch in charge of the cave; but, finally escaping with many of her
jewels, they by chance find the lost brother and return to civilization.
The author is not so unkind as to force his truths upon you, but
rather takes it for granted that his statements will be received as
given, for no other purpose than that of entertaining. There is a vein
of humor running through it that makes the whole story very
agreeable, and even when most astonished at his statements, you are
compelled to laugh at the courteous way in which they are expressed.
In originality of expression, this novel surpasses the majority, and
adds a full book to Cassell’s “Rainbow Series.”

The Labor Movement in America. By Richard T. Ely, Ph. D.,


Associate in Political Economy, Johns Hopkins University. 1 Vol.
Thomas Y. Crowell & Co. pp. 375.
Every one who is even partially acquainted with the present
condition of the laboring masses and with the “marvellous war now
being waged in the heart of modern civilization” can not fail to see
readily the necessity for some one to undertake to solve the difficult
problem with which this volume deals. In view of this fact, and being
duly impressed with the weight and importance of this issue upon
which the welfare of humanity depends, the author has devoted
much time and labor, not only to the consideration of this problem,
but also to condensing the results into a history, or rather, as he says,
a “sketch” of the different labor organizations in America. The work
deals chiefly with the main current of social life, not finding room in
this volume to deal with the many separate lesser ones. He presents
rather than refutes the important statements connected with this
main current, although he does not abstain entirely from criticism.
The topics are systematically arranged, enabling the reader more
clearly to understand and more easily to retain the accurate record of
facts. His sketch on “Early American Communism” and that on “The
Growth and Present Condition of Labor Organizations in America”
are especially interesting and instructive. His treatment of the
economic and educational values of the labor organizations is
masterly and explicit, evincing a thorough understanding of the great
principles upon which our social fabric is based. In the Appendix are
given the Platforms, Constitutions and By-Laws of the various labor
organizations, which are read with interest and profit, inasmuch as
the principles and complaints of the laborer are clearly set forth
therein. The last words penned in the preparation of the work are
addressed to the working men. The caution and the counsel given in
this address would prove of incalculable value to all whom they
concern. Were these heeded, inestimable benefits would most
certainly accrue to all the laboring classes. If they would pursue the
course prescribed by the author, they would be much happier,
wealthier and wiser. They would learn to appreciate instead of abuse
the many blessings of this life. Then the riots, strikes, boycottes and
outbursts of general discontent, for a long time so prevalent in the
land, would soon become almost a matter of history. The author’s
abhorrence of the many objectionable features connected with the
labor movement can be plainly seen, although he does not feel it
incumbent upon him to call attention to each one of them; but, when
it is necessary, he does not hesitate to express his opinion touching
many of the schemes for destruction, which he regards as
“damnable.” This valuable work closes with the remedies for the cure
of social evils. While they can not be properly called a panacea for all
the ills, nor an elaborate scheme of social regeneration, yet, as
suggestions, they are timely and well worthy the careful
consideration of the reader. Every laborer, either contented or
dissatisfied with his present lot, should read this book.
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!

ebookball.com

You might also like