100% found this document useful (4 votes)
51 views

(eBook PDF) Fundamentals of C# Programming for Information Systems 2nd Editioninstant download

The document is an overview of the eBook 'Fundamentals of C# Programming for Information Systems, 2nd Edition,' which teaches C# programming fundamentals through practical applications with graphical interfaces. It highlights the new content added in this edition, including chapters on web application development and object-oriented programming, and is designed for introductory programming courses. The book features hands-on tutorials, review questions, and exercises to enhance learning for both beginners and experienced students.

Uploaded by

mahninawase
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)
51 views

(eBook PDF) Fundamentals of C# Programming for Information Systems 2nd Editioninstant download

The document is an overview of the eBook 'Fundamentals of C# Programming for Information Systems, 2nd Edition,' which teaches C# programming fundamentals through practical applications with graphical interfaces. It highlights the new content added in this edition, including chapters on web application development and object-oriented programming, and is designed for introductory programming courses. The book features hands-on tutorials, review questions, and exercises to enhance learning for both beginners and experienced students.

Uploaded by

mahninawase
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/ 54

(eBook PDF) Fundamentals of C# Programming for

Information Systems 2nd Edition instant download

https://ebooksecure.com/product/ebook-pdf-fundamentals-of-c-
programming-for-information-systems-2nd-edition-2/

Download more ebook from https://ebooksecure.com


We believe these products will be a great fit for you. Click
the link to download now, or visit ebooksecure.com
to discover even more!

(eBook PDF) Fundamentals of C# Programming for


Information Systems 2nd Edition

http://ebooksecure.com/product/ebook-pdf-fundamentals-of-c-
programming-for-information-systems-2nd-edition-2/

(eBook PDF) Fundamentals of Information Systems 9th


Edition

http://ebooksecure.com/product/ebook-pdf-fundamentals-of-
information-systems-9th-edition/

(eBook PDF) Fundamentals of Information Systems 8th


Edition

http://ebooksecure.com/product/ebook-pdf-fundamentals-of-
information-systems-8th-edition/

Fundamentals of Information Systems 9th Edition Ralph


Stair - eBook PDF

https://ebooksecure.com/download/fundamentals-of-information-
systems-ebook-pdf/
Essentials of MIS (Management Information Systems),
15th Global Edition Kenneth C. Laudon - eBook PDF

https://ebooksecure.com/download/essentials-of-mis-management-
information-systems-15th-global-edition-ebook-pdf/

Essentials of MIS (Management Information Systems),


15th Global Edition Kenneth C. Laudon - eBook PDF

https://ebooksecure.com/download/essentials-of-mis-management-
information-systems-15th-global-edition-ebook-pdf-2/

(eBook PDF) Management Information Systems for the


Information 9th

http://ebooksecure.com/product/ebook-pdf-management-information-
systems-for-the-information-9th/

Fundamentals of Ecosystem Science 2nd Edition Kathleen


C. Weathers - eBook PDF

https://ebooksecure.com/download/fundamentals-of-ecosystem-
science-ebook-pdf/

(eBook PDF) Fundamentals of Communication Systems,


Global Edition 2nd Edition

http://ebooksecure.com/product/ebook-pdf-fundamentals-of-
communication-systems-global-edition-2nd-edition/
6.5 Getting User Input from Controls ................................................................................................... 183
6.6 Working with ComboBoxes............................................................................................................ 186
6.7 Working with ListBoxes ................................................................................................................. 196
6.8 Windows Presentation Foundation (WPF) ..................................................................................... 201
Exercises ............................................................................................................................................... 203
Chapter 7: Arrays ................................................................................................205
7.1 Introduction to One-Dimensional Arrays ....................................................................................... 205
Tutorial 1: Working with 1-D Arrays: Test Scores Application ........................................................... 208
7.2 Assigning a Value to an Element of an Array................................................................................. 211
7.3 Accessing Elements of an Array Using the Index .......................................................................... 212
7.4 Accessing Elements of an Array Using the foreach Loop .............................................................. 215
7.5 Copying an Array............................................................................................................................ 217
7.6 Looking Up Values in an Array ...................................................................................................... 221
Tutorial 2: Lookup Units Sold Using 1-D Arrays................................................................................. 222
Exercises ............................................................................................................................................... 224
Chapter 8: Sequential Files and Arrays.............................................................226
8.1 Introduction to Text Files................................................................................................................ 226
Tutorial 1: Reading Text Files .............................................................................................................. 229
8.2 Splitting a Row: Split Method ........................................................................................................ 231
8.3 Reading Data from Files into Arrays .............................................................................................. 234
8.4 Additional Methods of Arrays ........................................................................................................ 241
Tutorial 2: Looking Up Phone Numbers Using Arrays ........................................................................ 242
Tutorial 3: Using a ComboBox to Select the Search Name .................................................................. 246
8.5 Writing to Text Files ....................................................................................................................... 248
Tutorial 4: Writing Scores to Text File ................................................................................................. 248
8.6 SaveFileDialog Control .................................................................................................................. 255
8.7 Passing Arrays to Methods ............................................................................................................. 259
Tutorial 5: Passing Arrays to Compute Average .................................................................................. 259
8.8 Two-Dimensional (2-D) Arrays ...................................................................................................... 263
Tutorial 6: 2-D Array to Find the Sales for a Product........................................................................... 267
Exercises ............................................................................................................................................... 271
Rentals Assignment 2 ........................................................................................................................... 272
Help Desk Assignment 2 ...................................................................................................................... 274
Chapter 9: Collections .........................................................................................276
9.1 Introduction to Collections.............................................................................................................. 276
9.2 List<T> Collection .......................................................................................................................... 278
Tutorial 1: Looking Up Sales Data Using a List ................................................................................... 279
9.3 Dictionary<TKey, TValue> Collection .......................................................................................... 285
Tutorial 2: Dictionary with Product# as Key and Price as Value ......................................................... 287
Tutorial 3: Dictionary with Product# as Key and Sales Array as Value ............................................... 293
Exercises ............................................................................................................................................... 297
Chapter 10: Graphical User Interface: Additional Controls...........................298
10.1 ListView: Features ........................................................................................................................ 298
10.2 Adding Items to ListView ............................................................................................................. 299
Tutorial 1: Selecting a Show from a ListView ..................................................................................... 302
10.3 Accessing Data from a ListView .................................................................................................. 302
10.4 Forms with Tab Pages ................................................................................................................... 308
Tutorial 2: Multipage Form with TabControl ....................................................................................... 308
Exercises ............................................................................................................................................... 310
Chapter 11: Multi-form Applications and Menus ............................................312
11.1 Introduction ................................................................................................................................... 312
11.2 Accessing an Existing Form from Another................................................................................... 313
Tutorial 1: Multi-form Financial Planning Application ........................................................................ 315
11.3 Sharing a Method between Multiple Forms .................................................................................. 318
Tutorial 2: Sharing the LoadDictionary Method between Forms ......................................................... 319
11.4 Closing a Parent Form .................................................................................................................. 325
11.5 Menus............................................................................................................................................ 328
11.6 ToolStrips...................................................................................................................................... 332
Exercises ............................................................................................................................................... 334
Chapter 12: Databases .........................................................................................335
12.1 Introduction ................................................................................................................................... 336
12.2 Creating Database Objects ............................................................................................................ 336
Tutorial 1: Display Employee Records Using the Wizard .................................................................... 337
12.3 Displaying Data in a DataGridView ............................................................................................. 340
12.4 Accessing Data Items from a DataGridView ................................................................................ 346
12.5 Displaying Data in Details View .................................................................................................. 349
12.6 Finding the Record for a Selected Key ......................................................................................... 351
Tutorial 2: Find Employee Records Using the Wizard ......................................................................... 352
12.7 Selecting a Group of Records Using the Binding Source ............................................................. 356
12.8 Selecting Records Using the Table Adapter ................................................................................. 362
Tutorial 3: Parameter Query to Select Records..................................................................................... 363
12.9 Untyped Datasets: Displaying Records......................................................................................... 365
Tutorial 4: Display Records Using Untyped Datasets .......................................................................... 366
12.10 Untyped Datasets: Selecting Records ......................................................................................... 375
Tutorial 5: Select Records Using Untyped Datasets ............................................................................. 377
12.11 Untyped Datasets: Add/Edit/Delete Records .............................................................................. 384
Tutorial 6: Add/Edit/Delete Using Untyped Datasets........................................................................... 385
12.12 Command Object and DataReader .............................................................................................. 394
Tutorial 7: SqlCommand and SqlDataReader to Work with Tables ..................................................... 396
Exercises ............................................................................................................................................... 405
Rentals Assignment 3 ........................................................................................................................... 407
Help Desk Assignment 3 ...................................................................................................................... 407
Chapter 13: Object-Oriented Programming .....................................................414
13.1 Introduction to Objects and Classes .............................................................................................. 415
13.2 Classes versus Objects .................................................................................................................. 415
13.3 Information Hiding (Encapsulation) ............................................................................................. 417
Tutorial 1: Create an Employee Class................................................................................................... 419
13.4 Properties ...................................................................................................................................... 423
Tutorial 2: User Interface and Properties .............................................................................................. 426
13.5 Calling Methods (Sending Messages to Objects) ......................................................................... 434
Tutorial 3: Calling Methods and Passing Data between Forms ............................................................ 435
Exercises ............................................................................................................................................... 448
Chapter 14: Inheritance ......................................................................................450
14.1 Introduction to Inheritance ............................................................................................................ 451
14.2 Implementing Inheritance ............................................................................................................. 452
Tutorial 1: Creating Subclasses ............................................................................................................ 454
14.3 Using Subclasses and Super Classes............................................................................................. 458
14.4 Overriding Methods ...................................................................................................................... 459
Tutorial 2: Implementing the GrossPay Method................................................................................... 462
14.5 Polymorphism ............................................................................................................................... 467
Tutorial 3: Dynamic Dispatch and the ToString Method...................................................................... 468
14.6 Abstract Classes and Interfaces..................................................................................................... 472
Tutorial 4: Interfaces ............................................................................................................................. 473
14.7 Using Interfaces to Sort Collections ............................................................................................. 480
Tutorial 5: Sorting Employees .............................................................................................................. 483
14.8 Access Modifiers in C# ................................................................................................................. 486
Exercises ............................................................................................................................................... 488
Chapter 15: Introduction to Web Applications Development .........................491
15.1 Introduction to Web Applications ................................................................................................. 491
15.2 Creating a Single-Page ASP.NET Website................................................................................... 496
Tutorial 1: Developing a Simple Web Page: Ice Cream Cost ............................................................... 496
15.3 Introduction to HTML .................................................................................................................. 502
15.4 Working with Web Server Controls.............................................................................................. 506
15.5 Validating Data Using Validation Controls .................................................................................. 517
Exercises ............................................................................................................................................... 522
Chapter 16: Web Development: Multipage and Database Applications.......523
16.1 Accessing Databases from Web Forms ........................................................................................ 523
Tutorial 1: Accessing a Database: Theater Tickets Application ........................................................... 524
16.2 Preserving Data during Postbacks Using View State ................................................................... 538
16.3: Multipage Websites and Session State ........................................................................................ 543
16.4 Setting a Page to Its Previous State ............................................................................................... 551
Exercises ............................................................................................................................................... 557
Appendix A: Binary Files ....................................................................................559
A.1 Writing to Binary Files .................................................................................................................. 559
Tutorial: Working with Binary Files ..................................................................................................... 559
A.2 Reading Binary Files ...................................................................................................................... 560
Appendix B: Creating a Database ......................................................................562
Tutorial: Creating HR Database............................................................................................................ 562
Appendix C: Answers to Review Questions ......................................................564
Appendix D: HTML Elements ............................................................................584
Index ......................................................................................................................586
Preface
Mission of the Text
Welcome to Fundamentals of C# Programming for Information Systems. This book teaches the
fundamentals of programming in C# to provide a solid foundation to build business and other real-world
applications. Programming concepts are discussed in the context of familiar practical applications that use
graphical interfaces.

New to This Edition


A key goal of the new edition was to add significant content so that the book could be used in a two-
course sequence in programming. Four new chapters have been added: Two chapters that provide a
comprehensive introduction to web applications development, and two other chapters on the concepts and
practice of object-oriented programming, including inheritance.
Several other updates were made based on feedback from instructors: a second set of three comprehensive
assignments (in chapters 3, 8, and 12), additional end-of-chapter exercises, and learning objectives for
each chapter.

Target Audience
This book is designed for introductory programming courses in IS/MIS, CIS and IT. This book also
would fit into a computer science curriculum with an introductory course that uses a GUI-based
application-oriented approach to teach programming concepts. The breadth and depth of coverage makes
this book suitable for a two-course sequence, particularly when students come to the first course with no
programming background and a slower pace is desired. An approach in a two-course sequence would be
to do in-depth coverage of topics like collections, databases, object-oriented programming, web
development, and others presented in later chapters only in the second course.

Key Features
A key feature of the book is that programming concepts are introduced in small chunks through examples
and illustrations accompanied by hands-on tutorials. The tutorials, which are interspersed with the
concepts, help students apply and explore what they learn immediately. Additionally, review questions
and exercises within the chapters enhance student interest and learning.
Although the book is written for beginners, it is thorough and concise. Graphical illustrations and
screenshots are used throughout the book to enhance learning for both beginners and experienced
students.
Windows forms are used from the beginning to provide GUI-based as opposed to console-based interface.
This book builds graphical user interfaces and code in the .Net environment using Visual Studio. You are
encouraged to use the current free version, Visual Studio Community 2017. Earlier versions, including
Visual Studio 2015, Visual Studio Express and Visual Studio 2013, generally work well, except that you
won’t be able to run a few programs that use certain features available only in C# version 7.1 or greater.
ii

Supplements
For Students: Tutorial_Starts.zip file that contains
o Partially completed projects for tutorials
o Data files/databases used in projects

You may download the Tutorial_Starts.zip file from


http://www.prospectpressvt.com/titles/c-sharp-programming/student-resources/

For Instructors: Instructor resources include


o Completed tutorials
o PowerPoint slides for all chapters
o Test bank
o Partially completed projects for tutorials
o Data files/databases used in projects

To access instructor resources, please complete the request form at


http://www.prospectpressvt.com/faculty-resources/instructors-material/

Installing Visual Studio


You may download Visual Studio Community 2017 from the following website:
https://www.visualstudio.com/downloads/

To install Visual Studio, open the downloaded .exe file and run it.

Overview of the Content and Organization


Every possible sequence of topics seems to put constraints on the quality of illustrative examples and
applications that can be used in a chapter. The organization of chapters in this book attempts to minimize
such problems and to enhance the ability to build on prior chapters. However, except for the foundational
Chapters 1–5, there is significant flexibility in choosing specific topics and the depth of coverage. As
suggested by the dependencies summarized below, there is some flexibility in the sequencing too.
Chapters 1–5 cover the Visual Studio environment and introductory programming concepts, including
methods. These chapters, which provide the foundational knowledge, should be covered in sequence
before other chapters, though certain topics like working with dates and times (section 2.4) may be
postponed or skipped.
Chapter 6 presents the application of the GUI controls ScrollBars, RadioButtons, CheckBoxes,
ComboBoxes and ListBoxes.
Chapter 7 provides a detailed presentation of one-dimensional arrays, and Chapter 8 presents accessing
sequential files and using arrays in combination with files. Chapter 6 is not a prerequisite for Chapters 7
or 8. GUI is presented early on in Chapter 6 to motivate students with more interesting graphical
interfaces. It should be noted that the comprehensive assignment (Assignment 2) specified at the end of
Chapter 8 requires the use of several GUI controls.
Chapter 9 introduces collections, and discusses the List and Dictionary collections in more detail. Chapter
8 (“Sequential Files and Arrays”) is a prerequisite for this chapter. Because of the close relationship
iii

between collections and arrays, collections are presented in this book immediately following Chapter 8 on
arrays.
Chapter 10 discusses the application of ListView and TabControl. The dependency of this chapter on
Chapter 9 (“Collections”) is very low. The prerequisite for this chapter includes Chapters 6 and 8.
Chapter 11 presents multiform applications, Menus and ToolStrips. This chapter has some dependency on
previous chapters, except Chapter 10.
Chapter 12 provides in-depth coverage of accessing databases from C# programs. Chapter 6 is a
prerequisite for this chapter. In addition, the ListView control presented in Chapter 10 is used in an
example in the last part of this chapter, and it is required in the third comprehensive assignment
(Assignment 3) at the end of this chapter. Assignment 3 also requires the use of MainMenu control
discussed in Chapter 11. Other than that, the dependence of Chapter 12 on Chapters 7–11 is relatively
low.
Chapter 13 provides an introduction to object-oriented programming (OOP) principles and techniques.
The initial part of this chapter may be used for an introduction to OOP early in the semester.
Chapter 14 describes the concept of inheritance, implementation of inheritance, subclasses and super
classes, overriding methods and polymorphism. Chapter 13 is a prerequisite for this chapter, and it also
relies on collections from Chapter 9.
Chapter 15 presents the concepts of web applications development, and develops simple web applications
using the ASP.Net platform in the Visual Studio environment. Only the basic programming knowledge
presented in Chapters 1–3 is required for this chapter.
Chaper 16 describes how to access SQL Server databases and develop multipage web projects. Basic
programming concepts presented in Chapters 1–6, the concept of collections from Chapter 9, and basic
database concepts including binding controls to a database and filtering records (Chapter 12) are used in
building the application.
iv

Acknowledgments
I am thankful for the valuable assistance provided by many people in the preparation of this book. I wish
to thank Dr. Jakob Iversen, The University of Wisconsin–Oshkosh, for authoring Chapters 13 and 14 on
Object-Oriented Programming.
I was fortunate to work with Beth Lang Golub, editor and president of Prospect Press, who was flexible
and supportive of my goal to offer a good quality programming textbook at a reasonable price. Special
thanks go to Susan Hegedus, Kathy Bond Borie and Rachel Paul for their painstaking attention to detail in
editing this book, and to Annie Clark for the cover design.
I wish to acknowledge the contributions of the following reviewers for their valuable guidance in
improving the presentation and contents of this book:
Janet Bailey, University of Arkansas at Little Rock
Wei Kian Chen, Champlain College
Clinton Daniel, University of South Florida
Silvana Faja, University of Central Missouri
Joni L. Jones, University of South Florida
David Pumphrey, Colorado Mesa University
Manonita M. Ratwatte, University of Oklahoma (Retired)
Theadora Ross, University of Arkansas at Little Rock
David M. Weber, Northern Arizona University
Thanks are also due to the instructors who provided valuable feedback on the first edition of this book
through user surveys:
Janet Bailey, University of Arkansas, Little Rock
Jeff Dickson, Oregon Institute of Technology
Ruth Lamprecht, Virginia Union University
Panos Linos, Butler University
Ziping Liu, Southeast Missouri State University
Robert Pilgrim, Murray State University
Kris Rosenberg, Oregon Institute of Technology
Doug Titus, University of North Florida

About the Author


Dr. George Philip is Professor Emeritus of Information Systems at the College of Business, The
University of Wisconsin–Oshkosh. He has more than twenty-five years of teaching and consulting
experience in the information systems field, including computer programming in multiple languages. He
also served as chair of the Information Systems Team, and director of the M.S. in Information Systems
program. He has published numerous articles in this field.
Chapter 1

Introduction to Visual Studio and Programming

Welcome to programming in C# language. In this chapter, you will learn to develop simple programs in
the Visual Studio development environment, and to work with different types of data.
Learning Objectives
After studying this chapter, you should be able to:
 Identify the inputs, processes and outputs of a software system.
 Describe the steps involved in developing a computer program.
 Describe the terms: syntax, logic and runtime errors, machine language, low-level language, high-
level language, compiler and interpreter.
 Develop a simple form in Visual Studio to accept user input, do calculations and display
formatted output.
 Work with Label, TextBox, Button, ListBox and MessageBox.
 Develop simple programs that use constants, variables and expressions.
 Use try-catch method to catch errors.

Topics

1.1 Introduction to Programming 1.8 Working with Variables


1.2 Introduction to Visual Studio 1.9 Doing Calculations
1.3 Visual Studio Environment 1.10 Formatting and Displaying Output in a Label
1.4 Adding Controls to a Form 1.11 Additional Concepts: Constants, Scope of
1.5 The Code Editor Window Variables and ListBox
1.6 Introductory Programming Concepts 1.12 Exception Handling: Catching Errors
1.7 Data Types

1.1 Introduction to Programming


Programming is the process of developing computer programs. If a computer program seems like a
mystery to you, it is just a set of instructions telling the computer how to do a task, like looking up the
price of an item or finding the Chinese restaurants in a city.
Unfortunately, computers cannot understand normal English. So, programs have to be written using
special commands and statements according to strict rules. A key aspect of programming is breaking
down what you want the computer to do, into detailed instructions. Like the directions that a GPS gives
you to get to a place, the instructions in a program need to be precise.

Fundamentals of C# Programming for


Information Systems
2 1.1 Introduction to Programming

Typically, a program uses one or more data items to produce some results. For example, a program that
processes an order might use the item number and order quantity to compute the subtotal, sales tax and
total cost, as represented in Figure 1-1.

Figure 1-1: Inputs, process and outputs of a program

Subtotal
Item# Process
Sales tax
Quantity Order
Total cost

The program, represented by the block “Process Order,” may include multiple subtasks like look up the
unit price, check inventory and compute results.
The data that are used by a program are called the input to the program, and the results produced are
called the output of the program. In addition to processing input data to produce the output, a program
might write data to and read data from storage devices like a flash drive or a hard drive, as represented in
Figure 1-2.

Figure 1-2: A general representation of a software system

How Do I Go About Developing a Program?


To understand the process of developing a program, let’s use a simplified order-processing system as an
example. To develop good programs and do so efficiently, follow these steps:
1. Define the purpose, and identify the input, process and output of the program.
2. Design and develop the graphical user interface (GUI).
3. Identify the components and logic of the program.
4. Design and develop files/databases, if any.
5. Write and test the code.
Let’s look at these steps in more detail.

1. Define the purpose, and identify input/process/output


Before you can write the program, you need to lay some groundwork. In this step, you identify what the
user wants the program to do, including the input, process and output of the program.
Depending on the size and complexity of the program, this could involve extensive analysis of the
requirements, including interviews with users; examination of current forms, reports and transactions; and
identifying processes like checking inventory and looking up price in an order.

Fundamentals of C# Programming for


Information Systems
Chapter 1: Introduction to Visual Studio and Programming 3

Here is an example of a simplified statement of the purpose of the order processing program:
Purpose: Compute and display the subtotal, sales tax and total cost for an order
The output of the program often follows from the purpose. For this example, the output would be
Output: subtotal, sales tax, total cost
The process specifies not only what the program should do (e.g., compute total cost) but also how it
should be done (e.g., how to compute total cost), as follows:
Process: (What?) Look up unit price, look up sales tax rate,
compute subtotal, sales tax and total cost
(How?) subtotal: unit price * order quantity
sales tax: subtotal * sales tax rate
total cost: subtotal + sales tax

Specifying the process also would include identifying the sources of data, like the product file to get the
unit price and sales tax file to get the sales tax rate.
The input specifies the data items that are needed to carry out the process to produce the output. The
input for this order-processing system would be
Input: item number, order quantity
Note that unit price and sales tax rate are not included in the input because the program looks them up. A
real-world system would be a lot more complex. Typically, the process would include additional subtasks
like handling orders when inventory is insufficient, and output may include various reports. In such
systems, graphical methods like Data Flow Diagrams and UML diagrams are used to represent the
processes and the data accessed by them.

2. Design and develop the graphical user interface (GUI)


After identifying the input, process and output of a program, you design and create the user interface—
that is, how the user would interact with the program, and how the program would communicate with the
user. This is the fun part where you bring in your creativity.
Typically, you use forms to interact with the program. As you will learn in the next section, forms have
various types of objects, called controls, such as Button, TextBox and Label. In this step, you identify the
type of controls to be used, specify their names and captions as appropriate, and design the layout. Figure
1-3 shows an example of the GUI for a simplified order-processing system where the user doesn’t provide
the unit price and sales tax rate.

Fundamentals of C# Programming for


Information Systems
4 1.1 Introduction to Programming

Figure 1-3: GUI for an order-processing system

3. Identify the components and logic of the program


This step identifies the major subtasks of the program. For example, in order to process an order, the
program needs to do the following subtasks:
Get Item# and quantity
Look up unit price and tax rate
Compute subtotal, sales tax and total cost
Display subtotal, sales tax and total cost

Again, a real-world program may have to do additional subtasks, like checking the inventory to make sure
there is sufficient quantity on stock.
For relatively simpler programs, after identifying the subtasks, you may go directly to writing the
program for each subtask. However, for tasks involving more complex logic, it might help to develop an
outline of the logic of performing the subtasks. The representation of the logic of a program in plain
English is called pseudo code. You also may represent the logic graphically using a flowchart, as
discussed in Chapter 3.

4. Design and develop files/databases


If data is read from or written to files and/or databases, these are designed and developed prior to writing
the program. Depending on the application, this step may have to be done in parallel with previous steps.

5. Write and test the code


The final step is to write and test the code. You can program in a variety of languages. C#, Java, Visual
Basic, Python and PHP are among the popular languages. You will use C#, which is a popular language
for developing desktop and web applications.
Programing may involve iteratively developing an application by going through the above steps multiple
times.

Syntax, Logic and Runtime Errors


The programming statements you write have to follow strict rules of the language, called the syntax. The
program wouldn’t compile if it had any syntax error, like a missing semicolon at the end of a statement
or a misspelled key word. Compiling is the process of translating the program you write, called the

Fundamentals of C# Programming for


Information Systems
Chapter 1: Introduction to Visual Studio and Programming 5

source code, to another language before running a program, as described in the next section. So, your
first task is to make sure that there are no syntax errors. The good news is that Visual Studio provides a
lot of help in identifying syntax errors.
After the syntax errors are eliminated, the program may run. But, it’s still too early to celebrate because
the results could be incorrect due to errors in the program logic, just like you can write a grammatically
correct sentence that doesn’t convey the intended message. Errors that cause a program to produce
incorrect or unintended results are called logic errors. A tax-filing software using the wrong tax rate and
a billing software overcharging a customer are examples of logic errors.
There are errors other than logic errors that can occur at runtime. These are called runtime errors.
Runtime errors cause the program to crash (unless the program catches and handles such errors) because
the program asks the computer to do something it is unable to do, like accessing a file with an invalid path
or dividing a number by zero.
The process of identifying errors (bugs) is called debugging. Testing programs to identify and eliminate
errors is an extremely important part of developing software.

Review Questions
1.1 Consider Google as a software system. What would be the input, process and output for Google?
1.2 Consider a software system that enrolls students into classes. Identify some key inputs that the
system needs every time a student enrolls in a class, and the subtasks (process) that need to be
performed. What are some outputs the system should produce for students and instructors?
1.3 List the major steps in developing a program.
1.4 Incorrect punctuation in a program is an example of what type of error?
1.5 A payroll program uses the wrong formula to compute overtime pay. What type of error is it?
1.6 True or false: A program that doesn’t have any syntax errors should produce the correct results.

1.2 Introduction to Visual Studio


In this section, you will learn how to use Visual Studio (VS) to create the user interface and write C#
programs. Visual Studio is an integrated development environment (IDE) for developing applications in a
variety of languages, including C#, Visual Basic, C++, Python and HTML/JavaScript. VS supports
development of desktop and web applications for Windows, Android and iOS. A major strength of Visual
Studio is that it provides a user-friendly environment for developing applications.

Installing Visual Studio


You may download Visual Studio Community 2017 from the following website:
https://www.visualstudio.com/downloads/
To install Visual Studio, open the downloaded vs_community.exe file. The installation software will
guide you through the process. The first time you start Visual Studio, you will be asked to choose the
Development Settings and a Color Theme. Choose Visual C# for settings. You may change these settings
later, as described in Tutorial 1.

Fundamentals of C# Programming for


Information Systems
6 1.2 Introduction to Visual Studio

Components of Visual Studio


Though you have the choice to write programs in a variety of languages, the CPU can understand only
Machine Language, which is extremely difficult for humans to understand. Machine Language requires
detailed instructions that consist of patterns of bits (0 and 1), like 10001010, and are dependent on the
machine (the specific type of computer). Because of the need to write detailed machine-dependent
instructions, Machine Language is called a low-level language.
Except in special cases, programs are written in high-level languages, like C#, which require fewer
statements, are less dependent on the hardware and are easier to understand because they use words rather
than patterns of bits.
Programs written in high-level languages are translated to Machine Language before they are run.
Different languages use different methods to translate and run programs. Many languages use a special
software called a compiler to translate the source code to Machine Language. The compiler typically
produces a separate executable Machine Language program that can be run any number of times without
having to compile every time it is run.
Some programming languages use an interpreter that translates each statement to Machine Language
and runs it without producing an executable program. So, every time the program is run, it needs to be
translated to Machine Language.
Visual Studio uses a compiler, but it translates the source code to an intermediate language, which is
translated to Machine Language and run using another software, as described later in this section. Thus,
Visual Studio translates your statements to Machine Language in two steps:
First, a compiler converts the source code into a language called Microsoft Intermediate Language (IL).
The compiled code, along with references to prebuilt programs (called classes), is stored in an executable
file called Microsoft Intermediate Language (IL) Assembly. Such files have the extension .exe or .dll.
Next, another software called Common Language Runtime (CLR) translates the assemblies from
Intermediate Language to Machine Language and executes the programs. The process of translating and
running the source code may be represented as follows:

The products that support developing and running programs within the Visual Studio family include the
following:
1. An Integrated Development Environment (IDE)
An IDE provides an environment to develop programs, which includes code editors for Visual
C#, Visual Basic, Visual J#, Visual C++, HTML and XML, and designers for Windows forms
and web forms.
In Visual Studio, a software application typically is organized into Projects that may contain one
or more forms.
Forms provide the user interface that allows users to input data for the program, to interact with
the program and to display results.

2. A compiler that translates the source code into Microsoft Intermediate Language (MSIL)

Fundamentals of C# Programming for


Information Systems
Chapter 1: Introduction to Visual Studio and Programming 7

3. .Net Framework, which includes


a. the Common Language Runtime (CLR) that translates the assemblies from Intermediate
Language to Machine Language and executes the programs, and
b. .Net Framework Class Library that includes a large number of prebuilt programs called
classes.

Running a program, as described earlier, consists of (1) the compiler translating the source code (the
project) into Microsoft Intermediate Language Assembly and (2) the Common Language Runtime
translating the assemblies from Intermediate Language to Machine Language and executing the program
to produce the output. Next, we will look at how to work with Visual Studio to develop C# programs.

Review Questions
1.7 What is the only programming language that the CPU can understand?
1.8 What is a compiler?
1.9 What is an interpreter?
1.10 What is Microsoft Intermediate Language Assembly?
1.11 What is the function of Common Language Runtime in Visual Studio?

Creating an Application in Visual Studio


To become familiar with the Visual Studio environment, let’s create an application for an ice cream
parlor, consisting of a simple Windows form to compute and display the cost for an order of ice cream.
We will follow the five steps identified earlier to develop it:

1. Define the purpose


Purpose: Compute and display the total cost for an order of ice cream
Input: Unit price, number of scoops
Process: Compute total cost
Total cost: unit price * number of scoops
Output: Total cost

2. Design and develop the Graphical User Interface (GUI)

Figure 1-4 presents the design of the form that shows the user interface to let the user enter the number of
scoops and unit price to display the cost. You will create the form in Tutorial 1.

Fundamentals of C# Programming for


Information Systems
8 1.2 Introduction to Visual Studio

Figure 1-4: Windows form to compute ice cream cost

3. Identify the components and logic of the program


The major subtasks include
Get number of scoops and unit price
Compute cost
Display cost

4. Design and develop files/databases


This application doesn’t involve the use of files or databases.

5. Write and test the code


To understand the process of developing the entire application, including the code, let’s create the form
presented in step 2 and write the code for the tasks identified in step 3.

Creating a Windows Form


In Visual Studio, forms are created within a Project. Typically, all forms within a Project relate to a
common task. Creating a project also creates a Solution, which is a container for one or more projects.
Each project we discuss in this book is in a separate solution that has the same name as the project.
Tutorial 1 creates the project and the form to compute the cost of an order of ice cream.

Fundamentals of C# Programming for


Information Systems
Chapter 1: Introduction to Visual Studio and Programming 9

Tutorial 1: Creating a Form: Ice Cream Cost


Step 1-1: Open Visual Studio Community 2017. You will see the start page, shown in Figure 1-5.

Figure 1-5: Visual Studio Start Page

First, you will change some settings.

Changing default settings in Visual Studio


Step 1-2: Change the default folder to save your projects:
Select Tools, Options. Expand Projects and Solutions and select Location.
For Projects Location, select a folder (e.g., your flash drive) where you will save your projects.
Step 1-3: Change the setting to automatically save projects when they are created:
Select General from Projects and Solutions.
Make sure that the CheckBox for Save new projects when created is checked. Click OK.

You may change the color theme by selecting Environment, General from the Options window.
Similarly, you may reset your settings by selecting Tools, Import and Export Settings, Reset all
Settings.
Close Options window.

Fundamentals of C# Programming for


Information Systems
10 Tutorial 1: Creating a Form: Ice Cream Cost

Creating a new project


Step 1-4: Create a new project:
Click Create New Project on the Start page.
You will see the New Project window displayed in Figure 1-6.

Figure 1-6: New Project window

Select Visual C# from Templates, Other Languages. For the type of application, select Windows
Forms Application, as shown in Figure 1-6.
For Name, enter Ch1_IntroProgramming.
Select the Location, if different from the default folder.
Leave the CheckBox for Create directory for solution unchecked so that both the Project and the
Solution will be created in the same folder. (If there are multiple Projects within a Solution, it
would be better to have separate directories for the Solution and Projects.) Note that the default
name for the Solution is the same as that of the Project.) Click OK.
The Visual Studio development environment appears, as shown in Figure 1-7.

Fundamentals of C# Programming for


Information Systems
Another Random Document on
Scribd Without Any Related Topics
The farther westward I travelled the fewer became the towns.
Nevertheless, albeit they were sometimes thirty and forty miles
apart, they were all prosperous, new and inviting. Of gasoline there
was always an abundant supply at 22 cents (11d.) per gallon. Of
garages there were enough and to spare. Indeed, it was surprising
what palatial garages were to be found everywhere. Outside each
was the familiar "Bowser" pump communicating with a 1,000-gallon
tank below the pavement from which anything from half a gallon to
six gallons at a time could be pumped up by the garage hand at one
turn of the handle. A flexible pipe with a cock at the end leads from
the pump, and one's tank can be filled in a few seconds without a
drop being spilt. Not once in all my travel through the States have I
seen a petrol tin. I do not believe they are used at all because
nowhere in the States is it necessary to travel by road with spare
petrol on board, provided, of course, that one is careful to fill up
regularly at the different towns or stations on the way. Even in the
heart of New Mexico and Arizona, even in the terrible "Death Valley"
and Mohave Desert of California, stations are found where "gas" and
oil can be bought in plenty to carry one well beyond the next to be
reached.
At Larned I made a hearty breakfast from canteloupe, coffee and
"pie." Now "pie" is one hundred per cent. symbolical of America. In
the States they have attained the absolute limit of perfection in the
manufacture of pies; indeed I think it must be a "key" industry. Not
only can pies of every conceivable kind of fruit (and many
inconceivable ones) be obtained, but the cooking thereof is
perfection itself.
On the road again, ever westward, ever looking forward to the day
when from the dreadful monotony of the plains the Rocky Mountains
would loom high and faint upon the horizon.
I passed a few small towns at long intervals, towns with picturesque
names such as "Cimarron," "Garden City," "Lamar," and "Las
Animas." In every case an approaching town was heralded by an
unspeakable stretch of road. With the passage of traffic of all kinds
the road was ground up into powder. Every inch of it was loose
sand, sometimes a couple or three feet deep, sand that would be
impassable to any but horse-drawn traffic. As a saving grace it was
generally less deep at the edges of the road than in the middle, and
locomotion was just within the range of possibility with frequent
assistance by way of "leg-work" and with occasional spills and
crashes. The only use I had for these towns lay in the unlimited
scope for ice-cream consumption which they all afforded. As time
went on, Lizzie showed signs of further disrupture. Gradually little
noises and rattles developed and slowly her power fell off by almost
imperceptible degrees. Of course I had ample power even at that to
cover the country, which, with few exceptions, was level, and the
road, where dry, was good. I averaged no more than twenty-five,
and as there was hardly any stop to make or traffic to slow down for,
this did not mean travelling more than thirty at any time. A good
conscientious motorist, I told myself, would stop and examine
everything. I had got far beyond that stage. "Let the old crock go on
till she busts," I muttered inwardly and opened up to avoid an
oncoming thunderstorm.
Thunderstorms travel quickly in U.S.A. They get a hustle on and
don't mess about generally. There's never any doubt about it when
you see one coming. It means business; there is none of that
burbling, gurgling, gloomy overture that hangs around for hours in
England and very often comes to nothing at all. No, no. In U.S.A.
you see a thundercloud on the horizon and before you've got
"George Washington" off your lips it's on you with a crack and a
bump and a splash and woe betide any innocent motor-cyclist who is
riding in his shirt-sleeves with his jacket strapped on the back.
But that rain was good! Kansas can be hot when it likes and it's
mostly liking all the time, so that a shower-bath is a gift from the
gods. When it stopped, and fortunately before it had had time to do
its foul work on the surface of the dirt road, I arrived in Syracuse, a
small town with not much of a population to substantiate its artistic
name, and but twenty or thirty miles from the Colorado State Line.
Net result 150 odd miles that day and to-morrow with luck I should
behold the Rockies. Oh, those Rockies! How I longed to see them!
The rest of the evening I spent adjusting Lizzie's tappets (they had
all worked loose, hence the noise) and eating pies and ices at every
café in the place. The night was spent in a dirty inhospitable little inn
calling itself, I think, the Broadway Temperance Hotel. Heaven help
Broadway, and the Devil take all temperance hotels! I shivered as I
compared this with the night before.
Westward once more. In an hour I crossed the State Line. Invariably
there is a large sign-board denoting this fact. "This is the State of
Colorado, the most Picturesque and Fertile State in the Union," it read on
this occasion. This time there was not such a marked change in the
country. It was still flat, still dismally uninteresting. Everything
looked dried up. At times the trail, which hitherto had followed the
Arkansas "River," crossed and re-crossed it by long low creaky
wooden bridges. There was still no water flowing underneath them.
"Water? That was only meant to flow under bridges," says the
confirmed toper. The Arkansas River "puts him wise" on that point!
Flagrant mistakes now appeared on the map. Roads and towns
which in reality lay on one side of the river were alleged to be on the
other. Distances became either grossly exaggerated or hopelessly
underestimated, so much so that I only expected to get to a place
when I found myself already there. If it turned out to be another
place than that I had expected—well, there, that made it all the
more exciting.
Later on the trail became very dishevelled and forlorn. Great waves
of sand were piled up in ridges and furrows defying all comers.
Sometimes a benevolent signpost advised all drivers of automobiles
not to risk travelling thereon, but to follow such and such a detour
which would lead back to the road ten or fifteen miles farther on. I
saw many such notices. At first I scorned them, but the sand grew
so thick and deep that it enveloped the frame of the machine and
the projecting footboards brought progress to a standstill. For
several hours I pushed and heaved and skidded and floundered
about on highways and detours and pathways that baffle
description. If I averaged ten miles an hour I was content with that.
I got through many places that passing pedestrians swore were
impassable. In short I was beginning to reduce locomotion over
American roads to a science.
At La Junta, the Santa Fé Trail swerves to the south-west towards
New Mexico, but another trail continues westward and northward
towards Pueblo, Colorado Springs, and Denver, the three "cities" of
Colorado State, and Pike's Peak, one of the highest points of the
Rockies. I decided to leave the trail for a day or two and go
sightseeing in famous Colorado. So I continued westward, scanning
the horizon all the time for a vision of a vast and rugged mountain
range. The sight of mountains would be as balm to a sore wound; as
welcome as a spring of water in the desert; or even as the sight of
land to a shipwrecked mariner, so heartily tired was I of the endless
plains and the inexhaustible flatness and monotony of the country
for the past thousand miles.
Instead of mountains came a cloud. Soon the whole horizon was
black. I knew what that meant. It meant "laying up" for a day or two
and looking round for a good place to lay up at "right slick." But I
was in the midst of nowhere. Not a house or a shack could be seen
anywhere. Even as I scanned the country the rain came. The road
was not sandy enough for it to soak through. Instead it absorbed it
greedily and changed to mud. I rode as far as riding was practicable
and then I pushed. In a few miles I came to a little wooden shack at
the side of the road near a large dyke already swollen with rain. The
shack looked as though it had recently been thrown together with
matchboarding and liberal use had been made of tarpaulins as
curtains instead of doors. I left Lizzie in the road and went to
explore.
CHAPTER XII

THE ROYAL GORGE OF ARKANSAS


There were two huts. I drew aside the tarpaulin and peered in one
of them. It was stuffy and dark and filled with beds, tables,
cupboards and piles of odd furniture and miscellaneous clothing,
boots, blankets and mattresses. In a clearing amongst the general
debris sat a middle-aged woman on the top of a trunk before a
sewing machine.
"Hope I'm not intruding, but is there anywhere I can get out of the
rain until it goes off?"
From a heap of assorted oddments under my very nose came a
voice, a man's voice.
"Sure; come right in, brother. You're welcome to any shelter we can
give you. Guess you've gotten a little wet out there? Jim, go you into
the kitchen and bring a chair for this gentleman."
A pile of musty books rocked on its foundations in another corner
and a young lad of fifteen or sixteen rose as if from out of the earth.
We talked for an hour, but the storm showed no signs of abating.
The wind whistled through the tarpaulin doorway and gloomy blobs
of water dropped from the ceiling from time to time on all and
sundry.
Strange to say I did not betray my nationality. I presume that by
that time I had unconsciously acquired in a small degree the
language of the race.
"You're from the East, I suppose?" queried mine hostess after half
an hour, the first words I had heard her speak.
"Oh, sure, I'm from the East, the far East—in fact, the very Far East!"
I replied.
"Boston?"
"You've said it," was my rejoinder. "Ever been to Boston?" I added.
"Yep, I was there I reckon fifteen fall. All I remember now was the
railway depot. What do they call it, the South Union?"
"Sure, it's the South Union all right. Why, I was born only a couple of
blocks from the South Union depot."
Miserable liar that I am, I have never been in Boston in my life.
"Fine city, Boston," interjected the male voice from below.
"The finest in the world, sir," I effused.
Meanwhile the rain continued, with not the slightest sign of abating.
"You best bring your motor-sickle under shelter and stay the night
right here," suggested the man of the house when the shadows
deepened and still the rain went on.
"I'm sure that's very good of you, sir, but I'm afraid I'd better not
trouble you any more."
"No trouble at all; we're delighted to have you; we can soon make a
bed up with a few chairs and some of these blankets."
I was only too pleased to avail myself of their hospitality and agreed.
At supper I had a chance of studying the various members of the
family. Apart from the man and his wife, there were two boys, and
quite a few more people rolled in afterwards from a source unknown
to me. Supper consisted of stewed beans, with plenty of bread and
water, and more beans.
That night I slept on four chairs in a row near the door. The two
boys were elsewhere in the gloomy darkness within. All through the
night I waged war upon mosquitoes and slapped myself vigorously
for many hours until the guerrilla warfare grew so tiring that sleep
overcame its anxiety. The mosquitoes then nibbled my face to their
hearts' content—if they have hearts, which is doubtful.
In the morning breakfast consisted of stewed beans with plenty of
bread and water, and more beans.
By lunch-time it was still raining, but slower. I stayed to lunch. It
consisted of stewed beans, with plenty of bread and water, and lots
more beans.
In the afternoon the sky cleared, the sun opened his eyes with a
snap and began his work of drying up the roads. Throughout the
day I had employed my time with giving Lizzie an overhaul. I had
the cylinders off, examined the bearings, and tightened things
generally. Meanwhile I discovered that my friends were building a
house on an adjoining field. They were doing the work alone, with
the help of a few friends, who no doubt accounted for the other
partakers of stewed beans. A pile of timber lay in one corner of the
field and the foundations had already been laid and the uprights
erected.
It was well seen that the house was for themselves to live in. Never
have I seen a house grow so quickly or watched the progress of one
so keenly. Moreover the walls were not all out of the vertical or the
windows far from square as one generally gets in home-made
houses (and very often other kinds too!)
"You'd better stay and have something to eat, brother," said mine
host as I was strapping my bag on Lizzie's back in preparation to
depart. "We've only got stewed beans, but they're a mighty
wholesome food."
But I had visions of apricot pie in Pueblo, thirty miles ahead, and
urged my desire to be getting on the road "right now" while the
weather lasted.
They were good folks, those house-builders of Nepesta. Not a cent
would they accept under any circumstances for their hospitality to
me. They worked hard and feared God, and every time they partook
of their frugal meals grace was said beforehand and afterwards as
well, in thanksgiving for the blessings that rewarded their toils. One
could not refrain from comparing the civilization of the West with the
sordid life-scramble of the East.
Once on the road again the despondent sort of gloom that seemed
to surround everything became a thing of the past, as gradually the
Rockies loomed up on the horizon; at first faint and mysterious they
gradually deepened in colour and sharpened in outline. What a
refreshing and soul-inspiring sight after nearly 1,000 miles of travel
across the dusty, dreary, tiring plains!
In the late afternoon a thin cloud of curling black smoke was seen
upon the horizon. This is invariably the forerunner of a western
town. Long before one actually draws near to one's destination, if
that destination be a town, it is discernible sometimes twenty and
even thirty miles away by the tufts and clouds of smoke that hang
over it. The sight is as that of a huge Atlantic liner no more than a
fraction above the horizon. One cannot discern its hidden size or
form, but the smoke from its funnels threads upwards into the
heavens like a sentinel in the engulfing vastness of the sea.
Thus does one approach a town set in the heart of a bewildering
plain. Gradually it is possible to discern here and there a chimney-
stack and sometimes the reflection of a solitary window in one of the
tallest buildings will scintillate on the distant horizon.
The busy town of Pueblo drew nigh. With a rapidly increasing
population of over 50,000 and nearly 300 factories, some of which
are among the largest steel-manufacturing plants in the States,
Pueblo is known as the "Pittsburgh of the West." But let not the
reader be misled by this title into thinking that Pueblo is miserable
and gloomy and odoriferous as is the wont of most towns of its
character. Its streets are wide, clean and well-lit with electric lamps;
its buildings also are clean and of comely architecture; there are no
slums or poverty-stricken quarters, and with the giant mountains
looming in the distance Pueblo is an ideal manufacturing town in
ideal surroundings, besides being the centre of a rich mining district.
From Pueblo, after ministering to the wants of the inner man, I
turned again westward towards Canyon City, some forty miles away
in the heart of the Colorado Rockies, in order to visit the famous
Royal Gorge, known also as the "Grand Canyon of the Arkansas,"
thence to return by a large detour through Colorado Springs,
another Western city like Pueblo, and with perchance a side-trip up
the automobile road that has been cut to the summit of Pike's Peak
(the highest highway in the world), to return to the trail to the south
into New Mexico.
That rise from Pueblo into the Rockies will linger ever in my memory.
Surrounded in all directions but behind with glowering mountain
ranges, the road cut across vast rolling plains and prairies that spoke
of desolation immense and wonderful. As the sun set behind the
mountains they became tinged and fired with every shade of colour,
and darkness slowly crept through the valleys and filled the air with
vague wonder and glorious contentment. In front and slightly to the
right rose Pike's Peak high above its fellows, thrusting its massive
splendour 14,000 feet and more into the ruddy heavens. An eerie
feeling of intense loneliness crept through my veins as mile after
mile was passed through naked prairie in the midst of such awful
surroundings, with never a soul to be seen. I travelled thirty miles
before the chilly breezes and the growing darkness constrained me
to stop. (The headlight was hors de combat; only the "dimmer"
would work.) In all that distance I saw no living thing save the tufted
grass and the black pine-trees peppered over the sides of the
foothills.
When progress was no longer possible, I pulled Lizzie to the side of
the dusty road, propped up her stand, and unfolded my blanket on
the grass of the prairie at her side. Once again I should enjoy the
sweet luxury of Nature's bedchamber in the heart of Nature's best.
But Dame Nature's bedchamber is oft a chilly and inhospitable one,
and despite the invitations she tenders to all who count themselves
her lovers. "Bring your own blankets" is the one stipulation. She will
provide the rest. She will bring the magic sleep, the fairy dreams,
the golden dawn and the thrills of ecstasy as one wakes again fresh
and strong into her lovely world of health and beauty.
From rolling plains we passed to bounding foothills where the road
twisted and turned and crossed torrential streams, spanned by
picturesque stone bridges, until the delightful little town of Florence
was reached. Here came a short stop for breakfast and thence on
again towards Canyon City.
From Canyon City to the Royal Gorge has been built a wonderful
piece of road, winding and climbing into the very heart of Colorado's
rugged bosom. The gradient in places is terrific. Every ounce of
power was sometimes necessary to surmount certain stretches, and
blind S-bends carved from the solid face of the rocks made travelling
a danger as well as a test of skill. At every bend and every turn
some new panorama would spring to view and farther and farther
away would fade the distant horizon of the east. Whither the road
led was impossible to see. Frowning cliffs and wooded crags seemed
to be the only goal ahead. After half an hour of heavy toil we reach
an opening. There is a turn to the left, a flat plateau and a slight dip
down; the trail dies away to nothing and a sign "Royal Gorge" is
announced from a bungalow near its end. The gaunt pine-trees also
end, there is a huge gap in the earth and the plateau beyond is seen
a clear half-mile to the westward. We clamber over the rocks and
boulders, carefully and gently, where the ground has suddenly
stopped, and peering down from the brink we gaze upon a
tremendous cleft in the crust of the earth. Some 3,000 feet below
we see a raging torrent like a huge white snake lashing with a sullen
roar along its tortuous path, hemmed in by vertical walls of cold
relentless granite. The rushing torrent is the Arkansas, a mighty
flood although but a few miles from its source, and the same river
whose bed 700 miles away towards its mouth had afforded such
excellent nocturnal accommodation a week before!
It is as though one is peering into the very bowels of the earth. That
this gigantic chasm has been cut out by that river which now is over
half a mile below seems almost incredible. As we gaze there is
another surprise in store. Like a tiny plaything, a train emerges from
a bend in the cliffs and with little infantile puffs of smoke crawls
along the rails which one now sees running along the narrow river
bank. Clinging close to every twist and turn the train proceeds.
There is scarcely sufficient space between the rugged walls and the
surging river for the single track. At one point the width of the ledge
is but 10 yards and the track has been built out over the water. The
river dashes madly through; the engine sways from side to side as it
drags its heavy load onward. Down there, it is said that the sky
above is but a thread of light and the stars can be seen at midday as
in a mine.
One moves one's gaze and scans the rugged boulders that lie
heaped and stacked and strewn about as if but a push would suffice
to send them hurtling down into the chasm below. Here and there
are stunted growths of sage, cactus and prickly pear, or a giant fir-
tree springs from a grassy cleft in the rocks.
Retracing the trail, we find ourselves soon descending the
precipitous winds and turns that lead back to Canyon City. On the
left we pass "The Famous Sky-line Drive," which announces itself by
placards here and there as "The greatest scenic highway wonder of
the world." But a little distance from here is also "the one-day trip
that bankrupts the English language" and such beauty spots as are
suggested by the names "Hell Gate," "The Frying Pan," "Roaring
Fork," "The Devil's Thousand-Foot Slide," "Cripple Creek," "The
Garden of the Gods," and other similarly euphonious and
onomatopœic appellations.
It would be tempting to explore all these places and to see more of
Colorado and the immense fund of natural beauty which she displays
in endless variety. But impatience draws me again towards Pueblo,
so that I can once again strike the trail that leads to California. I am
already getting anxious to see the blue sea, though yet only half-way
between the oceans!
That afternoon as I paused beneath a "bowser" in Pueblo while
Lizzie was filled to the brim, I inquired the condition of the road to
Trinidad, some 100 miles to the south on the Santa Fé Trail.
"Trinidad? The worst road in America, sir!—ab-sol-oot-ly the worst
road in America, sir."
The prospect was not pleasing. There was certainly an element of
interest about it because it would be fascinating almost to see for
oneself exactly what Americans did consider a bad road. My formula
so far had been that when an American said a road was good, it was
bad. When he said it was bad, it was damn bad! But what would the
"worst" be like?
As I sped along, the sky deepened and a severe thundershower
threatened. Heavy black clouds glowered around the mountain-tops
and every moment I expected a sudden outburst from the heavens.
On my right the Rockies rose higher and higher. In the distance, but
gradually approaching, rose Blanca Peak, a dreadful, ponderous
giant amongst its brethren, its gloomy crest piercing the very vaults
of the sky and hardly visible in the sombre blackness that so often
hangs in the neighbourhood of these western mountain peaks. Now
and again a streak of lightning would flash through the heavens, and
the dull thud that followed, belated and awe-inspiring, would rumble
backwards and forwards along the valleys, reverberating from peak
to peak until finally it was lost in the depths of the firmament.
On the left spread the rolling plains as far as the eye could reach,
like as the sea stretches up to the shores of Dover whence the cliffs
rise sheer and stubborn. In front lay the road, skirting the borderline
twixt plains and peaks.
I soon came to the conclusion that that garage hand in Pueblo had
been "pulling one over me." The road was just splendid. Laid in hard
flat well-made macadam, its surface was excellent, passing all
understanding. As I sped on ever quicker to avoid the gathering
storm, the non-skid pads of the tyres hummed a merry tune. Could I
be on the right road? I asked myself once again. I must be, for in
these parts there is only one road to be taken. No others exist.
There must be a catch in it somewhere, I told myself.
An hour went by and still the thunder rushed around Blanca Peak
the Mighty, now receding from view. An occasional shower just on
the edge of the storm would hasten me on my way. Still the road
was perfection itself, and still it fringed the chain of minor peaks that
runs from north to south, the boundary of the vast plateau of over
1,000,000 square miles that includes, in those unassuming words,
"The Rockies." Another hour flew by.
And then it came, like a thief in the night, sudden and unexpected.
The smooth grey macadam vanished, as though the magic wand
had ceased its power. Instead lay ahead a villainous track in the dark
brown soil of the prairie, a track beaten with sorrow and stricken
with grief, here battered into ugly patches, there heaped into fearful
ridges and seething masses of mud and rock. It had rained. Those
words alone express a world of sin and shame, when one speaks of
a trail "out West." Here once more were the old agonies, the old
discomforts, the old tortures, the old haulings, heavings, pushings,
joltings and bruisings. The sky again became overcast. The rain
began to fall tormentingly. I had still twenty-five miles to go to the
nearest town. The sun sank lower behind the mountain ridge. The
rain fell faster; if I did not reach Walsenburg that night I should have
to rest among the prairie-dogs in the pelting rain. And what chance
was there of reaching Walsenburg before dark with no lights and at
an average of six miles an hour "all out," with only a paltry hour
before dusk?
I will not attempt to describe that ride. I feel it should not be
described. "The ride that bankrupts the English language," indeed,
thought I. Many times I left the road altogether and pursued my
course whither I listed over the rough prairie. Strewn with boulders,
rocks and ugly stones, carved here and there in fantastic shapes,
with mysterious hollows and quaint prairie-dog holes, it was just
possible to scramble along. From a distance the "road" I had left
looked better and I returned to it, only to find that the prairie still
looked more enticing. How I leapt over the smaller stones and
skipped round the larger ones always intent on nothing but the few
yards that were to follow, I shall never completely remember. Again
and again I returned to the road and endured its agony for a spell,
and again I swerved away from it, my every bone shaking in its
joints and my teeth rocking in their sockets with the vibration.
Let me forget. These things are not good to gloat upon! I remember
but one amusing incident, which was but the forerunner of many
more to come. I had returned to the road for a spell. I came to a
slight dip. It was like a lake full of fluid mud where a wayward
stream had swollen with the rains and encroached upon the sanctity
of the road. "Not negotiable" was the unspoken verdict. Strange to
say, the prairie was now fenced off from the road boundary, so there
was no avoiding the coming struggle. "It's got to be done, so here
goes"; slowly I dived into the yellow mass. Just half-way the back
wheel turned to jelly and seemed to crumple up to nothing. With
one big splosh the whole five hundred-weight of us flopped gaily
over into the mire. Pinned down by the weight of the machine, the
mud had ample time to soak through all my clothing, into my
pockets and down my neck. Lizzie's submersion would have been
entire instead of partial had I not intervened.... After a short struggle
I ultimately succeeded in extricating my right foot from between the
brake-pedal and the engine, and heaved the bulky mass from its
repose. No sooner was this done than we slithered once more and
fell over en bloc on the opposite side.
Oh, the joys of motor-cycling in Yankeeland!
I did get to Walsenburg that night. As luck would have it, the two
hotels were full. At least the desk-clerks avowed by the bones of
their saintly grandmothers that there wasn't a room left. Probably
they were moved to anxiety lest their worthy name should be soiled
by this mud-covered intruder!
I found a room after a long search at a fifth-rate "doss-house"
devoid of furniture, where the landlady demanded my money in
advance before giving me the key to my room.
Thus passed another day.
CHAPTER XIII

IN SOUTHERN COLORADO
There is only one road in the States as bad as that from Walsenburg
to Trinidad. I refer to the road from Trinidad to Walsenburg.
In spite of that it was a good road; I got through. It took endless
patience, perseverance and a morning of time to do those fifty
weary miles. The scenery was strange, almost to the point of
weirdness. From the surrounding flatness would rise sudden
plateaus, with dead vertical sides and perfectly flat tops. Even the
hills and mountains where they occurred (save in the distant
Rockies) were modelled on the same plan, rising abruptly from the
plain and ascending in two, three or more sudden steps. The effect
was just as though the land architecture had been entrusted to
some aspiring cubist or futurist instead of to the well-disciplined laws
of Nature.
I do not profess to have attained much learning in the science of
geology, and speak, therefore, as one without authority. But it
seemed to me on many occasions that to study the geology of the
Far West, the English scientist would have to forget all he had ever
learnt about physical geography and start all over again in Southern
Colorado.
At first I was puzzled in the extreme to see how the mountains rose
suddenly out of the great plains, without any warning almost, and
without the customary foot-hills and valleys that one would expect to
see clustering around a mountain range of several thousands of feet
in height. Afterwards I became accustomed to this unusual
formation, when I found that mountains always grow that way in the
Far West, and particularly farther on in New Mexico and Arizona. All
their ranges seemed like elongated "Wrekins" set in a plain of
gigantic dimensions.
At Aguilar, half-way on the road to Trinidad, I met the first really
Mexican town. It will be remembered that all the south-western
States once belonged to Mexico and one by one they have been
ceded or bought or otherwise appropriated until Mexico now is only
a shadow of its former self. Nevertheless a large proportion of the
population is still Mexican, in spite of the continued influx of
American settlers, and consequently Mexican is spoken almost
universally in addition to English as the national tongue.
Trinidad styles itself "The industrial and commercial centre of S. E.
Colorado." With a population of something in the region of 14,000, it
stands at the base of Fisher's Peak (10,000 feet), and it is an
admirable example of the inextricable mixtures of Old Mexico and
New America in the cities of the West. I took its picture and left its
shining well-paved streets to track down my old friend, the Santa Fé
Trail.
I got one mile away from the town and then struck. The trail climbed
rapidly, skirting the Peak all the time in preparation for the Raton
Pass soon to follow, which cuts right over the Rocky Mountains into
New Mexico. That in itself was nothing. I am always game for a
good hill-climb. But I had thought better of the Santa Fé Trail. After
climbing 1,000 feet in just over a mile, it changed into the most
absurd hotch-potch of ruts and mud-heaps that ever eye witnessed,
and this for as far as one could see. The condition of the road
strained my credulity to breaking point. Getting through the far-off
mud-hole at Hume in Indiana was a child's tea-party compared with
this. In half an hour I did just 100 yards and then, after resolutely
determining to return to Trinidad and take the train, I found that to
go back was as much out of the question as to go forward. It simply
couldn't be done single-handed. To turn Lizzie round would require
nothing less than a sky-hook and pulley-blocks.
I left her standing in a huge rut in the middle of the road and
reconnoitred to see how far this appalling state of affairs continued.
Fortunately a Flivver appeared round a bend in the road ahead,
coming in the opposite direction. It heaved and swayed and bumped
and side-slipped and hiccoughed its way along. I watched it until it
finally reached the spot where Lizzie blocked the way. Then
something had to be done. The car had two occupants, both hefty-
looking men, whom I enlisted to my aid. Together we lifted and
pulled and heaved and pushed until the worst was past, and then I
struggled on alone.
Farther into the mountains we travelled; higher and higher we
climbed. In places the trail was hewn out of the rugged mountain
sides, and except in a few places there was hardly room for more
than one vehicle to pass. Occasionally a "washout" would be
encountered where a mountain stream had encroached on the road
and washed it away altogether. Then would come a short detour
over a gap in the bank, with the grassy slope strewn with branches
and small tree-trunks to prevent the unfortunate vehicle sinking in
and thus permanently blocking all progress that way.
The ascent of the Raton Mountains by the Raton Pass is made
amongst some of the most beautiful scenery imaginable. The trail is
only visible a few yards ahead and is lost in sudden twists and turns
as gradually the mountain slopes are devoured. On the right, almost
behind, are still to be seen the famous Spanish Peaks towering like
twins in solitude above the rest of the Sangre de Cristo range, some
forty miles away. Soon we shall be leaving Colorado State behind us
—Colorado the Glorious, the Beautiful, the Great.
It is said that "amongst all the mountain kingdoms, Colorado seems
to stand easily first in physical adornment: not even Switzerland and
her Alps offering more than a fair comparison." Mont Blanc, the
highest peak in the Alps, is 15,784 feet high, while Colorado has
many peaks lacking little of this height. The lowest depths of some
of Colorado's famous parks are higher than the average height of
the Alpine Chain.
Upward we climb, amid thickly-wooded mountain tops, round
thrilling bends and tortuous precipices and over the rockiest of
roads. The end is in sight. A depression in the sky-line ahead shows
where the Raton Pass (7,620 feet to be exact) reaches its highest
point and gazes forwards into the heart of New Mexico and behind
into the vastnesses of Colorado.
A gradual bend, a sudden swerve, and then—the summit is reached.
Colorado is passed. Before us lies a great and thickly-wooded valley,
broad and deep and beautiful. Beyond lie the great plains of New
Mexico, plains so vast that in their utter defiance of limit and
dimension they beggar description. The eye could not follow the
great expanse. So immense were the distances that the earth
merged indefinitely into the sky at the horizon. Dotted and strewn
here and there were hills and mountain ranges that seemed to have
sprung up so suddenly out of the plateau to have really no
connection with them.
Here I stood at the gate of another world. Before me lay a land of
mystery and romance, a land of health for body and soul; a land of
desert and sage-bush, of cactus and strange vegetation; a land of
antiquity unparalleled by any other in the world. Here at my feet lay
New Mexico and beyond, Arizona, the two States that at the same
time are the oldest and the youngest in America. Although only
admitted to the Union in 1912, their history dates from remote ages
when they were peopled by a race unknown to-day but nevertheless
well advanced on the road to civilization, a race that built cities while
Babylon was as yet unknown, and laid down irrigation systems that
puzzle the engineers of the present day.
Arizona and New Mexico, you are the pearls of great price that no
human being has ever yet valued at your true worth. When the day
shall come that man can say of you, "I have seen you in all your
moods and have discovered all your secrets," then this old earth will
be a lifeless, soulless, aimless globe, its purpose fulfilled, its course
completed.
A five mile descent through the scented pine-trees brought me to
Raton, another half-Mexican, half-American town, small but modern
and well-arranged. "No more 'rooming-houses' for me," I resolved
and turned my gaze to the far-distant plains where the darkness was
slowly gathering.
Even in New Mexico, one need never go without a meal. The way to
an Englishman's heart is through his stomach (this applies also to
Americans and most human beings in general!). My heart was
greatly touched by Raton in this manner, and shortly before dusk I
was speeding on my way southwards towards Santa Fé.
Ten miles out the trail crossed a river. It must have been the
Canadian River, a tributary of the Arkansas, which it joins several
hundred miles to the east. The surrounding country was desolation
and solitude itself. Half prairie, half waste, almost desert, it was a
country of new sensations. Just to the west, from horizon to horizon,
stretched the gaunt and rugged Sangre de Cristo range, dark and
threatening always in their aspect. Not a living thing was in sight,
not even a suggestion of life. I ran Lizzie off the road to the brink of
the river and laid down my bed in the silver rays of the rising moon.
At 6.30 in the morning the sky was ruddy and the air pure with the
fresh breezes of the dawn. From minute to minute the myriad
colours of the mountains changed their tints as the sun rose higher
in the Mexican sky. I continued on my way.
The road was broad and good, but a surprise was in store. After a
few miles there appeared a dilapidated signpost where a bedraggled
pathway joined the broad highway through a gap in the fence which
now ran alongside. It bore the legend "To Santa Fé" and pointed
through the fence to the left. My first impression was that some
small boy had been playing pranks. It was inconceivable that these
two ruts but a few inches wide in the coarse green grass should lead
to Santa Fé while there, straight on, was a good broad highroad that
led nowhere. It ran clear ahead and was lost over the brow of a hill.
I never found where that road went. I have never seen it on any
map and have made many inquiries since. Some travellers, like
myself, had seen that road and wavered, but not one had gone that
way and could enlighten me.
New Mexico is not a nice country in which to lose oneself. Towns are
very few, and often one can go a hundred miles without seeing a
village or meeting a soul. So in spite of the temptation I swerved to
the left and entered the field that was without corn or pasture,
following those two ruts that cut deep into the prairie soil and were
not visible more than 50 or 100 yards ahead at the most. In places
the two ruts had become too deep for further use and another pair
had been started at the side, running parallel with the original ones.
When these had worn too far another pair had sprung up, and in
many places I counted eight distinct pairs of ruts running side by
side across the prairie, each representing a distinct phase in the
evolution of the Santa Fé Trail. At any point, if one looks far and long
enough, one can find the original tracks that centuries ago were
formed by the old prairie-schooners as they journeyed westward
across the plains to Santa Fé.
The next town lay far across the plains beyond the horizon. I should
have to hurry if I were to get any breakfast, but the riding was
rough. Tufts of coarse grass and sharp stones covered the prairie
and held back the speed; here and there were the holes of prairie-
dogs, who respect no one in their choice of a site. If it pleases them
to build their front-door entrance where your favourite inter-rut strip
happens to be, well, they build it there. Their holes are generally
about six inches in diameter, the mouth being funnel-shaped.
Passing vehicles smash them in until the opening is sometimes two
or three feet across. Our friend the prairie-dog doesn't mind in the
least. He continues to live there in spite of the traffic and never a
curse escapes his lips. He is a dear little animal. One cannot help
loving him. In stature these animals have the characteristic of both a
squirrel and a rabbit, and are about a foot in length. They sit on
their fat little haunches like a squirrel, but have only a little bobbed
tail like a rabbit. I believe they are the most friendly rodents in
existence, and have the reputation of dwelling in friendship even
with rattlesnakes, who never harm them! If you surprise one when
he is away from home, he watches you, motionless, to see if he has
been seen, if only a few feet from the intruder. And when he sees
that you have seen, away he runs with his head well down and his
little tail well up until he reaches his burrow in the flat prairie. This
done, he considers himself safe, turns round, sits on his haunches
and stares inquiringly at you. But if you dare come too close he
disappears in a second and is seen no more.
One cannot help laughing at the antics of these amusing little
animals as they scamper off like month-old puppy dogs. Ofttimes I
have chased one to his hole in the road and watched the anxious
look on his face as for a brief moment he turns his head before
flashing into the ground below your front wheel. No true traveller
could harm one of these innocent little beasts; they are often his
only companions for hundreds of miles.
Ten, twenty, thirty miles I travelled over the almost trackless prairie.
Occasional mud-pools barred the way, but when the trail was
unfenced, these were easily avoided. Later on fences appeared,
limiting the road from some neighbouring ranch. I judged I was
getting near to Springer.
An old shack of a two-seater car hove in sight, coming in the
opposite direction; I had an opportunity of studying it in detail as it
came close up. Naturally we both stopped. All travellers are friends
in the Far West, where distances are great and people are few.
"Guess you'd better follow us if you want to get to Springer this
week," essayed the driver.
"Why, is there any mud about?"
"Mud? There's a hole down there outside the town that we've been
trying to get either in or out of these two-and-a-half hours. Had to
get some hosses to pull us backwards out of it in the end. Gosh, I've
never seen a mud-hole like it in all my days. We kin get around
another way though, I'm told. Where you headin' for, stranger?"
"Santa Fé."
"Oh, we was expectin' to get to Santa Fé this mornin'. We're bound
for El Paso, and must get there by to-morrow."
I reflected that El Paso was in Texas on the Mexican border, some
500 miles to the south! "Well, if you don't mind, I'll come along to
Santa Fé with you, so then we can each help dig each other out of
any holes that happen along."
"Righto, glad to have your company, but we're not speed merchants
like I guess you are with that 'oss there."
"Don't make any mistake, brother. I passed the speed craze a
thousand miles back. It doesn't pay."
So we retraced our tracks, the car leading. It was shorn entirely of
mudwings and footboards to save the wheels becoming clogged or
the running boards fouling the road. On the back was strapped a
large trunk. This I found is the usual way of travel by "auto" in the
West. Seldom does one see wings on a car that is driven for any
distance from home. Running boards, if present, are generally of an
improvised variety made by planks suspended and fastened in place
by ropes around the body work. Thus the road clearance is
increased and the necessity for constant cleaning removed. By far
the most popular "machine" is the Ford. You can buy one cheap and
sell it as scrap when the journey, if a long one, is finished. Owners of
large expensive touring cars very often have a Ford as well for
emergencies and for long distance travelling. In New Mexico and
Arizona I have seen scores of huge touring cars stuck helplessly in
the road and often abandoned altogether until the seasons permit of
their removal.
I followed my friends from Texas along little pathways and rough
tracks strewn with boulders, through gaps in fences, across fields
and back gardens, all, to my mind, at an alarming pace. It was only
with difficulty that I kept up with them at all, owing to the many ruts
and rocks and other obstructions that are far more hindering to two
wheels than four.
Arrived eventually in Springer, I resolved to postpone the promised
meal until later in the day.
We passed many ranches and crossed many mud-holes, some of
alarming width across. In most I managed to fall off at least once
and wallowed in the mud. Sometimes the car got so far ahead as to
be lost altogether, but after each encounter with a mud-lake I
managed to make up the lost time.
Thus passed nearly thirty miles in which I realized the utter
absurdity of two wheels compared with four. At one place I lost so
much time that I began to give up as hopeless the attempt to keep
up with the car ahead. After all, what was the use? Once out of the
mire, however, the trail became better and turned into loose sand for
many miles.
Over this sand I made good progress. It was now nearly midday,
and I had visions of a meal in Wagonmound, a small village some
twenty miles away. The appetite was there all right, and as I
trimmed off mile after mile at good speed I forgot all about mud-
holes and the like.
All at once the engine burst into a wild roar and Lizzie began to slow
down. What new trouble was this? A broken chain, or something
worse? I stopped as quickly as I could and proceeded to an
examination of the transmission. The chain was all right, but the
engine sprocket had almost come right off the driving shaft. The key
and nut, where were they?
For an hour I searched up and down in the sand and in the grass at
the roadside for the missing parts, but without success. The sun was
almost vertically above and its rays poured down unmercifully from a
cloudless sky. There was not a sign of water or of any living thing in
any direction.
I returned to another examination to discover whether I could
remove a nut from any other part of the machine to replace the
defaulter. Not a nut was there anywhere that at all approached
either the size or the thread required. I searched once more,
wondering in how many days' time another vehicle would pass that
way, and half resolved to walk the next twenty miles.
What! Leave Lizzie and walk! Never!
Another hour elapsed. I had explored all the ruts and searched every
inch of the road for half a mile back. I stopped, and wondered
where I could find water to drink. Water would be even more
acceptable than the nut and key now. I scanned the sun-baked
prairie in all directions. From horizon to horizon there was nothing
but the solitary distant mountains, and here and there a lonely
parched-up hill. Truly a nice outlook! Henceforth I would carry a
water-bag with me.
I decided to return to Lizzie, push her off the road and try walking.
But just to think of coming 3,000 miles in her constant company, and
then having to forsake her! "Poor old Lizzie, she's a dear old crock,"
I murmured to myself.
What was that? I stooped down to see, and there hidden in a crack
in the hard mud was the missing key. That put a different aspect on
matters altogether. The nut would in all probability not be far away. I
set out to explore every stone and every rut and every crack. Sure
enough I found it not very far away.
In a few minutes the midsummer air was whistling past my ears
once again.
In ten minutes I found myself surveying the biggest thing in mud-
lakes that it has ever been my misfortune to negotiate. The road
was fenced in, naturally. There was a ranch on either side of it. The
lake of mud extended sideways to the very borders of the road,
ninety feet wide. The distance across was about fifty yards. I
estimated that the mud and water were waist-deep in the middle.
Ridges and furrows of harder mud, where passing cars had churned
it up, in a desperate attempt to get through, led into the sickly mass
and then were lost.
"This requires a scientist, not a motor-cyclist, to cross," I averred,
and, propping Lizzie upon her stand, went to reconnoitre.
I then created a precedent in the art of crossing mud-holes by which
I benefited on all future occasions. I was wearing water-tight field
boots which came up to my knees. The modus operandi was this: I
would select a likely-looking rut and walk along it as far as I could
without the water coming over the top of my boots. If it came over I
went back and tried another one. This process was repeated until I
had a good idea how the land lay. If I could possibly get through
without the mud reaching my knees, I knew I could get Lizzie
through all right. This manner of prospecting in advance I found
indispensable and at the same time perfectly successful.
I got through somehow, but prayed that I should never meet
another like that.
I rolled into Wagonmound about three in the afternoon a very weary
and mud-stained traveller. When I got there, it started to rain; it
naturally would.
There is but one restaurant in Wagonmound, which enjoys a
population of 200 or so Mexican-Americans. Here I learnt that there
had been a "cloud-burst" near Santa Fé but a few days back; also
that the oldest inhabitants of New Mexico had never known so much
rain to fall as this summer; also that the roads ahead were almost
impassable; also that at one place on the other side of Santa Fé and
at a distance of fifty miles between two towns there were one
hundred cars stranded in the mud and abandoned! I was proof
against it all, however. I considered that by now I could get through
anywhere. I was not to be daunted by fancy yarns and sceptical
reports. Time was when I cursed the Americans for being optimistic
about their roads. That stage had long since been passed. Now I
was proof against even their pessimisms and discouragements.
The rain stopped and I proceeded once more, determined to make a
big effort to reach Santa Fé that night, though still ninety miles
away.
At Wagonmound there was a station of the Santa Fé Railway, which
for a good distance ran close to the trail. I inquired at the "Depot"
what were the chances of travelling on the track. I did not want to
try conclusions with any trans-continental trains if avoidable.
"What! Ride in the track!" ejaculated the line-master. "You can't do
that!"
"Oh, I guess I can if I'm careful," was my response.
"Waal, I jest guess you can't, my friend," was his rejoinder. "I'll have
you arrested if you try to work that stunt."
Argument was useless. "D'ye think I want to damage your bloomin'
old track?" I asked him heatedly after much discussion. We settled
the matter finally by my tendering the information that I would ride
up and down his track all day long if I wanted to (not much fear of
such a desire developing!) and if he liked he could "write to John
Bull about it"!
The humour of the situation was lost upon him.
"You'll get shot," was his reply, whereat we parted.
CHAPTER XIV

NEW MEXICO
I set out from Wagonmound with a light heart and a heavy stomach.
The road ran parallel with the rail for a mile, then crossed over by a
level crossing and continued parallel on the other side. I did not get
far. No doubt there had been unusual rain; great fields were now
lakes with the grass bottom not always visible; little streams,
normally no more than the size of a small spring, were now swollen
rivers. These crossed the road in places. The road was fenced in.
And thereby hangs a tale.
After precisely half an hour I found myself just three miles
advanced, and in the midst of a hopeless chaos of sun-dried
emaciated mud. I had "explored every avenue" of the road, but
found none possible of negotiation. Bit by bit I dragged Lizzie back
and returned to the level-crossing. Come what may I would try the
track. Even if the sleepers shook my very bones to powder it would
be better than eternally forging through the mud of New Mexico.
On each side of the road where it crossed the rails the track was
guarded by a satanic device in the form of spikes and knife-edges
skilfully arranged and extending to a distance of several yards. The
function of these was evidently to prevent cattle and other animals
straying on the line. Traversing these was no easy task. If one did
not ride on top of the spikes, one's tyres wedged in between the
knives. Once past, the rest seemed easy. But things are not what
they seem, especially on railroad tracks. The sleepers were not
ballasted and were anything but level. There was no room outside
the track, for it was steeply banked, and the sleepers projected
beyond the rails into space. At every few hundred yards the track
ran over a brick bridge spanning a bog or a stream. The bridge was
just the width of the rails apart. But when it came to riding—ugh! As
every sleeper was passed, the wheels fell momentarily into the
intervening space between it and the next, and a series of sudden,
sharp shocks was hammered through Lizzie's poor frame as each
sleeper in turn was struck by the front wheel. The faster I went the
quicker and smaller were the shocks, and above a certain speed it
was quite tolerable running.
I was just getting up a comfortable speed when I imagined I heard
the whistle of a locomotive behind. This was discouraging and
certainly unexpected. I stopped quickly and looked back. Sure
enough there was a train coming, but it was easily half a mile away.
To go forward in the hope of out-pacing it would be useless. There
was not even room to get off the track, for once I got down the
steep bank, I knew it would be next to impossible to get back again,
or to get anywhere, for that matter.
Neither was there room to turn round and go back.
More than ever before did it appear to me that discretion was better
than valour.
So I commenced to push Lizzie backwards to the level crossing,
prepared to roll sideways over the bank if I found the train got there
first.
I was just beginning to feel sure about winning the race, and judged
that I should get there with a good hundred yards to spare. I
reached the crossing, but as naturally as one would expect, the back
wheel wedged tight between the knives of the cow-guard.
Would she budge? No.
As I struggled and heaved (I could not look on and see Lizzie go
west in such an absurd fashion), the "California Limited" bore down
upon me. Fortunately American trains do not always go so fast as
they might; at any rate, not so fast as one thinks they should when
one is travelling in them.
With a final desperate lunge, Lizzie yielded to my efforts and came
unstuck. No time was lost in getting out of the way. Fifteen seconds
afterwards the train rolled by at a modest thirty. She had evidently
not got properly under way since her stop at Wagonmound.
I returned to the mud-hole like a smacked puppy with its tail
between its legs, and reflected on what might have been.
But it was no use. I stuck again.
This time I was well armed with refreshments. I had bought six
bottles of a ginger-pop concoction from the last village. I carried one
in each pocket and the other two as reserves, only to be used in
case of great emergency, enveloped in the blanket strapped on the
carrier.
I drank one bottle at the close of every engagement with the road.
But after an hour I was still no farther ahead. I reclined on the bank
and waited for something to turn up.
Fact revealed itself stranger than fiction once more. Something
turned up very speedily. It came in the form of a "Marmon" touring
car, bearing a Californian number-plate. I had taken the precaution,
of course, to leave Lizzie in the right spot, so that no disinclined
passer-by could get through if he wanted to. After all, one musn't
rely on everyone playing the Good Samaritan.

The two occupants of the car were courtesy itself. They not only
assisted me in lifting Lizzie over the pièce de résistance, but also
showed considerable interest in me. Out here, where friendship
between motorists is much more marked (almost as a matter of
necessity), there is seldom any need for anxiety, and it is remarkable
how potent a thing is this roadside courtesy. Practically every town I
stopped at afterwards had heard of the strange traveller who was
Welcome to Our Bookstore - The Ultimate Destination for Book Lovers
Are you passionate about testbank and eager to explore new worlds of
knowledge? At our website, we offer a vast collection of books that
cater to every interest and age group. From classic literature to
specialized publications, self-help books, and children’s stories, we
have it all! Each book is a gateway to new adventures, helping you
expand your knowledge and nourish your soul
Experience Convenient and Enjoyable Book Shopping Our website is more
than just an online bookstore—it’s a bridge connecting readers to the
timeless values of culture and wisdom. With a sleek and user-friendly
interface and a smart search system, you can find your favorite books
quickly and easily. Enjoy special promotions, fast home delivery, and
a seamless shopping experience that saves you time and enhances your
love for reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!

ebooksecure.com

You might also like