SlideShare a Scribd company logo
Your Wish Is My Command: Programming by Example
- eBook PDF download
https://ebooksecure.com/download/your-wish-is-my-command-
programming-by-example-ebook-pdf/
Download full version 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) Your Voice is Your Business: The Science
and Art of Communication, Second Edition
http://ebooksecure.com/product/ebook-pdf-your-voice-is-your-
business-the-science-and-art-of-communication-second-edition/
(eBook PDF) Econometrics by Example 2nd Edition
http://ebooksecure.com/product/ebook-pdf-econometrics-by-
example-2nd-edition/
My Psychology 1st Edition by Andrew M. Pomerantz (eBook
PDF)
http://ebooksecure.com/product/my-psychology-1st-edition-by-
andrew-m-pomerantz-ebook-pdf/
(Original PDF) My Health 3rd Edition by Rebecca J.
Donatelle
http://ebooksecure.com/product/original-pdf-my-health-3rd-
edition-by-rebecca-j-donatelle/
My Revision Notes Edexcel A Level Economics by Quintin
Brewer
http://ebooksecure.com/product/my-revision-notes-edexcel-a-level-
economics-by-quintin-brewer/
Mathematica by Example 5th Edition Martha L. Abell &
James P. Braselton - eBook PDF
https://ebooksecure.com/download/mathematica-by-example-ebook-
pdf/
(eBook PDF) What is this thing called Philosophy? (What
Is This Thing Called?)
http://ebooksecure.com/product/ebook-pdf-what-is-this-thing-
called-philosophy-what-is-this-thing-called/
(Original PDF) Understanding Capitalism: Competition,
Command, and Change 4th Edition
http://ebooksecure.com/product/original-pdf-understanding-
capitalism-competition-command-and-change-4th-edition/
(eBook PDF) What is Psychology 3rd Edition
http://ebooksecure.com/product/ebook-pdf-what-is-psychology-3rd-
edition/
■<*
EDITED BY HENRY LIEBERMAN
YOUR WISH IS MY COMMAND
o
I
'S'
• ^'
: »•
-•J^‘
A; •
.'•I -
^•1
Microsoft UK Technical Learning Centre
.1IIIIIIIIIIIIIIIII
33554000003957
Your Wish
Is My Command
Programming by
Example
The Morgan Kaufmann Series in Interactive Technologies
Series Editors:
■ Stuart Card, Xerox PARC
■ Jonathan Grudin, Microsoft
■ Jakob Nielsen, Nielsen Norman Group
■ Tim Skelly, Design Happy
Your Wish is My Command: Programming by Example
Edited by Henry Lieberman
GUI Bloopers: Don’ts and Do’sfor Software Developers
and Web Designers
Jeff Johnson
Information Visualization: Perception for Design
Colin Ware
Robotsfor Kids: Exploring New Technologiesfor Learning
Edited by Allison Druin and James Hendler
Information Appliances and Beyond: Interaction Design
for Consumer Products
Edited by Eric Bergman
Readings in Information Visualization: Using Vision to Think
Written and edited by Stuart K. Card, Jock D. Mackinlay,
and Ben Shneiderman
The Design ofChildren’s Technology
Edited by Allison Druin
The Usability Engineering Lifecycle: A Practitioner’s Handbook
for User Interface Design
Deborah J. Mayhew
Contextual Design: Defining Customer-Centered Systems
Hugh Beyer and Karen Holtzblatt
Human-Computer Interface Design: Success Stories, Emerging
Methods, and Real World Context
Edited by Marianne Rudisill, Clayton Lewis, Peter P. Poison,
and Timothy D. McKay
Your Wish
Is My Command
Programming by
Example
Edited by
Henry Lieberman
Media Lab
Massachusetts Institute of Technology
MORGAN KAUFMANN PUBLISHERS
AN IMPRINT OF ACADEMIC PRESS
A Harcourt Science and Technology Company
SAN FRANCISCO SAN DIEGO NEW YORK BOSTON
LONDON SYDNEY TOKYO
Executive Editor Diane D. Cerra
Assistant Developmental Editor Marilyn Alan
Publishing Services Manager Scott Norton
Production Editor Howard Severson
Editorial Assistant Mona Buehler
Cover Design Yvo Riezebos
Cover Image Kazuo Kawai / Photonica; Back photo: © 2000 by Webb Chappell
Text Design Rebecca Evans & Associates
Copyeditor Laura Larson
Proofreader Ruth Stevens
Composition & Illustration Technologies ‘N Typography
Indexer Steve Rath
Printer Courier Corporation
The following material is reprinted with permission from Communications ofthe ACM, March 2000, Vol. 43(3):
Smith, D. C., Cypher, A., and Tesler, L. “Novice Programming Comes ofAge,” 75-81; Myers, B. A., McDaniel, R.,
and Wolber, D. “Intelligence in Demonstrational Interfaces,” fig. 3; Reperming, A. and Perrone, C. "Programming
by Analogous Examples,” figs. 3, 4, and 5; St. Amant, R., Lieberman, H., Potter, R., and Zettlemoyer, L. “Visual
Generalization in Programming by Example,” figs. 3 and 4.
Designations used by companies to distinguish their products are often cltumed as trademarks or registered
trademarks. In all instances where Morgan Kaufinann Publishers is aware of a claim, the product names appear in
initial capital or all capital letters. Readers, however, should contact the appropriate companies for more com¬
plete information regarding trademarks and registration.
ACADEMIC PRESS
A Harcourt Science and Technology Company
525 B Street, Suite 1900, San Diego, CA 92101-4495, USA
http://www.academicpress.com
Academic Press
Harcourt Place, 32 Jamestown Road, London NWl 7BY, United Kingdom
http://www.academicpress.com
Morgan Kaufinann Publishers
340 Pine Street, Sixth Floor, San Francisco, CA 94104-3205, USA
http://WWW.mkp.com
© 2001 by Academic Press
All rights reserved
Printed in the United States ofAmerica
05 04 03 02 01 54321
No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any
means—electronic, mechanical, photocopying, recording, or otherwise—without the prior written permission of
the publisher.
Library of Congress Cataloging-in-Publication Data
Your wish is my command : programming by example / Henry Lieberman, editor,
p. cm.
Includes index.
ISBN 1-55860-688-2
1. Computer programming. I. Lieberman, Henry.
QA76.6.Y63 2001
005.2—dc21 00-069638
This book has been printed on acid-free paper.
Foreword
Ben Shneiderman
University of Maryland
Setting an alarm clock is probably the most common form of programming.
Users set a time and then put the clock in alarm mode. Older twelve-hour
mechanical clocks usually had a special alarm hand that could be moved to
the time for the alarm to ring, and then the users turned the alarm switch
on. A nice form of direct manipulation programming—easy to learn and
use.
Direct manipulation is a term I coined in 1981 to describe the visual
world of action in many successful graphical user interfaces such as video
games, air traffic control, and what-you-see-is-what-you-get word proces¬
sors. The principles were to
• represent the objects and actions visually,
• replace typing with pointing and dragging,
• provide rapid, incremental and reversible actions, and
• offer immediate and continuous feedback to users.
These principles can lead to interfaces that help novices and experts, pre¬
vent or at least reduce errors, and encourage exploration because reversibil¬
ity is supported. Designers continue to refine and extend direct manipula¬
tion, but critics complain that direct manipulation only works for limited
tasks. They often ignore the possibility of direct manipulation program¬
ming, which was part of the original conception (Shneiderman 1982, 1983).
To explore the possibilities, we built a direct manipulation programming
tool in 1984-85 that enables users to create macros for MS DOS. This tool.
Direct Manipulation DOS (DMDOS) (Iseki 1986), enabled users to record
and view their actions, and then store and replay macros. We were moti¬
vated by successful macro facilities for Unk, word processors, and spread¬
sheets. These early keyboard-oriented systems led us to joke that “those
who ignore history are destined to retype it.” We were also inspired by
V
vi Foreword
innovative programming by demonstration in David Canfield Smith’s (1977)
Pygmalion, graphical macro facilities in Dan Halbert’s (1984) SmallStar, and
Alan MacDonald’s (1982) early call for visual programming. These pioneers
and other innovators believed in the goal of empowering users to create
useful programs, extend existing interfaces, and build small just-in-time
programs that automated daily tasks.
This important volume carries forward the agenda of making direct ma¬
nipulation programming (or programming by example, programming by
demonstration, end-user programming, programming in the user interface,
etc.) a reality. While there have been successes in the intervening years,
such as programmable machine tools, visual programming languages, and
a variety of macro-building programs, widespread adoption is still elusive.
Henry Lieberman deserves credit for his long devotion to this topic and for
collecting the diverse strategies and application domains in this volume. He
and the contributors to this volume remind us all of the breadth of opportu¬
nities and depth of ambition.
The allure of direct manipulation programming is its capacity to em¬
power users, while minimizing learning of programming concepts. Re¬
searchers continue to seek simple cognitive models for programming that
are in harmony with the cognitive model of the existing user interface. Just
as the programmable mechanical alarm clock is tied to the familiar model
of clock hands, researchers have wanted to build on the visual nature of
graphical user interfaces.
This fundamental human-computer interaction challenge has inspired a
generation of designers, who have come up with innovative strategies for
supporting iteration, conditionals, parameter passing, modular design, pat¬
tern matching, and data representation. This treasure chest of strategies is
likely to pay off in multiple solutions for direct manipulation programming
and related problems. A successful strategy would not only be easy to learn
but also support rapid composition of common programs. Then it would
also be easy to invoke, with comprehensible feedback about successful and
unsuccessful executions.
One strategy represented in this book is to develop software that recog¬
nizes familiar patterns of action and infers a useful program. There may be
some opportunities along this path, but 1 prefer the second path of special
tools for users to create a program, just as they move the special hand of an
alarm clock to set the wake-up time.
A third path, also well represented in this book, is visual programming
languages in which the users set out to write a program, but visually instead
of textually. Visual programming languages may have a simple basis such as
Foreword vii
dragging items from a relational table to a screen-based form to create a re¬
port program. More elaborate visual programming languages have graphic
symbols to represent objects, actions, conditionals, loops, and pattern
matching.
A fourth path might be to add history capture environments for every
interface. Unix command line interfaces had a history log that allowed users
to conveniently review and reuse commands. World Wide Web browsers
support history keeping of page visits with relatively easy review and reuse.
Microsoft Word captures a history of actions to support undo operations,
but users cannot review the history or save it. Adobe Photoshop 5.0 added a
nice history feature for graphic designers, demonstrating that even in com¬
plex environments, rich history support is possible.
Our current efforts with Simulation Processes in a Learning Environ¬
ment have emphasized history keeping, enabling users to review their work,
replay it, annotate it, and send it to peers or mentors for advice (Plaisant
1999). An immediate payoff was that faculty could run the simulation in ex¬
emplary or inappropriate ways and store the histories for students to use as
a training aid.
The story of this field and this book is that there is magic and power in
creating programs by direct manipulation activities, as opposed to writing
code. The potential for users to take control of technology, customize their
experiences, and creatively extend their software tools is compelling.
Eighteenth-century scientists, such as Ben Franklin, experimented with
electricity and found its properties quite amazing. Franklin, Michael Fara¬
day, James Clerk Maxwell, and others laid the foundation for Thomas Edi¬
son’s diverse applications, such as refinements of telegraphy, generators,
and electric lighting. This book brings reports from many Franklins, Fara¬
days, and Maxwells who are laying the foundation for the Thomas Edisons
still to come. It is difficult to tell which idea will trigger broad dissemination
or whose insight will spark a new industry. However, the excitement is
electric.
References
Halbert, Daniel. 1984. Programming by example. Ph.D. diss. University of California,
Berkeley. (Available as Xerox Report OSD-T8402, Palo Alto, CA, 1984.)
Iseki, O. and B. Shneiderman. 1986. Applying direct manipulation concepts: Direct
Manipulation Disk Operating System (DMDOS). ACM SIGSOFT Software Engi¬
neering Notes 11, no. 2 (April): 22-26.
viii Foreword
MacDonald, Alan. 1982. Visual programming. Datamation 28, no. 11 (October): 132-
140.
Plaisant, C., A. Rose, G. Rubloff, R. Salter, and B. Shneiderman. The design of history
mechanisms and their use in collaborative educational simulations. In Proceed¬
ings of the Computer Supported Collaborative Learning Conference (December
1999).
Shneiderman, B. The future of interactive systems and the emergence of direct ma¬
nipulation. Behaviour and Information Technology 1, no. 3 (1982) 237-256.
- 1983. Direct manipulation: A step beyond programming languages. IEEE
Computer 16, no. 8 (August 1983): 57-69.
Smith, D. C. 1977. Pygmalion: A computer program to model and stimulate creative
thought. Basel: Birkhauser.
Contents
Foreword
Color Plates
Introduction
Chapter 1
Chapter 2
Ben Shneiderman
V
following page 192
1
Henry Lieberman
Novice Programming Comes ofAge 7
David Canfield Smith, Allen Cypher, and Larry Tesler
Abstract 8
1.1 Introduction 8
1.2 Programming without a Textual Programming
Language 9
1.3 Theoretical Foundations 11
1.3.1 Sloman’s Approach 13
1.3.2 Bruner’s Approach 15
1.4 Empirical Evidence 16
1.5 Conclusion 18
References 19
Generalizing by Removing Detail: How Any
Program Can Be Created by Working with
Examples 21
Ken Kahn
Abstract 22
2.1 Introduction 22
2.2 A Brief Introduction to ToonTalk 24
2.3 An Example of Programming by Example 26
ix
X Contents
2.4 Discussion 40
2.5 Conclusion 42
Acknowledgements 43
References 43
Chapter 3 Demonstrational Interfaces: Sometimes
You Need a Little Intelligence, Sometimes
You Need a Lot 45
Brad A. Myers and Richard McDaniel
Abstract 46
3.1 Introduction 46
3.2 Our Demonstrational Systems 47
3.3 Level of Intelligence 49
3.3.1 No Inferencing 50
3.3.2 Simple Rule-Based Inferencing 50
3.3.3 Sophisticated AI Algorithms 52
3.4 Feedback 54
3.5 Conclusion 57
Acknowledgements 58
References 58
Chapter 4 Web Browsing by Example 61
Atsushi Sugiura
Abstract 62
4.1 Introduction 62
4.2 Underlying Problems of PBE 63
4.2.1 Problem of Inferring User Intent 63
4.2.2 Problem ofAccessing Internal Data of
Applications 64
4.3 Web Browsing: Good Domain for PBE 64
4.4 Internet Scrapbook 65
4.4.1 Overview of Internet Scrapbook 66
4.4.2 Generating Matching Patterns 67
4.4.3 Extracting Data from Web Pages 70
4.4.4 Evaluation 71
4.5 SmallBrowse: Web-Browsing Interface for Small-
Screen Computers 73
Contents xi
4.5.1 Overview of SmallBrowse 74
4.5.2 Tip Help 80
4.5.3 Informal Experiments 80
4.6 Discussion 81
4.7 Conclusion 83
Appendix: Copying HTML Data from Web Browser
to Scrapbook 84
References 85
Chapter 5 Trainable Information Agents for the Web 87
Mathias Bauer, Dietmar Dengler, and Gabriele Paul
Abstract 88
5.1 Introduction 88
5.2 An Application Scenario 89
5.3 The HyQL Query Language 91
5.3.1 The Construction of Wrappers 94
5.4 The Training Dialogue 96
5.4.1 Wrapper Generation and Assessment 98
5.4.2 Suggesting an Action 100
5.4.3 Executing an Action 101
5.4.4 A Simple Training Dialogue 102
5.5 Lessons Learned 104
5.6 The Communication Problem 105
5.7 Another Application Scenario 109
5.8 Related Work (Non-PBE) 110
5.9 Conclusion 112
Acknowledgments 112
References 113
Chapter 6 End Users and GIS: A Demonstration Is
Worth a Thousand Words 11-
Carol Traynor and Marian G. Williams
Abstract 116
6.1 Introduction 116
6.2 A Story of End Users and GIS 116
6.3 Why Is GIS Software So Hard to Use? 118
6.4 Are Things Improving for GIS Users? 120
xii Contents
6.5 How Can Programming by Demonstration
Help? 121
6.6 A Programming-by-Demonstration Approach for CIS:
C-SPRL 123
6.7 Conclusion 132
Acknowledgements 132
References 132
Chapter 7 Bringing Programming by Demonstration
to CAD Users 135
Patrick Girard
Abstract 136
7.1 Introduction 136
7.2 PBD and CAD 137
7.2.1 CAD: A Suitable Area for PBD 137
7.2.2 Variational and Parametric Solutions 140
7.2.3 Requirements for PBD in CAD 142
7.3 Toward a Complete Solution 143
7.3.1 Classical 2D CAD Systems 143
7.3.2 Specificity and Naming in CAD 145
7.3.3 Expressiveness 149
7.4 True Explicit PBD Solutions 155
7.4.1 Fully Integrated PBD Systems 155
7.4.2 An Actual Programming Environment,
but for Users... 157
7.5 Conclusion 159
References 160
Chapter 8 Demonstrating the Hidden Features that
Make an Application Work 163
Richard McDaniel
Abstract 164
8.1 Introduction 164
8.2 The Perils of Plain Demonstration 165
8.3 Who Is Actually Programming? 166
8.4 Giving the System Hints 167
8.4.1 Creating Special Objects 167
8.4.2 Selecting the Right Behaviors 170
Contents
8.5 The Programming Environment Matters 171
8.6 Conclusion 172
References 174
Chapter 9 A Reporting Tool Using Programming by
Example for Format Designation
Tetsuya Masuishi and Nobuo Takahashi
Abstract 176
9.1 Introduction 176
9.2 System Overview 178
9.2.1 System Configuration 178
9.3 User Interface of Format Editor 179
9.3.1 Window Configuration 179
9.3.2 Specifying Iteration 180
9.3.3 Adjustment 182
9.4 Extracting Formatting Rules 182
9.5 Generating Reports 183
9.6 Example of the Process 183
9.7 Evaluation 187
9.8 Conclusion 190
References 190
Chapter 10 Composition by Example
Toshiyuki Masui
Abstract 192
10.1 Introduction 192
10.2 PBE-Based Text Editing Systems 193
10.3 Dynamic Macro: A PBE-Based Text Editing
System 193
10.4 POBox: A PBE-Based Text Input System 197
10.4.1 Various Text Input Techniques 197
10.4.2 POBox Architecture 200
10.4.3 POBox for Pen-Based Computers 202
10.4.4 Using POBox on a Cellular Phone 204
10.4.5 POBox Server on the Internet 206
10.5 Conclusion 207
References 207
xiv Contents
Chapter 11 Learning Repetitive Text-Editing Procedures
with SMARTedit 209
Tessa Lau, Steven A. Wolfman, Pedro Domingos, and
Daniel S. Weld
Abstract 210
11.1 Introduction 210
11.2 The SMARTedit User Interface 212
11.3 The Smarts behind SMARTedit 215
11.4 Choosing the Most Likely Action 219
11.5 Making SMARTedit a More Intelligent Student 221
11.6 Other Directions for SMARTedit 223
11.7 Comparison with Other Text-Editing PBD
Systems 223
11.8 Conclusion 224
References 225
Chapter 12 Training Agents to Recognize Text
by Example 227
Henry Lieberman, Bonnie A. Nardi, and DavidJ. Wright
Abstract 228
12.1 Text Recognition Agents 228
12.2 Writing Conventional Grammars as Text 230
12.3 Programming Grammars by Example for More
Accessibility 231
12.4 Grammex: A Demonstrational Interface for Grammar
Definition 232
12.5 An Example: Defining a Grammar for Email
Addresses 233
12.5.1 Top-Down Definition 234
12.6 Rule Definitions from Multiple Examples 236
12.6.1 Definition of Recursive Grammar Rules 236
12.6.2 Managing Sets of Rule Definitions 238
12.6.3 Complexity and Scalability 239
12.6.4 Defining Actions by Example 240
12.7 Future Work: Using Grammar Induction to Speed Up
the Definition Process 241
12.8 Related Work 242
Contents XV
Chapter 13
Chapter 14
12.9 Conclusion 243
Acknowledgements 243
References 243
SWYN: A Visual Representation for Regular
Expressions 245
Alan E Blackwell
Abstract 246
13.1 Introduction 246
13.1.1 Factors in the Usability of PBE Systems 247
13.1.2 A Test Case for Visibility in PBE 248
13.1.3 Summary of Objectives 249
13.2 Other PBE Systems for Inferring Regular
Expressions 250
13.3 A User Interface for Creating Regular Expressions
from Examples 251
13.4 A Heuristic Algorithm for Regular Expression
Inference 255
13.4.1 Probabilistic Algorithm 256
13.5 A Visual Notation for Regular Expressions 258
13.5.1 Experiment: Evaluation of Alternative
Representations 259
13.5.2 Method 261
13.5.3 Results 263
13.5.4 Discussion 264
13.6 An Integrated Facility for Regular Expression
Creation 265
13.6.1 Visual Integration with Data 265
13.6.2 Modification of the Regular Expression 266
13.7 Conclusion 267
Acknowledgements 268
References 268
Learning Users’ Habits to Automate
Repetitive Tasks 271
Jean-David Ruvini and Christophe Dony
Abstract 272
14.1 Introduction 272
xvi Contents
14.2 Overview of APE 274
14.2.1 The Observer 276
14.2.2 The Apprentice 277
14.2.3 The Assistant 278
14.3 Illustrative Examples 279
14.3.1 Example 1 279
14.3.2 Example 2 281
14.3.3 Example 3 281
14.3.4 Example 4 284
14.4 Detecting Repetitive Tasks 284
14.4.1 Repetitive Sequences ofActions 284
14.4.2 Loops 284
14.4.3 Writing of Repetitive Pieces of Code 286
14.4.4 Repetitive Corrections of (Simple)
Programming Errors 286
14.5 Learning a User’s Habits 286
14.5.1 What Makes the Problem Difficult? 287
14.5.2 Which Algorithms? 288
14.5.3 A New Algorithm 289
14.6 Use and Experimental Results 290
14.7 Conclusion 293
References 294
Chapter 15 Domain-Independent Programming by
Demonstration in Existing Applications 297
Gordon W. Paynter and Ian H. Witten
Abstract 298
15.1 Introduction 298
15.2 What Familiar Does 300
15.2.1 Arranging Files 301
15.2.2 When Errors Occur 304
15.2.3 Sorting Files 306
15.2.4 Converting Images 309
15.3 Platform Requirements 311
15.4 AppleScript: A Commercial Platform 313
15.4.1 High-Level Event Architectures 313
15.4.2 Deficiencies of the Language 314
15.4.3 Deficiencies of AppleScript
Implementations 316
Contents xvii
Chapter 16
Chapter 17
15.4.4 Learning from AppleScript’s
Shortcomings 317
15.5 Conclusion 318
References 319
Stimulus-Response PBD: Demonstrating
“When” as well as “What” 321
David W. Wolber and Brad A. Myers
Abstract 322
16.1 Introduction 322
16.1.1 PBD: An Elaboration of Macro
Recording 322
16.1.2 PBD Macro Invocation 323
16.1.3 Augmenting the Capabilities of Traditional
Interface Builders 324
16.1.4 A Quick Example 324
16.1.5 Wait a Second! 326
16.2 The Syntax of Stimulus-Response 326
16.2.1 Eliminating Modes 327
16.2.2 Demonstrating Stimuli 328
16.2.3 Demonstrating Responses 334
16.2.4 Demonstrating Aids: Guide Objects and
Ghost Marks 334
16.3 The Semantics of Stimulus-Response 336
16.3.1 Object Descriptor Problem 337
16.3.2 Response Parameter Descriptors 338
16.3.3 Linear Proportions 339
16.3.4 Complex Parameters 340
16.4 Feedback and Editing 340
16.4.1 Storyboards 341
16.4.2 The Stimulus-Response Score 341
16.5 Conclusion 342
References 343
Pavlov: Where PBD Meets Macromedia’s
Director
David Wolber
Abstract 346
xviii Contents
Chapter 18
Chapter 19
17.1 Introduction 346
17.2 Example 346
17.3 Objects that React Asynchronously to Events 347
17.4 Conclusion 349
References 350
Programming by Analogous Examples 351
Alexander Repenning and Corrina Perrone
Abstract 352
18.1 Introduction 352
18.2 The GUI to Program Chasm 354
18.3 Programming by Analogous Examples 356
18.3.1 Making Cars Move Like Trains: An
Analogy 357
18.4 Discussion 360
18.4.1 Beyond Syntactic Rewrite Rules 360
18.4.2 Erom Substitutions to Analogies 363
18.4.3 Reuse through Inheritance 366
18.5 Conclusion 367
Acknowledgements 368
References 368
Visual Generalization in Programming
by Example 371
Robert St. Amant, Henry Lieberman, Richard Potter, and
Luke Zettlemoyer
Abstract 372
19.1 If You Can See It, You Should Be Able to
Program It 372
19.2 What Does Visual Generalization Buy Us? 374
19.3 Low-Level Visual Generalization 376
19.4 High-Level Visual Generalization 378
19.5 Introducing Novel Generalizations:
Generalizing on Grids 381
19.6 Conclusion 383
References 384
Your Wish
Is My Command
Programming by
Example
■ A
.f •i' •■' - •
i ' ♦. i.
f *f
V.
({p I
c, v-’ii. •• ^'
.. ^
. ^ f
^1-#’
Vf » /.j, ,ij’/l<..**.
fiUiax^f ■ --^< 'w^ M -
liS • ?"»>CVA,-' •' “
ri/’t** - *-*.4CcV. • ■ *
•'4) ‘
> “
'; *■
V- :,-» w Itru I
V cS.;;v- ' ^
L:f - »
■ -
»c^ . ‘i^-
.. f , ■ A V
-
y;.
f?» • ^■' ,:JA -■
!lt«
* ^ ’=•*■' #
• ; . . I .
'* •>-■** • , .- / -'V <-
.- ■ •. ■ 1
■J
0v' ^ ,r>-
•H.'
;.v v . .‘-
■■■'** •'f'‘ ' “ - i • •' j ' •■ ■'. *■ '•■
■^'’A- ■■■ '; 'i ■ *.> :
r:— »A ■• ,
-• ■:'
:^<r:
Introduction
Henry Lieberman
Media Laboratory
Massachusetts Institute of Technology
2 Introduction
When I first started to learn about programming (many more years ago
than I care to think about), my idea of how it should work was that it should
be like teaching someone how to perform a task. After all, isn’t the goal of
programming to get the computer to learn some new behavior? And what
better way to teach than by example?
So I imagined that what you would do would be to show the computer
an example of what you wanted it to do, go through it step by step, have the
computer remember all the steps, and then have it try to apply what you
showed it in some new example. I guessed that you’d have to learn some
special instructions that would tell it what would change from example to
example and what would remain the same. But basically, I imagined it
would work by remembering examples you showed it and replaying re¬
membered procedures.
Imagine my shock when I found out how most computer programmers
actually did their work. It wasn’t like that at all. There were these things
called “programming languages’’ that didn’t have much to do with what you
were actually working on. You had to write out all the instructions for the
program in advance, without being able to see what any of them did. How
could you know whether they did what you wanted? If you didn’t get the
syntax exactly right (and who could?), nothing would work. Once you had
the program and you tried it out, if something went wrong, you couldn’t see
what was going on in the program. How could you tell which part of the
program was wrong? Wait a second, I thought, this approach to program¬
ming couldn’t possibly work!
I’m still trying to fix it.
Over the years, a small but dedicated group of researchers who felt the
same way developed a radically different approach to programming, called
programming by example (PBE) or sometimes programming by demonstra¬
tion (the user demonstrates examples to the computer). In this approach,
a software agent records the interactions between the user and a con¬
ventional “direct-manipulation” interface and writes a program that corre¬
sponds to the user’s actions. The agent can then generalize the program so
that it can work in other situations similar to, but not necessarily exactly the
same as, the examples on which it is taught.
It is this generalization capability that makes PBE like macros on ste¬
roids. Conventional macros are limited to playing back exactly the steps re¬
corded and so are brittle because if even the slightest detail of the context
changes, the macro will cease to work. Generalization is the central prob¬
lem of PBE and, ultimately, should enable PBE to completely replace con¬
ventional programming.
Introduction 3
Significantly, the first real commercial market for PBE systems might be
children. Children are not “spoiled” by conventional ideas of programming,
and usability and immediacy of systems for them are paramount. We'll
present two systems that have been recently brought to market and are en¬
joying enthusiastic reception from their initial users. David Smith, Allen
Cypher, and Larry Tesler’s Stagecast Creator, evolved from Apple’s Cocoa/
KidSim, brings rule-based programming by example to a graphical grid
world. Ken Kahn’s ToonTalk, a programming system that is itself a video
game, uses a radically different programming model as well as a radical user
interface. The crucial problem of generalizing examples gets solved in a
simple, almost obvious way—if you remove detail from a program, it be¬
comes more general. Later in the book, we’ll see Alexander Repenning and
Corrina Perrone-Smith’s AgentSheets, which operates in a similar domain
and for a similar audience.
One way in which PBE departs from conventional software is by apply¬
ing new techniques from artificial intelligence (AI) and machine learning.
This approach opens up both a tremendous opportunity and also some
new risks. Brad Myers and Rich McDaniel treat the thorny issue of “How
much intelligence?” from their wide experience in building a variety of PBE
systems.
Of course, we can’t convince people about the value of programming by
example unless we have some good examples of application areas for it!
Next, we move to some application areas that show how PBE can really
make a difference. Everybody’s current favorite application area is the Web.
The Web is a great area for PBE because of the accessibility of a wealth of
knowledge, along with the pressing need for helping the user in organizing,
retrieving, and browsing it. The emerging developments in intelligent
agents can help—but only if users can communicate their requirements
and control the behavior of the agent. PBE is ideal.
Atsushi Sugiura’s Internet Scrapbook automates assembling Web pages
from other Web sources, and he also explores Web browsers on small hand¬
held devices. Mathias Bauer, Dietmar Dengler, and Gabriele Paul present a
mixed initiative system: at each step, either the user or the agent can take
action, cooperating to arrive at a “wrapper” that describes the format of
Web pages.
Carol Traynor and Marian Williams point out the suitability of PBE for
domains that are inherently graphical, such as Geographic Information Sys¬
tems. If you can see it and point to it, you should be able to program it.
PBE lets users see what they are doing, unlike conventional program¬
ming languages, in which graphical data can only be referenced in a
4 Introduction
program by file names and numbers. They illustrate the utility of PBE for
“user-programmers”—those who specialize in the use of a particular appli¬
cation but also, at least occasionally, have the need to resort to program¬
ming. Patrick Girard embeds a PBE system in an industrial-strength com¬
puter-aided design (CAD) application. Designers of mechanical, electrical,
manufacturing, or architectural systems can see the objects they are trying
to design directly. Rich McDaniel moves from static graphics to the dynamic
world of computer games, showing how interaction techniques can also
demonstrate “hidden features” of applications that are not directly reflected
in the graphics that the user will eventually see but are nevertheless crucial.
PBE can automate many common but mundane tasks that tend to con¬
sume a frustratingly large fraction of people’s time. Text editing remains the
application that people spend the greatest amount of time in, and so text
editing applications are the target of the next set of PBE systems we’ll look
at. Tetsuya Masuishi and Nobuo Takahashi use PBE successfully for the
common editing task of generating reports. Toshiyuki Masui’s Dynamic
Macro and PoBox systems use loop detection and a predictive interface
to automate repetitive typing and editing, which can be especially impor¬
tant in minimizing typing in small handheld devices or for users with dis¬
abilities. The systems of Masuishi, Masui, and Sugiura have all been distrib¬
uted to a large user community in Japan. Tessa Lau, Steve Wolfman, Pedro
Domingos, and Dan Weld use the time-honored AI technique of version
spaces to maintain a space of hypotheses about user actions, illustrating the
synergy between work in machine learning and PBE.
Bonnie Nardi, David Wright, and I also put PBE to work for user conve¬
nience, in training text recognition agents to recognize by example com¬
mon patterns of data that occur in the midst of unstructured information.
Their PBE system for developing text recognition grammars, Grammex, was
the first interactive interface of any kind to make the powerful grammar and
parsing technology accessible to end users. Alan Blackwell adds to this gen¬
eral approach a visual syntax for the grammar rules, which he shows in¬
creases user comprehension of the resulting programs.
We shouldn’t forget programming environments themselves as a do¬
main for PBE, even if the programming is done in a conventional write-a-
file-and-compile-it programming environment. Jean-David Ruvini and
Christophe Dony take advantage of the truism that people are creatures
of habit. They have a software agent detect habitual patterns in a conven¬
tional programming language environment, Smalltalk, and automate those
patterns.
Well, if PBE is so great, how come everybody isn’t using it? It’s our hope
that they soon will. But we realize that PBE represents such a radical
Introduction 5
departure from what we now know as “programming” that it is inevitably
going to take a while before it becomes widespread. Despite the existence of
many systems showing the feasibility of PBE in a wide variety of domains,
conservatism of the programming community still seems the biggest
obstacle.
Signs are growing, however, that PBE might just be beginning to catch
on. Commercial PBE environments are beginning to appear, such as the
children’s PBE environments cited earlier that are now on the market. But it
also makes sense to view more conventional user-programming facilities,
such as so-called “interface builders,” macros, and scripting systems, as the
“poor man’s programming by example.” Some of these facilities are begin¬
ning to evolve in directions that may incorporate elements of the PBE ap¬
proach. We also will need conventional applications to become more “PBE-
friendly” so that PBE systems can use the conventional applications as tools
in the same way that a user would operate them manually. Gordon Paynter
and Ian Witten show how we might be able to leverage scripting language
and macro capabilities that are already present or on the way for applica¬
tions into full-blown PBE systems. This might facilitate an adoption path
for PBE.
In programming, as in theater, timing is everything. Much of the work in
PBE is involved with demonstrating how to do something, but equally im¬
portant is when to do it. David Wolber and Brad Myers explore what they
call “stimulus-response” PBE, in which we generalize on time and user in¬
put, to assure that PBE-programmed procedures are invoked at just the
right time. Wolber also compares his PBE animation system to a conven¬
tional animation editor/scripting system. Macromind Director, which
brings the similarities and differences of PBE versus conventional applica¬
tions into sharp focus.
We then move on to explore some directions where PBE might be head¬
ing in the future. Alexander Repenning and Corinna Perrone-Smith show
how we can take PBE a step further, using another important intuitive cog¬
nitive mechanism—analogy. We often explain new examples by way of
analogy with things we already know, thus allowing us to transfer and reuse
old knowledge. Repenning and Perrone-Smith show how we can use anal¬
ogy mechanisms to edit programs by example as well as create them from
scratch.
Robert St. Amant, Luke Zettlemoyer, Richard Potter, and I explore what
at first might seem like a crazy approach. We actually have the computer
simulate the user’s visual system in interpreting images on the screen rather
than accessing the underlying data. Though it may seem inefficient, it
neatly sidesteps one of the thorniest problems for PBE: coexistence with
6 Introduction
conventional applications. The approach enables “visual generalization”—
generalizing on how things appear on the screen, as well as properties of
the data.
Programming by example is one of the few technologies that holds the
potential of breaking down the wall that now separates programmers from
users. It can give ordinary users the ability to write programs while still op¬
erating in the familiar user interface. Users are now at the mercy of soft¬
ware providers who deliver shrink-wrapped, one-size-fits-all, unmodifiable
“applications.” With PBE, users could create personalized solutions to one-
of-a-kind problems, modifying existing programs and creating new ones,
without going through the arcane voodoo that characterizes conventional
programming. In this collection of articles, we hope that the diversity of sys¬
tems presented, compelling user scenarios, and promising directions for
the future of PBE will convincingly demonstrate the power and potential of
this exciting technology.
Acknowledgements
I’d like to give special thanks to Andy Rosenbloom at ACM for giving me
the impetus to get started on this project. Diane Cerra, Marilyn Alan, and
Howard Severson at Morgan Kauffman were helpful throughout the publi¬
cation process.
I’d also like to extend personal thanks to Christopher Fry, Suzanne
Hanser, Walt Lieberman, Cindy Mason, Pattie Maes, Joanie Morris, Liz
Rosenzweig, Sybil Shearin, Ted Selker, and Jim Youll. And a special thanks to
the contributors to this book, who are all terrific examples of friends and
colleagues.
About the Web Site
Some of the book’s color figures appear in the color insert following
page 192. You can also view all of the book’s full-color figures at Morgan
Kaufmann’s Your Wish Is My Command Web site at http://www.mkp.com/
your_wish/.
Chapter
Novice Programming
Comes ofAge
David Canfield Smith
Stagecast Software, Inc.
Allen Cypher
Stagecast Software, Inc.
Larry Tesler
Stagecast Software, Inc.
8 Chapter One Novice Programming Comes of Age
Abstract
Since the late 1960s, programming language designers have been trying to
develop approaches to programming computers that would succeed with
novices. None has gained widespread acceptance. We have taken a different
approach. We eliminate traditional programming languages in favor of a
combination of two other technologies: programming by demonstration
(PBD) and visual before-after rules. Our approach is now available as a
product named Stagecast Creator, which was introduced in March 1999. It
is one of the first commercial uses of PBD. Stagecast Creator enables even
children to create their own interactive stories, games, and simulations.
Here, we describe our approach, offer independent evidence that it works
for novices, and discuss why it works when other approaches haven’t and,
more important, can’t.
1 • 1 Introduction
The computer is the most powerful tool ever devised for processing infor¬
mation, promising to make people’s lives richer (in several senses). But
much of this potential is unrealized. Today, the only way most people are
able to interact with computers is through programs (applications) written
by other people. This limited interaction represents a myopic and Procrus¬
tean view of computers, like Alice looking at the garden in Wonderland
through a keyhole. Until people can program computers themselves, they’ll
be able to exploit only a fraction of a computer’s power.
The limits of conventional interaction have long motivated researchers
in end-user programming. An end user in this context uses a computer but
has never taken a programming class—a definition describing the vast ma¬
jority of computer users. We use the term novice programmer to describe
end users who want to program computers. Is novice programmer an oxy¬
moron? Is it a reasonable goal? Certainly there are “novice document writ¬
ers,” “novice spreadsheet modelers,” and even “novice Internet surfers.” But
in more than thirty years of trying, no one has come up with an approach
that enables novices to program computers. Elliot Soloway, director of the
Highly Interactive Computing Project at the University of Michigan, esti¬
mates that even for novices who do take a programming class, less than 1
percent continue to program when the class ends. We’ll explore the reasons
for this, but first we explore our own new approach to programming that
seems to work for novices.
1.2 Programming without a Textual Programming Language 9
Stagecast Creator, a novice programming system for constructing simu¬
lations from Stagecast Software, Inc., founded by the authors and others
in 1997, is the culmination of a seven-year research and development effort,
the first five at Apple Computer (Smith, Cypher, and Spohrer 1994; Cypher
and Smith 1995; Smith and Cypher 1995; Smith, Cypher, and Schmucker
1996). The project, initially called KidSim, was later renamed Cocoa, and
finally became Creator. The goal was to make computers more useful in ed¬
ucation. The co-inventors of Creator—the authors Smith and Cypher—de¬
cided to focus on simulations because simulations are a powerful teaching
tool. They can make abstract ideas concrete and understandable. Interac¬
tion with them is unstructured and explanatory in nature. Students can
conduct experiments. They can formulate hypotheses as to what will hap¬
pen, then run a simulation and observe the results (the scientific method).
When their hypotheses are refuted, students really get engaged. They lean
toward the monitor and begin talking animatedly with each other. Even
better, v^th Creator children learn by building simulations, encouraging the
constructivist approach to learning. Children learn sequential, causal rea¬
soning. In view of this potential, the goal of the Creator project evolved into
empowering end users (teachers and students) to construct and modify
simulations through programming.
Our initial approach was much like that of other language developers: to
invent a programming language that would be acceptable to end users. We
tried a variety of syntaxes; all failed dismally. That experience, together with
the history of programming languages during the past thirty years—from
Basic to Pascal, from Logo to Smalltalk, from HyperTalk to Lingo—con¬
vinced us we could never come up with a language that would work for
novices.
Our first insight was that language itself is the problem and that any tex¬
tual computer language represents an inherent barrier to user understand¬
ing. Learning a new language is difficult for most people. Consider the years
of study required to learn a foreign language, and such languages are natu¬
ral languages. A programming language is an artificial language that deals
with the arcane world of algorithms and data structures. We concluded that
no conventional programming language would ever be widely accepted by
end users.
1 .2 Programming without a Textual Programming Language
How can a computer be programmed without a textual programming
language? Our solution combined two existing techniques: PBD and visual
10 Chapter One Novice Programming Comes of Age
before-after rules. In PBD, users demonstrate algorithms to the computer
by operating the computer’s interface just as they would if they weren’t pro¬
gramming. The computer records the user’s actions and can reexecute them
later on different inputs. PBD’s most important characteristic is that every¬
one can do it. PBD is not much different from or more difficult than using
the computer normally. This characteristic led us to consider PBD as an al¬
ternative approach to syntactic languages.
A problem with PBD has always been how to represent a recorded pro¬
gram to users. It’s no good allowing users to create a program easily and
then require them to learn a difficult syntactic language to view and modify
it, as vdth most PBD systems. In Creator, we first sought to show the re¬
corded program by representing each step in some form, either graphically
or textually. Some of the representations were, in our opinion, elegant, but
all tested terribly. Children would almost visibly shrink from their complex¬
ity. We eventually concluded that no one wanted to see all the steps; they
were just too complicated.
Our second insight was not to represent each step in a program; instead.
Creator displays only the beginning and ending states. Creator does in fact
have a syntax—the lists of tests and actions in a rule—but people can create
programs for a long time without even being aware of this syntax. This fea¬
ture is dramatically different from conventional languages, in which users
must know whether a routine is called “move” or “go,” the order of the pa¬
rameters, and where all the various quotation marks, semicolons, and pa¬
rentheses belong.
As an example of the Creator approach, suppose we want the engine of a
train simulation to move to the right. We move the engine by defining a vi¬
sual before-after rule for the engine. Rules are the Creator equivalent of
subroutines in other languages. Each rule represents an arbitrary number of
primitive operations, or statements in other languages. Visually, Creator
shows a picture of a small portion of the simulation on the left, then an ar¬
row, and then a picture of what we want the simulation to look like after the
rule executes. Figure 1.1 shows the interactive, visual process of creating a
rule by demonstration.
First, we define the initial rule. Notice that the left and right sides start
out the same; all rules begin as identity transformations. Users define the
behavior of the rule by demonstrating changes to the right side. Here, we
grab the engine with the mouse and drag it to the right. When we drop
the engine, it snaps to the grid square it is over. That’s all there is to it. No¬
where did we type beg in-end, if-then-else, semicolons, parenthe¬
ses, or any other language syntax. The rule we just created may be read as
follows:
1.3 Theoretical Foundations 11
Figure
Define
Drag
Drop
Defining a rule by demonstration.
If the engine is on a piece of straight track and there is straight track to its
right, then move the engine to the right.
Notice that programming is kept in domain terms, such as engines and
track, rather than in computer terms, such as arrays and vectors. Also, in¬
stead of dealing with objects indirectly through coordinates, users program
them by manipulating them directly; that is PBD (see Table 1.1).
Since a rule in Creator may not show all the steps involved, just their be¬
ginning and ending states, it is not a representation for the steps, suggesting
instead the ejfect of the rule. The rule acts as a memory jogger for users.
This turned out to be the key technique in Creator for helping users under¬
stand recorded programs, even those written by others.
A similar commercial software development system called AgentSheets,
developed by Alexander Repenning (1993) at the University of Colorado in
Boulder, also uses visual before-after rules (see Chapter 18, “Programming
by Analogous Examples,” which also gives an example using a train). A
delightful system, it is the closest to Creator of any software system we
know of.
1 .3 Theoretical Foundations
Why does Creator’s approach to programming apparently work where syn¬
tactic languages don’t? We hinted at the answer earlier. An essential
12 Chapter One Novice Programming Comes of Age
Table 1,1
Examples ofthe kinds ofoperations that can be recorded by demonstration.
Operation What the user does What the computer records
Move Drag an object with the mouse
Create Drag an object from the Character
Drawer into the rule
Delete Select an object by clicking on it
and press the Delete key
Set Variable Double-click on an object to dis¬
play its variables, select a variable’s
value, and type a new value
Move <object> to <location>
Create <object> at <location>
Delete < object>
Put <value> into <object>’s <variable>
ingredient is certainly the PBD technique, which eliminates the need for
any syntactic language during program construction. The technique of us¬
ing visual before-after rules finishes the job, eliminating the need for any
syntactic language for program representation. But why would these two
techniques be acceptable to the typical novice programmer? The answer is
interesting, illustrating why traditional approaches haven’t and, more im¬
portant, can’t work.
The main problem novice programmers have when programming com¬
puters is the gap between the representations the brain uses when thinking
about a problem and the representations a computer will accept. “For nov¬
ices, this gap is as wide as the Grand Canyon,” as Don Norman documented
in his 1986 book User Centered System Design (see Figure 1.2). He argued
that there are only two ways to bridge the gap: move the user closer to the
system or move the system closer to the user. Programming classes try to
do the former. Students are asked to learn to think like a computer. This
radical refocusing of the mind’s eye is difficult for most people. Even if they
learn to do it, they don’t like where they end up. They don’t want to think
like a computer; they want to use computers to accomplish tasks they con¬
sider meaningful.
In Creator, we’ve tried to do the opposite of what programming classes
do—we want to bring the system closer to the user. We did this by making
the representations used when programming the computer more like the
representations used in the human brain. To do this, we needed a theory of
the brain’s representations that would be helpful to us. We found two: one
developed by Aaron Sloman, the other by Jerome Bruner.
1.3 Theoretical Foundations 13
*%
Figure 1,2
The “Grand Canyon” gap between human and computer.
1.3.1 Sloman’s Approach
In 1971, Aaron Sloman divided representations into two general types; ana¬
logical and “Fregean,” after Gottlob Frege, the inventor of predicate calcu¬
lus. In an analogical representation, Sloman wrote, “the structure of the rep¬
resentation gives information about the structure of what is represented”
(Sloman 1971, 273). A map is an example; from a map, one can tell the rela¬
tionships between streets, the distance between two points, the locations of
landmarks, and which way to turn when one comes to an intersection.
By contrast, Sloman (1971) wrote:
In a Fregean system there is basically only one type of “expressive” relation
between parts of a configuration, namely the relation between “function-
signs” and “argument-signs.” . . . The structure of such a configuration need
not correspond to the structure of what it represents or denotes, (p. 273)
We can, for example, represent some of the information in a map through
predicate calculus statements, such as
g: “Gravesend”
u: "UnionVille”
m: “Manhattan Beach”
s: “Sheepshead Bay”
East(g, u)
EastSouthEast(s, g)
South(m, s)
Chapter One Novice Programming Comes ofAge
Sloman goes on to say:
The generality of Fregean systems may account for the extraordinary rich¬
ness of human thought. ... It may also account for our ability to think and
reason about complex states of affairs involving many different kinds of ob¬
jects and relations at once. The price of this generality is the need to invent
complex heuristic procedures for dealing efficiently with specific problem-
domains. It seems, therefore, that for a frequently encountered problem do¬
main, it may be advantageous to use a more specialized mode of representa¬
tion richer in problem-solving power. (Sloman 1971, 274)
Most programming languages use Fregean representations, aiming to be
general and powerful. Creator emphasizes ease of use over generality and
power, and so it has adopted analogical representations. Although Creator
is “Turing-equivalent,” meaning it can compute anything, it addresses only
the specialized problem domain of visual simulations. It doesn’t try to do
everything well but is very good at what it does. A better way to describe it
than Turing-equivalent may he “PacMan-equivalent.” Creator is powerful
enough to let kids program the game PacMan. That’s all we’re trying to do.
Creator uses analogical representations in its rules. For example, a rule
for moving a train engine, as shown in Figure 1.1, can do the same thing as
Fregean FlyperTalk code, which can include dozens of arcane commands,
as in the following list which goes on for another seventy lines. It is obvious
which is easier to understand.
on runTrain
global AutoSwitch,BtnIconName,PrevBtnlconName
global Dir,PrevDir,LastLoc,Prev Logs,LookAhead ,
TheNextMove
global LastMoveTime,SoundOff,MoveWait,Stag1ng,
TheStage,TheEngine
global TheMoves,Choices,Counter,Enginelcon.XEoc
-This routine is long.
-Most of the code is inline for acceptable speed
lock screen
setup!rain
unlock screen
repeat
-check user action often
if the mouseClick then checkOnThings the clickEoc
-get iconName of current position
1.3 Theoretical Foundations 15
put iconName(i con of cd btn LookAhead) into
BtnIconName
if the number of items in BtnIconName > 1 then
put “True” into Staging
if TheStage = 0 then put BtnIconName into
PrevBtnIconName
if BtnIconName contains “roadXing” then put
LookAhead into XLoc
if BtnIconName contains “Rotatetrain” then put 1
into TheStage
end if
if the mousedick then checkOnThings the clickLoc
put LastLoc & return before PrevLocs
put LookAhead into LastLoc
put Dir & return before PrevDir
if the mouseClick then checkOnThings the clickLoc
add 1 to Counter
1.3.2 Bruner's Approach
In 1966, the educational psychologist Jerome Bruner (1966) asserted that
any domain of knowledge can be represented in three ways:
• “By a set of actions appropriate for achieving a certain result (‘enactive’
representation). We know many things for which we have no imagery
and no words, and they are very hard to teach to anybody by the use of
either words or diagrams and pictures.” For example, you can’t learn to
swim by reading a book.
• “By a set of summary images or graphics that stand for a concept with¬
out defining it fully {‘iconic’ representation).” For example, children
learn what a horse is by seeing pictures of horses or actual living horses.
• “By a set of symbolic or logical propositions drawn from a symbolic sys¬
tem that is governed by rules or laws for forming and transforming prop¬
ositions (‘symbolic’ representation).”
The first two ways are analogical representations: the third is Fregean.
Jean Piaget, the noted Swiss psychologist best known for his work in the
developmental stages of children, believed that children grow out of their
Chapter One Novice Programming Comes ofAge
early enactive and iconic mentalities and that becoming an adult means
learning to think symbolically. By contrast, Bruner recommends encourag¬
ing children to retain and use all three mentalities—enactive, iconic, and
symbolic—when solving problems. All three are valuable in creative
thinking.
Creator seeks to involve all three mentalities in programming. The
enactive mentality is involved in PBD when users manipulate images di-
recdy; drag-and-drop functions are enactive. The iconic mentality is in¬
volved in visual before-after rules and the domain of visual simulations.
Finally, the symbolic mentality is involved in Creator’s use of variables,
which can help model deeper semantics in simulations. For example, pred-
ator-prey-type simulations can be modeled through variables.
1 Empirical Evidence
We’ve also gathered evidence that the Creator approach to programming
works with novices. This evidence has taken three forms: informal observa¬
tion, formal user studies, and anecdotal user reports.
Teachers and parents have used versions of Creator for years. We and
our associates conducted hundreds of hours of direct tests on children and
adults for the past five years, most on children ages six to twelve in school
settings.
We implemented three computer prototypes of Creator, each smaller
and faster and closer to product quality than the previous one, testing each
on progressively larger audiences of novice users, and the final prototype—
Cocoa—to an audience of hundreds of novice users. We distributed Cocoa
through the Internet, just as we have with Creator, but our most impor¬
tant source of information was longitudinal studies in several elementary
school classrooms in California. Teachers integrated the prototypes into
year-long curriculums designed to improve their students’ problem-solving
skills. They contrived problems that required programming for their solu¬
tions; for example, one had her class program ocean science simulations.
Our most gratifying success was when in June the students in one class
asked to extend the school year so they could continue to work on their
simulations. For the first six weeks of vacation, a third of the class continued
to come to school once a week to program. The surprising thing is not that
two-thirds of the children decided not to participate but that any of them
wanted to keep coming to school during summer vacation. These kids did
not find programming an onerous task.
1.4 Empirical Evidence 17
Figure
Alien Abduction.
Independent researchers at several universities in the United States and
England conducted formal user studies of the Creator prototypes KidSim
and Cocoa (Gilmore et al. 1995; Brand and Rader 1996; Sharpies 1996;
Rader, Brand, and Lewis 1997). While each identified areas for improve¬
ment, all answered affirmatively what we consider the two most important
questions; Can kids program with this approach? Do they enjoy it?
The studies found that within fifteen minutes, most novice-user chil¬
dren were able to create running simulations with moving interacting ob¬
jects. The studies found no gender bias; girls and boys enjoy Creator
equally. The studies also suggest that the technology is usable by novices
and is flexible enough for implementing a variety of ideas.
One of our early concerns was whether Creator would have enduring
interest for children. WeVe now heard from some users and their parents
and teachers that it does. For example, in Cedar Rapids, Iowa, Steve Strong,
who teaches computer programming to students ages fourteen to seven¬
teen, lets each one choose the language he or she would like to learn, in¬
cluding C, Java, and Creator. Since adding Creator to the curriculum, he
reports that as many girls as boys now take his course; students who
use Creator have well-developed projects to show at the end of the class,
whereas those using traditional languages typically have only a small part of
their project implemented. Moreover, students learning Creator first and
other languages later are better programmers than those who go directly to
a traditional language.
18 Chapter One Novice Programming Comes of Age
Figure
Olivia’s Owl.
Figure 1.3 shows a hilarious game created by a twelve-year-old boy in
which a spaceship beams up cows. A user controls the ship’s direction with
the arrow keys and the beam with the space bar. The goal is to beam up all
the cows. Because of the high-level nature of the Creator rules, this game re¬
quired only thirteen rules to implement.
Figure 1.4 shows a model created by an eleven-year-old girl of the way
owls hunt mice in winter, when mice dig tunnels under the snow. But the
owl had better watch out, because a wolf wants to eat it. The player controls
the owl with the keyboard’s arrow keys. The trick is to drop the owl on the
mouse just as it passes under its claws. The goal is to catch five mice with¬
out getting eaten yourself. This game (actually two games in one) required
fifty-seven rules.
1 • 5 Conclusion
Early evidence suggests the approach to programming being pioneered by
Creator is more acceptable to novice programmers than traditional ap¬
proaches. Creator uses PBD, which is inherently enactive and iconic, for
program construction. It also uses an analogical representation—visual be¬
fore-after rules—for its programs. The programming domain is limited to
visual simulations, helping Creator bring the system closer to the user. In
summary. Creator shifts the language design emphasis from computer sci¬
ence to human factors.
References 19
References
Brand, C., and C. Rader. 1996. How does a visual simulation program support stu¬
dents creating science models? In Proceedings of IEEE Symposium on Visual
Languages (Boulder, Colo., Sept. 3-6). Los Alamitos, Calif.: IEEE Computer Soci¬
ety Press.
Bruner, J. 1966. Toward a theory ofinstruction. Cambridge: Harvard University Press.
Cypher, A., and D. Smith. 1995. KidSim: End user programming of simulations. In
Proceedings ofCHESS (Denver, Colo., May 7-11). New York: ACM Press.
Gilmore, D., K. Pheasey, J. Underwood, and G. Underwood. 1995. Learning graphi¬
cal programming: An evaluation of KidSim. In Proceedings of Interact 95
(Lillehammer, Norway, June 25-30). London: Chapman & Hall.
Norman, D. 1986. Cognitive engineering. In User centered system design: New per¬
spectives on human-computer interaction, ed. D. Norman and S. Draper.
Hillsdale, N.J.: Erlbaum.
Rader, C., C. Brand, and C. Lewis. 1997. Degrees of comprehension: Children’s men¬
tal models of a visual programming environment. In Proceedings of CHI’97 (At¬
lanta, Ga.). New York: ACM Press.
Repenning, A. 1993. AgentSheets: A tool for building domain-oriented dynamic
visual environments. Ph.D. diss. University of Colorado, Boulder; see www.
agentsheets.com.
Sharpies, M. 1996. How far does KidSim meet its designers’ objectives of allow¬
ing children of all ages to construct and modify symbolic simulation? Report of
the School of Cognitive and Computing Sciences, University of Sussex, Palmer,
Brighton, England.
Sloman, A. 1971. Interactions between philosophy and artificial intelligence: The
role of intuition and non-logical reasoning in intelligence. In Proceedings of the
2nd International Joint Conference on Artijicial Intelligence (London). San Fran¬
cisco: Morgan Kaufmann.
Smith, D., and A. Cypher. 1995. KidSim: Child-constructible simulations. In Proceed¬
ings ofimagina '95 (Monte Carlo, Feb. 1-3). Institut National de I’Audiovisuel.
Smith, D., A. Cypher, and K. Schmucker. 1996. Making programming easier for
children. In The design of children’s technology, ed. A. Druin. San Francisco:
Morgan Kaufmann. See also Interactions ofACM 3, no. 5 (September-October
1996): 58-67.
Smith, D., A. Cypher, and J. Spohrer. 1994. KidSim: Programming agents without a
programming language. Common. ACM37, no. 7 (July): 54-67.
- 4
* I
in • -, J
. ,v »J
kr
;.i
•I t
>■ ■•
......
^ I *
y- ■ K. ' : »♦ .
»»Sj| ?tf.-.
■,‘>7.;-ti^ ’.i. •
f*V ,
.>4^^
*.
*irvv
1.'^
-■
S*j»**^/fi.T'f " -.^ n^/ it.. »».■*»<-J'»' '*'J Ifit'
t*^ii*6 <'^..*<MV'> >-ir-'.i*; i V :»■ ■'*-ti.;'
W.n-'.i'S , , ♦; ; »-«► x 4,: :' iii#»ir^*)
^-V.^ Vjfcfc^5^4-: jttMj;; 'x-”*r¥
■ * ^ • ..«/Sr5 •
■o'f<i ♦’n3iL»f^>'m^4;|^*v« , ,•> i*.***#^^ ^, ■ ■ t ■ 1
^3*ii •■' *.--?^tt-*,»v. ,.-. *> ii- »■' t‘ >
. iv
-O' *■
■»' '..• 1^
S ’‘i. .Mf
?.*■ •/ '‘iv
• '.->t ••
?l li ’fcK
•Vi''4i *■- io ■/i'f'^'^*'-V »,j'?>---.t‘‘^.'''>^S<'*i,V*i'$)JtV'»‘' ^r.. - t-R . ij* *•)■-" ■.*#•*•
<».) tA ■•_ dC^ •'.%*^ ■''• "Vv ’*
' ,- i<. tr 1 '.I t'.- i_ .-4*' ■ j';y ^ < ! V,
.-.It** ‘-*.« ■ -t'.. vJ^-i> ...«•, .. ^
♦ v'Vj -r ^a-.'?-;''- ■*.:^-<-:<^*v^'f
i • . *• A^rV- - I'if ■ • .!_''•'< fV.-
' * ■' ^ .‘m'' 0^)1^
* F mJ^‘ ' "'“ “O • ' '
*vurt^3-j'.0« I ,vvv* .j&.- V .1 .J.. ;.• » .^-fa^'ii^.^-mff^r. -. ,f ,'
„(4, ,,x. ,; ... : .|i,^'jj.^/,T'^ , %i,.i-4.:fV: .' >■
n-y.' ...-^ '*vf i.'v.v'I V-. "jp.4s, 4m ' ■
t*t. m.x *s*A I i
"t.W'T
ry!!. ‘ -•.. iit*.
4 i-e
*.L
-•*.'' * ‘t j, l>*.*
f‘ •
^®*i(ar'•>< ^ fo|i'.4» >•♦. ..%•. f...-i‘i^f’k .?•‘Vi ’ ^v . ^■... _j. •
* .... :-■ ,'' . XiC.p.^v s : ;ii-.a*M‘' >* ■
- *,.' r *4 • •' ■ ■'ii Jc
"trO:. . ,«* ;
■i/i?it il- __ "
1 'liJ >1
Oi «
>s
Chapter
Generalizing by
Removing Detail:
How Any Program Can Be
Created by Working
with Examples
KEN Kahn
Animated Programs
Chapter Two Generalizing by Removing Detail
Abstract
A long-standing goal of the programming by demonstration research com¬
munity is to enable people to construct programs by showing how the
desired programs should work on sample inputs. A major challenge is how
to make the programs general. Heuristics and inference can generalize re¬
corded actions on sample data in narrow domains but have yet to be much
help in general-purpose programming. This chapter describes a program-
ming system called ToonTalk (Kahn 1996, 2001) that takes a different ap¬
proach. In ToonTalk the programmer generalizes recorded actions by ex¬
plicitly removing details. Children as young as six have constructed a wide
variety of programs in this manner (Playground 2001).
2 • 1 Introduction
There is a very important interplay between the way in which pro¬
grams are created and generalized in ToonTalk and the underlying model
of computation. A program is executed as a collection of autonomous
processes that communicate asynchronously in which the behavior of a
process is specified by a set of guarded clauses. A clause is constructed by
performing operations on a single sample data structure. To make the
clause capable of operating on other data structures, the programmer
needs only to remove details from the guard or conditional part of the
clause.
ToonTalk is built on the idea of animated programming. Animated pro¬
grams are not constructed by typing text or by constructing diagrams or
stringing icons together. Instead, the programmer is a character in an ani¬
mated virtual world where programming abstractions are replaced by tangi¬
ble analogs (see Figure 2.1). A data structure, for example, is a box whose
holes can be filled with number or text pads, other boxes, birds, nests, and
robots. Birds and nests are concrete analogs of send and receive capabilities
on communication channels. A robot is a guarded clause that has been
trained by the programmer to take actions when given a box. The thought
bubble of a robot displays the guard or conditions that need to be satisfied
before the robot will run. To generalize a robot, a programmer needs only to
use an animated vacuum to remove details from the box inside the robot’s
thought bubble.
2.1 Introduction 23
Figure 2*1
Computational Abstraction ToonTalk Concretization
Computation
1
City
Actor
Process
Concurrent object
House
^9
Method
Clause
Robot
f
Guard
Method preconditions
Contents of thought bubble
m
_
Method actions
Body
Actions taught to a robot
Message
Array
Vector
Box
I
Comparison test Set of scales
>45^/ tr
-
Process spawning Loaded truck
Process termination Bomb
•
Constants Numbers, text, pictures, etc.
1 9 9 *7
1 ?
Channel transmit capability
Message sending
Bird
i
Channel receive capability
Message receiving
Nest
_
Persistent storage
File
Notebook
1 Sally 2
Computer science terms and ToonTalk equivalents.
Another Random Scribd Document
with Unrelated Content
“Yes; and if I were in your place I’d raise another. There’s nobody in
sight, and how is the owner of the cattle going to know who did the
shooting? Knock one of ‘em over! I dare you to do it!”
Ned hesitated. He had talked bravely enough, when in the presence
of his cousin, about doing this very thing, but since that time he had
seen a fight, had heard the reports of firearms and the yells of
excited and angry men, and thought he had some faint conception
of the scenes that had been enacted during that neighborhood row,
and which would, no doubt, be repeated if another should arise. But
here was his fine field of wheat so nearly destroyed that it would not
pay for the harvesting; within easy rifle shot of him were some of
the cattle which had done the mischief and which probably belonged
to one of the neighbors who wouldn’t visit with him or his father
because they wore good clothes and claimed to be gentlemen; and
there was no one in sight.
“Knock one of them over,” repeated Gus, “and perhaps it will teach
their owner to keep his stock out of the way of your field, the next
time you plant wheat in it. Hand me your gun, and I’ll show you that
I am Gus Robbins yet, and not afraid to do anything.”
The boy leaned forward in his saddle as he said this, and taking the
rifle out of his friend’s grasp, rode toward the cattle (there were
probably a dozen of them in all) which were dashing along the fence
and trampling down the wheat that had escaped destruction during
their former raids. As Gus approached them, they charged in a body
in the direction of the gap; but instead of going through it they ran
on by, kicking up their heels and shaking their heads as if they
enjoyed the sport. While Ned galloped through the field to head
them off, Gus dismounted, and taking his stand near the gap, cocked
the rifle in readiness to shoot one of the herd the next time they
went by.
Ned succeeded in turning the cattle after a short race, and, as
before, they took no notice of the gap, but dashed by it and started
for another gallop around the field. At that moment the rifle cracked,
and one of the finest steers in the herd threw his head and tail
higher in the air, galloped faster for a short distance, then sank to
his knees and rolled over on his side. By the merest chance, Gus had
sent a bullet smaller than a buckshot into some vital part, and there
was one less steer in somebody’s herd to break down fences and
destroy wheat crops.
“What do you think of that?” cried Gus, in great glee.
“It was a splendid shot,” replied Ned, who just then rode up and
extended his hand for the rifle. “You did it, didn’t you? Since we
have begun the work, we’ll do it up in shape. If they won’t go out
they can stay in; but they’ll stay dead!”
The horse that Gus rode, having been broken to stand fire, was not
at all alarmed by the report of the rifle. He allowed the boy to catch
and mount him again, and by the time he was fairly in the saddle,
Ned had placed a fresh cartridge in his rifle. “You head them off and
drive them back,” said he, “and I’ll wait here at the gap to salute
them as they go by.”
In accordance with this request Gus rode off, and in a few minutes
the herd came dashing along the fence again. They must have been
growing tired of the sport by this time, for they headed straight for
the gap, and all got through; but one of them carried a bullet
somewhere in his body, the effects of which very soon became
apparent. The rest of the herd began to leave him behind, and when
he followed them over a ridge, which lay about a quarter of a mile
from the field, he was staggering about as if he could scarcely keep
his feet.
While the work of driving the cattle out of the field was in progress,
a horseman appeared on the ridge of which we have spoken, riding
slowly along, with his eyes fastened on the ground, as if he were
following a trail. Just as he reached the top, he heard the report of a
rifle, and looked up to discover that the cattle of which he was in
search, were running about a wheat field, and that two persons
were engaged in shooting them down. One of the cattle fell just as
he raised his eyes. When he saw this, he placed his hand on one of
the revolvers he carried in his belt, and seemed on the point of
dashing forward to take satisfaction for the loss he had sustained;
but he evidently thought better of it a moment later, for he backed
his horse down the swell until nothing but his own head could be
seen over it, and there he sat and saw all that Ned and Gus did.
When the wounded steer came over the swell, staggering from the
effects of the bullet Ned had shot into him, the man shook his
clenched hand in the direction of the wheat field, muttered
something to himself, and galloped off in pursuit of the uninjured
cattle, leaving the wounded one to take care of himself.
“There!” exclaimed Ned, when the laggard of the drove had
disappeared over the swell, “it’s done, and I am glad of it. If the
owner of those cattle finds out that we did it and has anything to
say about it, I shall tell him that this is my land—it may be mine
some day, you know, and before long, too—and that no cattle except
my own have any right on it.”
“I wish that steer had got over the fence before he died,” said Gus.
The boys seemed to be highly elated over what they had done. They
had performed the same feat which, not so very many months ago,
had set the whole settlement together by the ears, and no one was
the wiser for it. Of course some rancheman would some day find out
that one of his fattest steers had been killed and another badly
wounded, but how was he going to find out who did the shooting?
Ned fully expected that there would be trouble about it; that there
would be threats and inquiries made, and that he and Gus, being
safe from discovery, would have many a hearty laugh in secret over
the storm they had raised.
“Remember one thing,” said he. “No matter what is said or done, we
don’t know anything about it. They can’t crowd us into a corner tight
enough to make us own up. That would only make matters worse.”
Gus readily agreed to this, and the boys shook hands on it. In order
to make assurance doubly sure they rode around the rancho and
approached it, just at dark, from a direction opposite to that they
had taken when they rode away from it in the morning. When the
events of the afternoon became known nobody could fasten the guilt
upon them by saying that they had been seen coming from the
direction of the wheat field. They found supper waiting for them,
and when they had eaten it they went into the office to spend the
evening in reading and conversation.
While they were thus engaged inside the house, a proceeding which
looks strange at the first glance, but which will be plain enough
when all the circumstances connected with it are known, was going
on outside of it. A horseman, who was riding rapidly along the road
toward the rancho, turned off just before he reached it, and made
his way to the corral that was located a short distance to the right of
the shed in which Ned had taken refuge on the night of the fight. He
stopped in front of the gate and uttered an exclamation of
disappointment when he found that it was secured by a heavy
padlock. After looking about him for a moment, as if he were turning
some problem over in his mind, he dismounted, pulled the bridle
over his horse’s head and hung it upon the horn of the saddle;
whereupon the animal turned and galloped toward a watering-
trough a short distance away, where he was joined by a small, dark-
colored mule which had followed the horseman down the trail. The
horseman himself moved toward the house, pausing every now and
then to listen and reconnoiter the ground before him, and presently
reached the steps leading to the porch. These he mounted with
cautious tread, and was about to place his hand upon the door when
it was suddenly opened from the inside, a flood of light streamed out
into the darkness, and the horseman was confronted by a stalwart
herdsman who started back in surprise at the sight of him.
Arresting by a hasty gesture the cry of amazement that arose to the
herdsman’s lips, the visitor stepped into the hall, and, closing the
door behind him, uttered a few short, quick sentences in a low tone
of voice which the other received with subdued ejaculations of
wonder. When he ceased speaking the herdsman hastened away,
and the visitor, who seemed to be perfectly familiar with the internal
arrangements of the house, moved quickly along the hall, turning
several corners, and finally opening a door which gave entrance into
Mr. Ackerman’s office.
There was a happy party gathered in that office, if one might judge
by the ringing peal of laughter which echoed through the hall, when
the door was opened; but it was quickly checked at the sight of the
boy who entered as though he had a perfect right to be there, and
whose appearance was so sudden and unexpected that it brought
two of the three persons in the room to their feet in an instant.
“Why, George!” they both cried in a breath—and a quick ear would
have discovered that there was more surprise than cordiality in their
tones—“Is this you? Where in the world have you been so long? We
have been worried to death about you!”
“Yes it is I,” answered George Ackerman, for he it was. “I have come
back safe and sound, and that is all I can say to you now about
myself. I want to talk to you about yourselves, and especially to you
Ned. By the way, I suppose this is the friend from Foxboro’ whom
you have so long been expecting.”
Ned replied that it was, but he forgot to introduce the two boys to
each other, and so did Uncle John. There was something about
George that made them forget it. When they came to look at him
they saw that he was very much excited, and that his face wore an
expression they had never seen there before. They could not tell
whether he was frightened or troubled.
“Why, George!” exclaimed Uncle John, in some alarm. “What is the
matter? Any bad news? Are the Indians or Mexicans——”
“Yes, I have bad news,” interrupted George, almost impatiently, “and
but little time to tell it in. Ned, you and your friend must pack up and
leave this rancho, and this county, too, without the loss of an hour’s
time. You are in danger, and I have placed myself in danger by
coming here to tell you of it!”
The boy’s words produced the utmost surprise and consternation
among those who listened to them.
G
CHAPTER XII.
A NARROW ESCAPE.
eorge found his herdsman eager for news from the settlement,
as he always was, but he had nothing to tell him that was very
interesting. He could have given him some information that would
have made him open his eyes and put him in fighting humor at
once; but he thought it best to avoid that subject altogether. If he
told Zeke that Uncle John had threatened to take his herd of cattle
away from him, under the plea of reducing expenses, but really as
George believed, for the purpose of turning it over to Ned, the old
man would have been as angry as George was when he first learned
of the fact. But the boy didn’t want to let Zeke know how mean his
uncle was, and so he said nothing about his plans. They never could
be carried out while Zeke was there to protect his stock, and George
could afford to be magnanimous.
George and his herdsman made an early start on the following
morning, and the third night found them at Catfish Falls. They now
felt perfectly safe, for the raiders had never been known to
penetrate so far into the country. Their depredations were principally
confined to the counties bordering on the river, it being their object
to stampede all the stock they could find in one night’s raid, and
drive it across the river into Mexico, before the settlers could gather
in sufficient numbers to pursue them. They tried as hard to avoid a
fight as the ranchemen did to overtake them.
George made the camp and cooked the supper, and when they had
satisfied their appetites, the former laid down on his blanket in front
of the fire with his saddle for a pillow, and listened to Zeke, who
talked and smoked incessantly. Their work for the day was over now.
The cattle were always brought close in to camp at dark, the horses
and mule were staked out, and the campers went to bed at an early
hour. If they awoke during the night, they replenished the fire with
some of the fuel that was always kept close at hand, and walked
around the herd to see if there were any restless ones in it who felt
inclined to stray away. George performed this necessary duty twice
on this particular night making the first round about twelve o’clock.
To his surprise, he found the most of the cattle on their feet, and
saw that some of them were exhibiting unmistakable signs of
uneasiness and alarm. They stood snuffing the air eagerly, carrying
their heads high and their ears thrown forward, and now and then
they would walk a few steps out of the herd, lower their horns and
paw the ground as if challenging the object that had excited them,
whatever it was, to come out and give them battle. The rest of the
cattle were lying down, chewing their cuds contentedly, and
apparently not at all disturbed by the antics of their nervous
companions.
George threw himself flat upon the ground and swept his eyes
around the horizon. In this position, he could distinctly see any
object that might be approaching the camp (provided, of course,
that it was taller than the grass) for it would be clearly outlined
against the sky. But he could see nothing. He arose to his feet again
and listened intently, but could hear nothing calculated to excite his
alarm. The wolves which serenaded them every night were holding a
concert a short distance away, and that made George believe that if
there was any danger approaching, it was yet a long distance off; for
he knew that the wolves would be the first to discover it, and that
they would then bring their concert to a close and take to their
heels.
“There’s something up,” thought George, once more turning his eyes
toward the cattle. Some of the uneasy ones, reassured by his
presence, were walking about among their companions, as if they
were looking for a good place to lie down, while the others remained
in a defiant attitude and snuffed the air as before. “There’s
something up,” repeated George, “and I have been expecting it. I
have felt very nervous and timid for two or three days, and I don’t
know how to account for it. If there is anybody within hearing or
smelling distance who has no business here, I can find it out.”
George walked back to the camp, picked up his rifle, and after
unfastening the lasso with which his horse was confined, he jumped
on the animal’s back without saddle or bridle and rode away in the
darkness, paying no heed to a bray of remonstrance from Bony who
followed as far as the length of his lariat would allow him to go. He
rode out on the prairie for a hundred yards or more, and then
stopped his horse and listened again. The animal stood perfectly
quiet for a few seconds, looking first one way and then another, and
turning his ears toward all points of the compass, and apparently
satisfied with the result of his reconnoissance, he put down his head
and began cropping the grass.
“Hold up, here!” exclaimed George, seizing the horse by the mane
and tapping him gently on the side of his head with the muzzle of
his rifle to make him turn around. “We have nothing to be frightened
at yet—that’s evident. Now, old fellow, I shall leave you loose. Keep
your ears open and wake us up if you hear anything!”
George rode back to camp and sought his blanket feeling a little
more at his ease. He had as much faith in his horse as he had in
Zeke (the latter used to say that he could smell an Indian or a
Greaser at night as far as he could see him in the daytime), and
since the animal could not discover anything suspicious, it was as
good evidence as he wanted that there was nothing to fear. No
doubt some of the wild members of the herd felt as nervous and
uneasy as he did, and took their own way to show it.
Although George brought back to his blanket a most refreshing
feeling of security, he did not sleep as soundly as he usually did. He
went through all sorts of terrible things in his dreams, and started
every time the fire snapped. He was wide awake again at one
o’clock, and set out on his second tour of inspection. The moon, now
nearly half an hour high, had brought up with it a cooling breeze
which gently rustled the long grass of the prairie, and sent the
sparks from the camp-fire circling high in the air. The wolves had
closed their concert and gone off to find a more appreciative
audience, and there was an air of peaceful quiet brooding over the
scene. George forgot all his fears and continued his round with a
light heart. He found the cattle quiet, but some of them had begun
feeding and were straying away from the rest of the herd. While
George was engaged in driving them back, and forcing the
remainder of the herd into a more compact body, a yell, so sudden
and startling that it made the cold chills creep all over him, arose on
the air, and out from a little thicket of willows that grew a short
distance from the belt in which the camp was located, dashed a
party of horsemen who charged toward the herd at the top of their
speed. They were Mexicans; George could see that at a glance. They
had doubtless been hovering about the camp all night, and it was
while they were working their way around to the leeward of the herd
that their presence had been detected by the wakeful cattle.
George stood for an instant as if he were rooted to the ground; and
then with a wild cry of alarm he dashed forward, running diagonally
across the front of the herd, hoping almost against hope that he
might succeed in passing them, and thus avoiding the rush which he
knew would come in a moment more. It was the only way in which
he could escape being trampled to death. He ran as he had never
run before, but he had made scarcely half a dozen steps when a
rumble like that of an avalanche sounded close at his side, telling
him that the cattle were coming. The strongest fence that was ever
built would not have stopped them now, and George, had he
attempted to drive them back or turn them aside, would have been
trampled under their feet like a blade of grass. He saw and fully
realized his danger, but could not escape it. Even Zeke, who was as
light of foot as an antelope, could not have saved himself by his
speed; and George, giving himself up for lost, fell flat upon the
ground, clasped his hands over his head and awaited his fate. By the
merest chance he threw himself into a little excavation in the prairie,
which, in the years gone by, had doubtless served as a wallow for
some old patriarch of a buffalo; but now it was covered with grass,
and there were two or three little willows growing out of the bottom
of it.
This protection, slight as it was, saved the boy’s life. He had barely
time to crowd himself close against the frail stems of the willows
before the frantic cattle were upon him. The roar of their hoofs on
the hard ground was almost deafening. It was louder than the roar
of all the northers he had ever heard crowded into one; but even
while he was wondering why some of the cattle did not jump upon
him the roar subsided, and George, looking up through the willows
which had been bent over his head, saw the moon shining down
upon him. Every steer had jumped the wallow, and George had
escaped with nothing more than a terrible fright. While he was
congratulating himself upon his good fortune, a clatter of hoofs
sounded near, and he ducked his head just as two horsemen, riding
side by side, dashed over the wallow in pursuit of the flying herd.
The boy’s first thought, after he had satisfied himself that he had
escaped without injury, was of Zeke. What had become of him?
There was one thing certain—George knew it now as well as he did
a few minutes later—and that was that the herdsman had made a
fight, and a good one, too. Although the old fellow appeared to be a
sound sleeper, he would jump to his feet the instant he heard any
unusual noise, and he was wide awake the moment he opened his
eyes. More than that, he kept his Winchester close at hand, and
could discharge it with a rapidity and accuracy that George had tried
in vain to imitate. Zeke was probably on his feet before the yell that
frightened the cattle was half uttered, and as soon as he got there
he was ready to begin shooting. Of course George had not heard the
report of his rifle, for the rumble of that multitude of hoofs about his
ears would have drowned the roar of a cannon.
“But I know, all the same, that he did shoot, and that some of those
raiders didn’t get away,” thought George, as he once more raised his
head and looked over the grass in the direction of the camp. “I think
I had better stay here. Zeke will know when the danger is over, and
then he will call to me. I wonder if he is there now? Somebody is
punching up the fire, sure!”
The old buffalo wallow into which George had thrown himself, was
about a hundred yards distant from the willows, and the grass was
so high that he could not see the camp; but he could see the smoke
of the fire as it arose through the tops of the trees that hung over it.
Just now the fire was blazing brightly, and the sparks were rising
from it in volumes. This was what led George to believe that there
was somebody in the camp. It couldn’t be one of the raiders, he told
himself, for they never stopped. They stampeded the cattle and
dashed on after them to get out of reach of the bullets in the
herder’s rifles.
“Of course Zeke is there,” thought George as he arose from his place
of concealment; but he had scarcely placed himself fairly upon his
feet before he dropped back among the willows again. There were
several figures moving about the fire, and there were riderless
horses and mounted men near by. The men were all dressed in
Mexican costume—the wide brims of their sombreros were plainly
visible in the moonlight—and there were at least a dozen of them in
sight. One of them seemed to be poking up the fire for the purpose
of making as bright a light as possible, while the others were going
into the willows with blazing fire-brands in their hands. Some of their
companions had already gone in there armed in the same manner,
for George could see the lights dancing about among the trees.
The boy saw all this during the instant of time he was on his feet,
and when he dropped back into his concealment again, his fear had
given place to a feeling of exultation. The raiders were searching the
woods in the vicinity of the camp, and of course they could be
looking for nobody but Zeke. Probably the old fellow had given them
a very warm reception. No doubt he had tumbled three or four of
them out of their saddles, and the survivors were hunting him up
with the intention of taking vengeance on him if they caught him.
“But they’ll never catch him,” chuckled George, “because he’s too old
a ‘coon. He has fought Indians too long to be beaten by a lot of
lubberly Greasers.”
George drew the tops of the willows closer together, confining them
in that position by twisting their branches, and having thus formed a
screen that was large enough to cover his head, he raised himself
upon his knees, so that he could look over the grass and watch the
motions of the raiders. They were certainly looking for somebody,
and they seemed resolved to find him, too, for they did not grow
discouraged and go away, as George hoped they would. Their failure
only seemed to make them the more determined. First one and then
another seized fire-brands and joined their companions in the
woods, and finally those who were mounted, swung themselves out
of their saddles and went in too, leaving the camp to take care of
itself.
“I wonder what Zeke has done to make them so persistent!” said
George to himself. “Perhaps they’ve got an old grudge against him.
They might as well go away, for they’ll not find him. He’s safe long
before this time, and if I could only make my horse hear me, I’d
soon be safe too.”
George could always find something to feel happy over, no matter
how unpleasant the situation in which he might be placed, and he
found something now. He had lost his fine herd of cattle, but Zeke
was left to him, and so were his horse and pack-mule. The former
had been stampeded with the cattle, but George knew he would not
run far before he would leave them and strike a straight course for
home. The two Mexicans who had followed the herd to head it off
and turn it away from the settlements toward the river, would not
bother their heads about him, for while they had three hundred fat
cattle to look out for, they could not afford to waste time in pursuing
a single horse. Bony was still staked out near the camp, and so was
Zeke’s nag. They both made the most desperate efforts to escape
with the herd, but the lariats with which they were confined were
too strong to be broken, and the picket-pins were driven so firmly
into the ground that they could not be easily pulled up. The
Mexicans, when they were ready to leave the camp, would probably
turn these animals loose, expecting them to follow their own horses,
just as Silk Stocking had followed off the raiders who made the
attack on the rancho; but that was something Bony would not do.
He was very much afraid of strangers, and when left to himself he
would make the best of his way home.
The search for Zeke was continued? until broad daylight, and all this
while George lay in his concealment watching the motions of the
raiders and wondering what his herdsman had done to make the
thieves so anxious to find him. When day began to dawn he
discovered something that seemed to explain it all: there were five
wounded men sitting and lying beside the fire. George knew that
they were wounded, for he could see that they wore bandages, and
that one who limped considerably and used a stick to walk with,
would now and then get up to bring a cup of water from the bayou
to two of his companions who kept their blankets. Probably one of
these men was the leader of the band, and that was the reason why
the others were so determined to find Zeke. But they had to give up
the search and go away without him, as George knew they would.
Shortly after daylight they began to come into camp by twos and
threes, and when they were all assembled George counted eighteen
of them. They talked earnestly together for a few minutes and then
set about preparing a hasty breakfast, helping themselves bountifully
to the contents of the pack-saddle, and using the cooking utensils
which George had provided for his own use and Zeke’s.
George waited with no little impatience to find out what they were
going to do when they made an end of the bacon and coffee, and
was very glad to see that they were preparing for an immediate
departure. When all was ready the wounded members of the band
were assisted into their saddles, Zeke’s horse and George’s pack-
mule were set at liberty, and the raiders moved slowly along the
willows in the direction the cattle had taken when they were
stampeded. It was a wonder that their suspicions were not aroused
by the actions of the mule which, foolish as mules generally are, ran
at once to the buffalo wallow in which George was concealed, and
not content with shying at the sight of it and giving it a wide berth,
as Zeke’s horse did, Bony circled around it two or three times, and
finally stopping, thrust out his neck, threw his long ears forward and
looked suspiciously at the crouching form of his master.
George, who had been in a fever of suspense for long hours, and
who began to breathe more freely when he saw the raiders moving
away, was frightened again; but, as it happened, the thieves paid no
attention to the mule’s actions. Better than that, Zeke’s horse kept
on his way without stopping, and Bony, seeing that he was going to
be left behind, started in pursuit. The danger was over now, but
George was much too wary to run any risks. He saw the raiders
disappear over the nearest swell, but he allowed another hour to
pass before he left his hiding-place. Then he moved very cautiously,
crawling along on his hands and knees, stopping every few feet to
look over the grass and listen, and examining the ground about the
camp very thoroughly before he ventured into the woods.
He found the camp in the greatest confusion. His rifle and revolvers
were gone, so were his blankets and poncho, and also a good
portion of the contents of the pack-saddle; but there was still a little
of the bacon and hard-tack left, and the raiders had forgotten to
take his haversack and frying-pan. He replenished the fire at once,
and while waiting for it to get fairly started, employed himself in
cutting up the bacon with an old rusty hunting-knife which one of
the thieves had probably left in exchange for his own new one.
While he was thus engaged he did not neglect to keep an eye open
for any straggling raiders who might have fallen behind the main
body; but there were none in sight. He placed the bacon in the
frying-pan, and when it was done to his satisfaction he put it into his
haversack, together with the small supply of hard-tack that was left,
extinguished the fire and set out for home.
“I am glad the thieves left me provisions enough to last me until I
can get more,” said George, to himself. “If I have to travel all the
way on foot, it will take me four or five days to reach the nearest
rancho, and I have no fears of getting hungry during that time. What
brought those raiders so far from the river? That’s what I can’t
understand.”
During the two days that followed, while the young cattle-herder
was trudging painfully over the lonely prairie, he had ample leisure
to turn this question over in his mind. He travelled early and late,
but his progress was necessarily slow, for one who spends the most
of his time in the saddle, finds it hard work to go on foot, and soon
grows weary. He kept a bright lookout for Zeke, and stopped on the
top of every swell to scan the prairie before and on both sides of
him, in the hope of discovering his horse or pack-mule; but Zeke was
miles ahead of him, hastening toward the settlement, intent on
alarming the ranchemen in time to cut the raiders off from the river,
while Bony and Ranger were making the best of their way toward
home.
“They are all safe, I know, for they are able to take care of
themselves. So am I; but there’s no fun in looking forward to three
days more of such walking as I have had. I shouldn’t mind it so
much if I hadn’t lost my cattle,” said George, with a long-drawn sigh.
“Those lazy Greasers have robbed me of years of hard work, and
now I must begin all over again, or else go to herding cattle for
Uncle John. Of course I can’t loaf about the house all the time and
do nothing, as Ned does. Hallo!”
While George was talking to himself in this way he came to the top
of a ridge, and found before him a long line of willows which fringed
the banks of a water-course. A solitary horse was feeding near the
willows, and this it was that attracted the boy’s attention and called
forth the exclamation with which he finished his soliloquy. The sight
of the animal alarmed him, for it was not at all likely that a horse,
wearing a saddle and bridle, would be feeding contentedly in that
wilderness, so far from all signs of civilization, unless there was
some one with him. George dropped to the ground, and ran his eyes
along the willows in search of a camp. If there was one in the
neighborhood he could not find it. There was no smoke to be seen,
nor were there any other indications of the presence of human
beings.
“But there’s somebody here all the same,” thought the boy, shifting
his position a little, so that he could obtain a better view of the
willows, “for that horse never came here without a rider. Somebody
has stopped in the willows to rest, and he’s a Mexican, too. I know it
by the silver ornaments on the saddle. I wish I could think up some
way to capture that horse. Shall I try it?”
Not knowing what else to do just then, George lay there in the grass
and considered the matter. Weary and footsore as he was, the
thought of finishing his journey on horseback was a most agreeable
one. The animal was loose—when he raised his head, George could
see that he was not confined by a lariat—but if he attempted to
creep up to him the horse would doubtless take fright and run off;
and that would excite the suspicions of his owner, who might be
tempted to send a bullet from his carbine in that direction. There
was too much danger in it George found when he came to think it
over. He sighed regretfully, thought almost with a shudder, of the
long, weary miles that lay between him and the nearest rancho, and
was about to crawl back down the swell again, when he was
astonished almost beyond measure, to hear his own name
pronounced in a weak and trembling, but still distinct voice.
“George! George Ackerman!” came the hail from the willows.
George jumped to his feet, and looking in the direction from which
the voice sounded, saw a sombrero waved in the air, and could dimly
discern the figure of a man, dressed in Mexican costume, who was
sitting on the ground, with his back against one of the willows.
“George!” repeated the man.
“Hallo!” was the reply.
“Come here, will you? I am badly hurt and in need of help!”
George grew more and more astonished. The man was a Mexican
beyond a doubt, but the voice sounded strangely familiar.
“Don’t be afeared, George!” continued the man, in a pleading tone.
“I couldn’t hurt you if I wanted to! I’ve got something to tell you!”
“Who are you?” asked the boy.
“Why, don’t you know Springer, who used to herd cattle for your
father?”
Yes, George knew him, and he didn’t know anything good of him
either.
“If you are Springer,” he shouted “what are you doing there with
those clothes on?”
“Come here, an’ I’ll tell you all about it!” was the answer. “I’ll tell you
something else, too—something that’ll make you open your eyes. Do
come, George, and give me a drink of water! I’ve got a chunk of
lead through each leg!”
“Aha!” said George, who thought he understood the matter now.
“You were with the raiders, and Zeke got two pulls at you with his
Winchester!”
As he said this he ran down the swell, and in a few minutes more
was standing beside the wounded man. It was Springer, sure
enough, but he was so much changed that George could scarcely
recognise him. His face was very pale and his strong frame was
convulsed with agony. The sash he usually wore around his waist
had been cut in two, and the pieces were bound tightly about his
legs above the knee to stanch the flow of blood from the wounds
made by the herdsman’s rifle. He was a hard-looking fellow, and any
one would have taken him for just what George knew him to be—a
cattle-thief.
Without stopping to ask any more questions George seized the
man’s hat, and hastening to the bayou presently returned with the
crown filled with water. The wounded raider drank eagerly and sank
back against his tree with a sigh of great satisfaction.
G
CHAPTER XIII.
GEORGE HAS COMPANY.
eorge knew Springer well. The latter had once been in his
father’s employ; but being of no use as a herdsman or anything
else, he had been discharged, to make room for a more industrious
and pains-taking man. This enraged Springer, who threatened
vengeance, and followed up his threats by attempting to fire the
rancho. He had been detected in the act and almost captured; but
he succeeded in making his escape, and since then George had
never met him until this particular day. He had often heard of him,
however, as a member of a band of cattle-thieves, who now and
then made a raid through the country farther down the river. There
were a good many others just like Springer, on the opposite side of
the Rio Grande—renegade Americans—who, having left their country
for their country’s good, had taken refuge among the Mexicans, and
joined with them in raiding upon the well-stocked farms and ranches
of their Texan neighbors.
George returns Good for Evil.
“You needn’t be afeared, George,” repeated Springer, seeing that the
boy cast uneasy glances about him, as if half expecting to see the
rest of the band start up from some ambush among the willows.
“Thar’s nobody here but me.”
“Where are your friends?” asked George.
“They’ve gone on, an’ I s’pose they’re acrosst the river by this time.”
“Did they leave you here to take care of yourself?” inquired George,
who found it difficult to believe that men could be so heartless.
“What else could they do?” asked Springer, wincing a little, as he
tried to move one of his wounded legs into a more comfortable
position. “A man who is fool enough to get hurt, must take his
chances. If he can keep up with the rest, well an’ good; if he can’t,
he must fall behind an’ look out fur himself. I’m glad I ain’t in the
settlement. I’d rather stay here an’ starve, fur want of grub an’
water, than have the ranchemen catch me. I ain’t had a bite to eat
fur two days.”
“You haven’t!” exclaimed George. “I’ll divide with you.”
He opened his haversack, as he spoke, and producing from its
capacious depths a goodly supply of bacon and cracker, placed it in
the hands of the wounded man, whose eyes brightened as he
received it. George stood by and saw him eat it, and was glad to see
that he enjoyed it, although he knew that by thus diminishing his
store he put himself in a fair way to go hungry for many a weary
mile of his journey. The man was a scoundrel—no one except
himself could tell what deeds of violence he had been guilty of
during his raids—but for all that George was glad that it was in his
power to relieve his distress.
“I am sorry to see you in this situation, Springer,” said he, when the
bacon and cracker had disappeared.
“Are you, though?” exclaimed the man, wiping his mouth with the
back of his hand, and looking up in surprise. “I didn’t s’pose you
would be.”
“Well, I am; and I hope that when you get well, you will behave
yourself and live among white men.”
“That’s unpossible; ‘kase why, white men won’t have nothing to do
with me,” replied Springer, almost fiercely. “Would you hire me to
herd cattle fur you?”
“Yes, I would. I know you threatened that you would be revenged
on my father for discharging you, but I don’t see why you should
follow me up. I haven’t done anything to you. How did you get shot?
And how came you here?”
“Wal, you see, we made the dash on your camp, kalkerlatin’ to take
you by surprise; but Zeke, he allers sleeps with his rifle in his hand
an’ one eye open, an’ I was the fust feller he got a crack at. He took
two pulls at me, an’ this yere is the consequence,” said Springer,
pointing with both forefingers toward his bandaged legs. “When we
left your camp, the fellers put me on my hoss, an’ I kept up with ‘em
fur a few hours; but the pace was too fast fur me—I couldn’t stand
the joltin’; so I had to pull up. When I reached this bayou, I thought
I’d get a drink of water; but when I got down I fell, lettin’ go my
bridle, an’ my hoss walked away. I was too weak an’ bad hurt to
crawl to the water; I couldn’t ketch my hoss, an’ I reckoned I’d got
to stay right here. I happened to see you when you come to the top
of the ridge, an’ called to you, thinkin’ mebbe you wouldn’t refuse to
give me the drink I was a’most ready to die fur. But you wouldn’t a
done it, if you knowed as much as I do!”
“Yes, I would. I don’t bear you any ill-will because you stole my
cattle.”
“But that aint all!” exclaimed Springer.
“I know it isn’t! You tried to burn my home over my head; but I
don’t bear you any ill-will for that, either; and I’ll prove it to you by
putting you on your horse and giving you a chance to save yourself!”
“But that aint all!” said Springer. “How do you reckon we knowed
whar to look for you?”
“I’m sure I can’t tell! I never knew raiders to venture so far from the
river before!”
“An’ they never did, nuther! Whar was you when we was in your
camp?”
“I was lying in a buffalo wallow about a hundred yards away!”
“Did you see the fellars while they was a pokin’ around in the
willows with their fire-brands? What do you reckon they was a
lookin’ for?”
“I supposed they were looking for Zeke!”
“Wal, they wasn’t lookin’ for Zeke, nuther! They didn’t care nothing
about Zeke! You was the fellow they wanted to find!”
“I was!” exclaimed George. “What did they want of me?”
“They wanted you ‘kase there’s a thousand head of fat steers
wrapped up in you, ‘sides them three hundred we stole from you the
other night!”
The boy was greatly astonished, and he was certain, too, that he
knew what Springer was trying to get at. He seated himself on the
ground with his back against a neighboring tree, and said as calmly
as he could:
“You must speak plainer than that if you want me to know just what
you mean!”
“I mean jist this yere,” said Springer; “an I’ll tell you ‘cause you was
good enough to come here an’ give me the drink of water I was
starvin’ fur, an’ feed me outen your grub when you haint got enough
to eat yourself. George, you are in danger every day you spend at
your rancho! Your uncle and cousin don’t want you there, an’ they
aint goin’ to let you stay nuther!”
George thought from what Springer said before that he had some
such revelation as this to make, but when it came it almost took his
breath away. He had long been of the opinion that his relatives
didn’t want him at the rancho, but how could this cattle-thief, who
lived miles away on the other side of the river, have found it out?
The man talked in a positive tone, as though he knew all about it,
and this was what surprised George. There was one thing certain,
however: He was not going to discuss family matters with any such
fellow as Springer.
“I’ll tell you what it is,” said he, as he arose to his feet and slung his
haversack over his shoulders. “I’ll not stay here if you are going to
insult my uncle and cousin!”
“Say, George, whar you goin’?” demanded Springer.
“I am going to start on again. Shall I put you on your horse before I
go?”
“You needn’t go off mad,” said the man, earnestly, “‘cause every
word I’m tellin’ you is the gospel truth. We got it all through Philip!”
“Got all what through Philip?” asked George.
“I mean we done all our business through him; an’ if I was in your
place, I’d go home an’ bundle him outen the house, neck an’ heels.
He’s makin’ mischief thar, I tell you. He told us we’d find you in that
grove on Brown’s Run; an’ when we didn’t find you thar, we follered
your trail to Catfish Falls.”
“But how did Philip know I was going to that grove?” demanded
George, growing more and more bewildered.
“What’s the use of me tellin’ you when you’ll get mad?” asked
Springer in reply. “The under-standin’ atween us, was, that arter we
had drove off your three hundred head of stock, we was to come
over agin, in a week or two, an’ we would find a thousand more
head whar we could get ‘em easy.”
“Who was going to put them where you could get them easy?”
“If I tell you, you’ll get mad at me. But mind you, we wasn’t to get
them thousand head unless we gobbled you. The fellers done their
level best, but couldn’t find you!”
“What were you going to do with me if you found me?”
“That’s something I can’t tell. Nobody but Fletcher knows that.”
“Who’s Fletcher?”
“He’s the boss—the cap’n.”
“Who told you to gobble me?”
“What’s the use of me tellin’ you when you’ll be sartin to go off
mad? You see, we kalkerlated to make twenty-six thousand dollars
clear by two night’s work, but that didn’t satisfy us. Philip, he told us
that thar was a whole bit of gold and silver in your uncle’s office, an’
we wanted that too; so we slipped down thar, an’ Philip, he opened
the door an’ let us in.”
“Into our house!” cried George, who now learned for the first time of
the attack that had been made upon the rancho.
“Yes, into your house; but we didn’t get nothing but bullets an’ one
hoss fur our pains.”
“It served you just right,” said George, indignantly. “They are not all
traitors in that house, I tell you.”
“Not by no means they ain’t,” said Springer, with a knowing shake of
the head. “One of the herders, who was awake, aroused the others
by firing his revolver, an’ it’s the biggest wonder in the world that
any of us got out. We tried to cut down the doors, but they drove us
off, and then we made a strike fur Brown’s Run, whar we allowed to
find you. On the way we run into about five hundred head of stock,
an’ thinkin’ that a bird in the hand was worth a dozen in the woods,
we drove ‘em off. We got ‘em across the river all right, an’ dodgin’
the rangers who follered us, we came back arter you. We found you
too, an’ some of us got more’n we wanted,” added Springer, looking
down at his bandages and groaning faintly.
George listened to all this in the greatest amazement. He
remembered now, that just before he left home with his supplies, his
uncle had questioned him closely about some things in which he had
previously shown no interest whatever, and that he seemed
particularly anxious to know where his nephew expected to find his
herd, and which way Zeke would probably drive it after George
joined him. The boy never would have thought of the circumstance
again, if it had not been for this interview with his father’s old
herdsman; but now it was recalled very vividly to his mind, and he
was obliged to confess to himself that the half-formed suspicions he
had long entertained were not without foundation. His Uncle John
was at the bottom of all his troubles, and Philip, the Mexican cook,
was his confidential assistant. The boy’s heart sank within him while
he thought about it. He didn’t know what to do, and there was only
one man in the settlement to whom he could go for advice.
“Well, Springer,” said George, suddenly, “we have wasted time
enough. I have a long journey to make, and so have you. I hope you
will succeed in getting safely over the river, and that the lesson you
have received will be the means of making you an honest man. I will
put you on your horse and divide my provisions with you, and that is
all I can do for you.”
“An’ it’s a heap more nor any body else would do for me,” said
Springer, gratefully. “You won’t tell none of the settlers that you seed
me, will you?”
“I’ll not put any of them on your trail,” replied the boy. “I may be
obliged to say something about you; but if you have good luck, you
ought to be safe across the river before I reach Mr. Gilbert’s house,
and that is where I am going.”
After bringing Springer another hatful of water from the bayou, and
dividing with him the small supply of bacon and crackers he had left,
George brought up his horse, and with infinite difficulty assisted the
man to mount. Springer groaned a little and swore a great deal
during the operation, and being a heavy man and almost unable to
help himself, it required the outlay of all George’s strength to put
him into the saddle. After thanking the boy over and over again for
what he had done, he rode slowly away, and George feeling as
though there was nothing in the world worth living for now, once
more turned his face toward the settlement. He looked back now
and then to see how Springer was getting on. The last time he saw
the man he was standing on the top of a high swell holding his hat
in his hand. When he saw George looking at him he waved it in the
air and rode down the swell out of sight.
“If he can keep in his saddle for forty-eight hours—and he would
have no trouble at all in doing it if it were not for his wounds—and
can dodge the rangers who are probably out looking for the raiders,
he will be all right,” thought George; “but if he is compelled to
dismount, I don’t know what will become of him. He can’t possibly
get on his horse again without help. Now, what shall I do? I am
going back to a home where I am not wanted.”
This was the burden of the boy’s thoughts all the rest of the day. He
could not make up his mind to any course of action, for he was so
stunned and bewildered by what he had heard that he could not
think clearly. The only thing he determined upon was, that he would
lay the case before Mr. Gilbert, and be governed by his advice. Mr.
Gilbert was a wealthy cattle-raiser and a prominent man in the
settlement, who had gained his start in life through the assistance of
George’s father. He was a firm friend of the family, and the boy knew
that he could trust him. Toward his rancho he directed his course,
making all the haste he could. He would have been glad to travel all
night, but his weary limbs demanded rest, and when it grew dark
George was obliged, much against his will, to go into camp. He built
a fire in the edge of a belt of post-oaks that ran across his path, and
after gathering fuel enough to last all night, he ate a very light
supper and sat down to think over the situation. When eight o’clock
came he scraped a few leaves together for a bed, and was about to
throw himself down upon it, when he was brought to his feet by the
clatter of hoofs, which sounded a short distance away.
George seized his haversack and waited with a beating heart for the
horsemen, who he knew were approaching his camp, to come in
sight. They came a moment later, and to the boy’s intense relief the
light from his fire shone not upon silver buttons, gaudy sashes and
wide trowsers, but upon a couple of red shirts and slouch hats. With
a long-drawn sigh, indicative of the greatest satisfaction, George
threw down his haversack and stepped forward to greet the new
comers.
“Good-evening, stranger,” said the foremost horseman. “Have you
any objections to good company to-night?”
“None whatever,” answered George, readily. “I shall be only too glad
to have it, for it is lonely work keeping house all by one’s self.”
“We saw the light of your fire,” said the other, “and as we have got a
little out of our reckoning, we made bold to come here, thinking that
perhaps you could set us right.”
“I am glad to see you,” answered George; “but I hope you have
brought your supper with you, for it is little I can offer you.”
“O, that’s nothing. It is no uncommon thing for ranchemen to go
supperless to bed, you know. Where did you stake out your horse,
my lad?”
“I haven’t any, sir. He was stampeded when the Greasers stole my
cattle, and I haven’t seen him since.”
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

More Related Content

PDF
Your Wish Is My Command: Programming by Example Henry Lieberman
PDF
Effective Prototyping for Software Makers 1st ed Edition Jonathan Arnowitz
PDF
Effective Prototyping for Software Makers 1st ed Edition Jonathan Arnowitz
PDF
Designing Data Intensive Web Applications 1st Edition Stefano Ceri
PDF
Effective Prototyping for Software Makers 1st ed Edition Jonathan Arnowitz
PPTX
Computer and ms word
PPTX
Computer and ms word
PDF
Coordinating User Interfaces For Consistency Jakob Nielsen
Your Wish Is My Command: Programming by Example Henry Lieberman
Effective Prototyping for Software Makers 1st ed Edition Jonathan Arnowitz
Effective Prototyping for Software Makers 1st ed Edition Jonathan Arnowitz
Designing Data Intensive Web Applications 1st Edition Stefano Ceri
Effective Prototyping for Software Makers 1st ed Edition Jonathan Arnowitz
Computer and ms word
Computer and ms word
Coordinating User Interfaces For Consistency Jakob Nielsen

Similar to Your Wish Is My Command: Programming by Example - eBook PDF (20)

PDF
WEEK1-STE-COMPSCI-G7-1Q-ROMINICCHENG.docx.pdf
PDF
Designing Data Intensive Web Applications 1st Edition Stefano Ceri
PDF
Usercentered Interaction Design Patterns For Interactive Digital Television A...
PDF
A Multimodal End2end Approach To Accessible Computing 2nd Edition P Biswas
PDF
A Multimodal End2end Approach To Accessible Computing 2nd Edition P Biswas
PDF
A Multimodal End2end Approach To Accessible Computing 2nd Edition P Biswas
PDF
Computing and Communications Engineering in Real-Time Application Development...
PDF
Designing Data Intensive Web Applications 1st Edition Stefano Ceri
PDF
The Evolution of Software Development.pdf
PDF
The finite element method basic concepts and applications 2nd ed Edition Pepper
DOCX
software engineering notes pdf jntuh R18
PDF
history of software engineering .pdf
PDF
Computer Engineering Essay
PPT
1.lecture_07_paradigms.ppt
ODP
Applications for the Masses by the Masses: Why Engineers Are An Endangered Sp...
DOCX
Introduction to software engineering
PPTX
software engineering history2.pptx
PDF
I Know What You Did Last Summer [ICPC 2025 MIP Award]
PPT
Multi-Touch Tangible Interface; HCI trends, projects, and development
PDF
The finite element method basic concepts and applications 2nd ed Edition Pepper
WEEK1-STE-COMPSCI-G7-1Q-ROMINICCHENG.docx.pdf
Designing Data Intensive Web Applications 1st Edition Stefano Ceri
Usercentered Interaction Design Patterns For Interactive Digital Television A...
A Multimodal End2end Approach To Accessible Computing 2nd Edition P Biswas
A Multimodal End2end Approach To Accessible Computing 2nd Edition P Biswas
A Multimodal End2end Approach To Accessible Computing 2nd Edition P Biswas
Computing and Communications Engineering in Real-Time Application Development...
Designing Data Intensive Web Applications 1st Edition Stefano Ceri
The Evolution of Software Development.pdf
The finite element method basic concepts and applications 2nd ed Edition Pepper
software engineering notes pdf jntuh R18
history of software engineering .pdf
Computer Engineering Essay
1.lecture_07_paradigms.ppt
Applications for the Masses by the Masses: Why Engineers Are An Endangered Sp...
Introduction to software engineering
software engineering history2.pptx
I Know What You Did Last Summer [ICPC 2025 MIP Award]
Multi-Touch Tangible Interface; HCI trends, projects, and development
The finite element method basic concepts and applications 2nd ed Edition Pepper
Ad

Recently uploaded (20)

PDF
TR - Agricultural Crops Production NC III.pdf
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
01-Introduction-to-Information-Management.pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Insiders guide to clinical Medicine.pdf
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
TR - Agricultural Crops Production NC III.pdf
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PPH.pptx obstetrics and gynecology in nursing
01-Introduction-to-Information-Management.pdf
102 student loan defaulters named and shamed – Is someone you know on the list?
Insiders guide to clinical Medicine.pdf
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
Final Presentation General Medicine 03-08-2024.pptx
O7-L3 Supply Chain Operations - ICLT Program
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Renaissance Architecture: A Journey from Faith to Humanism
O5-L3 Freight Transport Ops (International) V1.pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Supply Chain Operations Speaking Notes -ICLT Program
human mycosis Human fungal infections are called human mycosis..pptx
Ad

Your Wish Is My Command: Programming by Example - eBook PDF

  • 1. Your Wish Is My Command: Programming by Example - eBook PDF download https://ebooksecure.com/download/your-wish-is-my-command- programming-by-example-ebook-pdf/ Download full version ebook from https://ebooksecure.com
  • 2. 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) Your Voice is Your Business: The Science and Art of Communication, Second Edition http://ebooksecure.com/product/ebook-pdf-your-voice-is-your- business-the-science-and-art-of-communication-second-edition/ (eBook PDF) Econometrics by Example 2nd Edition http://ebooksecure.com/product/ebook-pdf-econometrics-by- example-2nd-edition/ My Psychology 1st Edition by Andrew M. Pomerantz (eBook PDF) http://ebooksecure.com/product/my-psychology-1st-edition-by- andrew-m-pomerantz-ebook-pdf/ (Original PDF) My Health 3rd Edition by Rebecca J. Donatelle http://ebooksecure.com/product/original-pdf-my-health-3rd- edition-by-rebecca-j-donatelle/
  • 3. My Revision Notes Edexcel A Level Economics by Quintin Brewer http://ebooksecure.com/product/my-revision-notes-edexcel-a-level- economics-by-quintin-brewer/ Mathematica by Example 5th Edition Martha L. Abell & James P. Braselton - eBook PDF https://ebooksecure.com/download/mathematica-by-example-ebook- pdf/ (eBook PDF) What is this thing called Philosophy? (What Is This Thing Called?) http://ebooksecure.com/product/ebook-pdf-what-is-this-thing- called-philosophy-what-is-this-thing-called/ (Original PDF) Understanding Capitalism: Competition, Command, and Change 4th Edition http://ebooksecure.com/product/original-pdf-understanding- capitalism-competition-command-and-change-4th-edition/ (eBook PDF) What is Psychology 3rd Edition http://ebooksecure.com/product/ebook-pdf-what-is-psychology-3rd- edition/
  • 4. ■<* EDITED BY HENRY LIEBERMAN YOUR WISH IS MY COMMAND o
  • 6. Microsoft UK Technical Learning Centre .1IIIIIIIIIIIIIIIII 33554000003957 Your Wish Is My Command Programming by Example
  • 7. The Morgan Kaufmann Series in Interactive Technologies Series Editors: ■ Stuart Card, Xerox PARC ■ Jonathan Grudin, Microsoft ■ Jakob Nielsen, Nielsen Norman Group ■ Tim Skelly, Design Happy Your Wish is My Command: Programming by Example Edited by Henry Lieberman GUI Bloopers: Don’ts and Do’sfor Software Developers and Web Designers Jeff Johnson Information Visualization: Perception for Design Colin Ware Robotsfor Kids: Exploring New Technologiesfor Learning Edited by Allison Druin and James Hendler Information Appliances and Beyond: Interaction Design for Consumer Products Edited by Eric Bergman Readings in Information Visualization: Using Vision to Think Written and edited by Stuart K. Card, Jock D. Mackinlay, and Ben Shneiderman The Design ofChildren’s Technology Edited by Allison Druin The Usability Engineering Lifecycle: A Practitioner’s Handbook for User Interface Design Deborah J. Mayhew Contextual Design: Defining Customer-Centered Systems Hugh Beyer and Karen Holtzblatt Human-Computer Interface Design: Success Stories, Emerging Methods, and Real World Context Edited by Marianne Rudisill, Clayton Lewis, Peter P. Poison, and Timothy D. McKay
  • 8. Your Wish Is My Command Programming by Example Edited by Henry Lieberman Media Lab Massachusetts Institute of Technology MORGAN KAUFMANN PUBLISHERS AN IMPRINT OF ACADEMIC PRESS A Harcourt Science and Technology Company SAN FRANCISCO SAN DIEGO NEW YORK BOSTON LONDON SYDNEY TOKYO
  • 9. Executive Editor Diane D. Cerra Assistant Developmental Editor Marilyn Alan Publishing Services Manager Scott Norton Production Editor Howard Severson Editorial Assistant Mona Buehler Cover Design Yvo Riezebos Cover Image Kazuo Kawai / Photonica; Back photo: © 2000 by Webb Chappell Text Design Rebecca Evans & Associates Copyeditor Laura Larson Proofreader Ruth Stevens Composition & Illustration Technologies ‘N Typography Indexer Steve Rath Printer Courier Corporation The following material is reprinted with permission from Communications ofthe ACM, March 2000, Vol. 43(3): Smith, D. C., Cypher, A., and Tesler, L. “Novice Programming Comes ofAge,” 75-81; Myers, B. A., McDaniel, R., and Wolber, D. “Intelligence in Demonstrational Interfaces,” fig. 3; Reperming, A. and Perrone, C. "Programming by Analogous Examples,” figs. 3, 4, and 5; St. Amant, R., Lieberman, H., Potter, R., and Zettlemoyer, L. “Visual Generalization in Programming by Example,” figs. 3 and 4. Designations used by companies to distinguish their products are often cltumed as trademarks or registered trademarks. In all instances where Morgan Kaufinann Publishers is aware of a claim, the product names appear in initial capital or all capital letters. Readers, however, should contact the appropriate companies for more com¬ plete information regarding trademarks and registration. ACADEMIC PRESS A Harcourt Science and Technology Company 525 B Street, Suite 1900, San Diego, CA 92101-4495, USA http://www.academicpress.com Academic Press Harcourt Place, 32 Jamestown Road, London NWl 7BY, United Kingdom http://www.academicpress.com Morgan Kaufinann Publishers 340 Pine Street, Sixth Floor, San Francisco, CA 94104-3205, USA http://WWW.mkp.com © 2001 by Academic Press All rights reserved Printed in the United States ofAmerica 05 04 03 02 01 54321 No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means—electronic, mechanical, photocopying, recording, or otherwise—without the prior written permission of the publisher. Library of Congress Cataloging-in-Publication Data Your wish is my command : programming by example / Henry Lieberman, editor, p. cm. Includes index. ISBN 1-55860-688-2 1. Computer programming. I. Lieberman, Henry. QA76.6.Y63 2001 005.2—dc21 00-069638 This book has been printed on acid-free paper.
  • 10. Foreword Ben Shneiderman University of Maryland Setting an alarm clock is probably the most common form of programming. Users set a time and then put the clock in alarm mode. Older twelve-hour mechanical clocks usually had a special alarm hand that could be moved to the time for the alarm to ring, and then the users turned the alarm switch on. A nice form of direct manipulation programming—easy to learn and use. Direct manipulation is a term I coined in 1981 to describe the visual world of action in many successful graphical user interfaces such as video games, air traffic control, and what-you-see-is-what-you-get word proces¬ sors. The principles were to • represent the objects and actions visually, • replace typing with pointing and dragging, • provide rapid, incremental and reversible actions, and • offer immediate and continuous feedback to users. These principles can lead to interfaces that help novices and experts, pre¬ vent or at least reduce errors, and encourage exploration because reversibil¬ ity is supported. Designers continue to refine and extend direct manipula¬ tion, but critics complain that direct manipulation only works for limited tasks. They often ignore the possibility of direct manipulation program¬ ming, which was part of the original conception (Shneiderman 1982, 1983). To explore the possibilities, we built a direct manipulation programming tool in 1984-85 that enables users to create macros for MS DOS. This tool. Direct Manipulation DOS (DMDOS) (Iseki 1986), enabled users to record and view their actions, and then store and replay macros. We were moti¬ vated by successful macro facilities for Unk, word processors, and spread¬ sheets. These early keyboard-oriented systems led us to joke that “those who ignore history are destined to retype it.” We were also inspired by V
  • 11. vi Foreword innovative programming by demonstration in David Canfield Smith’s (1977) Pygmalion, graphical macro facilities in Dan Halbert’s (1984) SmallStar, and Alan MacDonald’s (1982) early call for visual programming. These pioneers and other innovators believed in the goal of empowering users to create useful programs, extend existing interfaces, and build small just-in-time programs that automated daily tasks. This important volume carries forward the agenda of making direct ma¬ nipulation programming (or programming by example, programming by demonstration, end-user programming, programming in the user interface, etc.) a reality. While there have been successes in the intervening years, such as programmable machine tools, visual programming languages, and a variety of macro-building programs, widespread adoption is still elusive. Henry Lieberman deserves credit for his long devotion to this topic and for collecting the diverse strategies and application domains in this volume. He and the contributors to this volume remind us all of the breadth of opportu¬ nities and depth of ambition. The allure of direct manipulation programming is its capacity to em¬ power users, while minimizing learning of programming concepts. Re¬ searchers continue to seek simple cognitive models for programming that are in harmony with the cognitive model of the existing user interface. Just as the programmable mechanical alarm clock is tied to the familiar model of clock hands, researchers have wanted to build on the visual nature of graphical user interfaces. This fundamental human-computer interaction challenge has inspired a generation of designers, who have come up with innovative strategies for supporting iteration, conditionals, parameter passing, modular design, pat¬ tern matching, and data representation. This treasure chest of strategies is likely to pay off in multiple solutions for direct manipulation programming and related problems. A successful strategy would not only be easy to learn but also support rapid composition of common programs. Then it would also be easy to invoke, with comprehensible feedback about successful and unsuccessful executions. One strategy represented in this book is to develop software that recog¬ nizes familiar patterns of action and infers a useful program. There may be some opportunities along this path, but 1 prefer the second path of special tools for users to create a program, just as they move the special hand of an alarm clock to set the wake-up time. A third path, also well represented in this book, is visual programming languages in which the users set out to write a program, but visually instead of textually. Visual programming languages may have a simple basis such as
  • 12. Foreword vii dragging items from a relational table to a screen-based form to create a re¬ port program. More elaborate visual programming languages have graphic symbols to represent objects, actions, conditionals, loops, and pattern matching. A fourth path might be to add history capture environments for every interface. Unix command line interfaces had a history log that allowed users to conveniently review and reuse commands. World Wide Web browsers support history keeping of page visits with relatively easy review and reuse. Microsoft Word captures a history of actions to support undo operations, but users cannot review the history or save it. Adobe Photoshop 5.0 added a nice history feature for graphic designers, demonstrating that even in com¬ plex environments, rich history support is possible. Our current efforts with Simulation Processes in a Learning Environ¬ ment have emphasized history keeping, enabling users to review their work, replay it, annotate it, and send it to peers or mentors for advice (Plaisant 1999). An immediate payoff was that faculty could run the simulation in ex¬ emplary or inappropriate ways and store the histories for students to use as a training aid. The story of this field and this book is that there is magic and power in creating programs by direct manipulation activities, as opposed to writing code. The potential for users to take control of technology, customize their experiences, and creatively extend their software tools is compelling. Eighteenth-century scientists, such as Ben Franklin, experimented with electricity and found its properties quite amazing. Franklin, Michael Fara¬ day, James Clerk Maxwell, and others laid the foundation for Thomas Edi¬ son’s diverse applications, such as refinements of telegraphy, generators, and electric lighting. This book brings reports from many Franklins, Fara¬ days, and Maxwells who are laying the foundation for the Thomas Edisons still to come. It is difficult to tell which idea will trigger broad dissemination or whose insight will spark a new industry. However, the excitement is electric. References Halbert, Daniel. 1984. Programming by example. Ph.D. diss. University of California, Berkeley. (Available as Xerox Report OSD-T8402, Palo Alto, CA, 1984.) Iseki, O. and B. Shneiderman. 1986. Applying direct manipulation concepts: Direct Manipulation Disk Operating System (DMDOS). ACM SIGSOFT Software Engi¬ neering Notes 11, no. 2 (April): 22-26.
  • 13. viii Foreword MacDonald, Alan. 1982. Visual programming. Datamation 28, no. 11 (October): 132- 140. Plaisant, C., A. Rose, G. Rubloff, R. Salter, and B. Shneiderman. The design of history mechanisms and their use in collaborative educational simulations. In Proceed¬ ings of the Computer Supported Collaborative Learning Conference (December 1999). Shneiderman, B. The future of interactive systems and the emergence of direct ma¬ nipulation. Behaviour and Information Technology 1, no. 3 (1982) 237-256. - 1983. Direct manipulation: A step beyond programming languages. IEEE Computer 16, no. 8 (August 1983): 57-69. Smith, D. C. 1977. Pygmalion: A computer program to model and stimulate creative thought. Basel: Birkhauser.
  • 14. Contents Foreword Color Plates Introduction Chapter 1 Chapter 2 Ben Shneiderman V following page 192 1 Henry Lieberman Novice Programming Comes ofAge 7 David Canfield Smith, Allen Cypher, and Larry Tesler Abstract 8 1.1 Introduction 8 1.2 Programming without a Textual Programming Language 9 1.3 Theoretical Foundations 11 1.3.1 Sloman’s Approach 13 1.3.2 Bruner’s Approach 15 1.4 Empirical Evidence 16 1.5 Conclusion 18 References 19 Generalizing by Removing Detail: How Any Program Can Be Created by Working with Examples 21 Ken Kahn Abstract 22 2.1 Introduction 22 2.2 A Brief Introduction to ToonTalk 24 2.3 An Example of Programming by Example 26 ix
  • 15. X Contents 2.4 Discussion 40 2.5 Conclusion 42 Acknowledgements 43 References 43 Chapter 3 Demonstrational Interfaces: Sometimes You Need a Little Intelligence, Sometimes You Need a Lot 45 Brad A. Myers and Richard McDaniel Abstract 46 3.1 Introduction 46 3.2 Our Demonstrational Systems 47 3.3 Level of Intelligence 49 3.3.1 No Inferencing 50 3.3.2 Simple Rule-Based Inferencing 50 3.3.3 Sophisticated AI Algorithms 52 3.4 Feedback 54 3.5 Conclusion 57 Acknowledgements 58 References 58 Chapter 4 Web Browsing by Example 61 Atsushi Sugiura Abstract 62 4.1 Introduction 62 4.2 Underlying Problems of PBE 63 4.2.1 Problem of Inferring User Intent 63 4.2.2 Problem ofAccessing Internal Data of Applications 64 4.3 Web Browsing: Good Domain for PBE 64 4.4 Internet Scrapbook 65 4.4.1 Overview of Internet Scrapbook 66 4.4.2 Generating Matching Patterns 67 4.4.3 Extracting Data from Web Pages 70 4.4.4 Evaluation 71 4.5 SmallBrowse: Web-Browsing Interface for Small- Screen Computers 73
  • 16. Contents xi 4.5.1 Overview of SmallBrowse 74 4.5.2 Tip Help 80 4.5.3 Informal Experiments 80 4.6 Discussion 81 4.7 Conclusion 83 Appendix: Copying HTML Data from Web Browser to Scrapbook 84 References 85 Chapter 5 Trainable Information Agents for the Web 87 Mathias Bauer, Dietmar Dengler, and Gabriele Paul Abstract 88 5.1 Introduction 88 5.2 An Application Scenario 89 5.3 The HyQL Query Language 91 5.3.1 The Construction of Wrappers 94 5.4 The Training Dialogue 96 5.4.1 Wrapper Generation and Assessment 98 5.4.2 Suggesting an Action 100 5.4.3 Executing an Action 101 5.4.4 A Simple Training Dialogue 102 5.5 Lessons Learned 104 5.6 The Communication Problem 105 5.7 Another Application Scenario 109 5.8 Related Work (Non-PBE) 110 5.9 Conclusion 112 Acknowledgments 112 References 113 Chapter 6 End Users and GIS: A Demonstration Is Worth a Thousand Words 11- Carol Traynor and Marian G. Williams Abstract 116 6.1 Introduction 116 6.2 A Story of End Users and GIS 116 6.3 Why Is GIS Software So Hard to Use? 118 6.4 Are Things Improving for GIS Users? 120
  • 17. xii Contents 6.5 How Can Programming by Demonstration Help? 121 6.6 A Programming-by-Demonstration Approach for CIS: C-SPRL 123 6.7 Conclusion 132 Acknowledgements 132 References 132 Chapter 7 Bringing Programming by Demonstration to CAD Users 135 Patrick Girard Abstract 136 7.1 Introduction 136 7.2 PBD and CAD 137 7.2.1 CAD: A Suitable Area for PBD 137 7.2.2 Variational and Parametric Solutions 140 7.2.3 Requirements for PBD in CAD 142 7.3 Toward a Complete Solution 143 7.3.1 Classical 2D CAD Systems 143 7.3.2 Specificity and Naming in CAD 145 7.3.3 Expressiveness 149 7.4 True Explicit PBD Solutions 155 7.4.1 Fully Integrated PBD Systems 155 7.4.2 An Actual Programming Environment, but for Users... 157 7.5 Conclusion 159 References 160 Chapter 8 Demonstrating the Hidden Features that Make an Application Work 163 Richard McDaniel Abstract 164 8.1 Introduction 164 8.2 The Perils of Plain Demonstration 165 8.3 Who Is Actually Programming? 166 8.4 Giving the System Hints 167 8.4.1 Creating Special Objects 167 8.4.2 Selecting the Right Behaviors 170
  • 18. Contents 8.5 The Programming Environment Matters 171 8.6 Conclusion 172 References 174 Chapter 9 A Reporting Tool Using Programming by Example for Format Designation Tetsuya Masuishi and Nobuo Takahashi Abstract 176 9.1 Introduction 176 9.2 System Overview 178 9.2.1 System Configuration 178 9.3 User Interface of Format Editor 179 9.3.1 Window Configuration 179 9.3.2 Specifying Iteration 180 9.3.3 Adjustment 182 9.4 Extracting Formatting Rules 182 9.5 Generating Reports 183 9.6 Example of the Process 183 9.7 Evaluation 187 9.8 Conclusion 190 References 190 Chapter 10 Composition by Example Toshiyuki Masui Abstract 192 10.1 Introduction 192 10.2 PBE-Based Text Editing Systems 193 10.3 Dynamic Macro: A PBE-Based Text Editing System 193 10.4 POBox: A PBE-Based Text Input System 197 10.4.1 Various Text Input Techniques 197 10.4.2 POBox Architecture 200 10.4.3 POBox for Pen-Based Computers 202 10.4.4 Using POBox on a Cellular Phone 204 10.4.5 POBox Server on the Internet 206 10.5 Conclusion 207 References 207
  • 19. xiv Contents Chapter 11 Learning Repetitive Text-Editing Procedures with SMARTedit 209 Tessa Lau, Steven A. Wolfman, Pedro Domingos, and Daniel S. Weld Abstract 210 11.1 Introduction 210 11.2 The SMARTedit User Interface 212 11.3 The Smarts behind SMARTedit 215 11.4 Choosing the Most Likely Action 219 11.5 Making SMARTedit a More Intelligent Student 221 11.6 Other Directions for SMARTedit 223 11.7 Comparison with Other Text-Editing PBD Systems 223 11.8 Conclusion 224 References 225 Chapter 12 Training Agents to Recognize Text by Example 227 Henry Lieberman, Bonnie A. Nardi, and DavidJ. Wright Abstract 228 12.1 Text Recognition Agents 228 12.2 Writing Conventional Grammars as Text 230 12.3 Programming Grammars by Example for More Accessibility 231 12.4 Grammex: A Demonstrational Interface for Grammar Definition 232 12.5 An Example: Defining a Grammar for Email Addresses 233 12.5.1 Top-Down Definition 234 12.6 Rule Definitions from Multiple Examples 236 12.6.1 Definition of Recursive Grammar Rules 236 12.6.2 Managing Sets of Rule Definitions 238 12.6.3 Complexity and Scalability 239 12.6.4 Defining Actions by Example 240 12.7 Future Work: Using Grammar Induction to Speed Up the Definition Process 241 12.8 Related Work 242
  • 20. Contents XV Chapter 13 Chapter 14 12.9 Conclusion 243 Acknowledgements 243 References 243 SWYN: A Visual Representation for Regular Expressions 245 Alan E Blackwell Abstract 246 13.1 Introduction 246 13.1.1 Factors in the Usability of PBE Systems 247 13.1.2 A Test Case for Visibility in PBE 248 13.1.3 Summary of Objectives 249 13.2 Other PBE Systems for Inferring Regular Expressions 250 13.3 A User Interface for Creating Regular Expressions from Examples 251 13.4 A Heuristic Algorithm for Regular Expression Inference 255 13.4.1 Probabilistic Algorithm 256 13.5 A Visual Notation for Regular Expressions 258 13.5.1 Experiment: Evaluation of Alternative Representations 259 13.5.2 Method 261 13.5.3 Results 263 13.5.4 Discussion 264 13.6 An Integrated Facility for Regular Expression Creation 265 13.6.1 Visual Integration with Data 265 13.6.2 Modification of the Regular Expression 266 13.7 Conclusion 267 Acknowledgements 268 References 268 Learning Users’ Habits to Automate Repetitive Tasks 271 Jean-David Ruvini and Christophe Dony Abstract 272 14.1 Introduction 272
  • 21. xvi Contents 14.2 Overview of APE 274 14.2.1 The Observer 276 14.2.2 The Apprentice 277 14.2.3 The Assistant 278 14.3 Illustrative Examples 279 14.3.1 Example 1 279 14.3.2 Example 2 281 14.3.3 Example 3 281 14.3.4 Example 4 284 14.4 Detecting Repetitive Tasks 284 14.4.1 Repetitive Sequences ofActions 284 14.4.2 Loops 284 14.4.3 Writing of Repetitive Pieces of Code 286 14.4.4 Repetitive Corrections of (Simple) Programming Errors 286 14.5 Learning a User’s Habits 286 14.5.1 What Makes the Problem Difficult? 287 14.5.2 Which Algorithms? 288 14.5.3 A New Algorithm 289 14.6 Use and Experimental Results 290 14.7 Conclusion 293 References 294 Chapter 15 Domain-Independent Programming by Demonstration in Existing Applications 297 Gordon W. Paynter and Ian H. Witten Abstract 298 15.1 Introduction 298 15.2 What Familiar Does 300 15.2.1 Arranging Files 301 15.2.2 When Errors Occur 304 15.2.3 Sorting Files 306 15.2.4 Converting Images 309 15.3 Platform Requirements 311 15.4 AppleScript: A Commercial Platform 313 15.4.1 High-Level Event Architectures 313 15.4.2 Deficiencies of the Language 314 15.4.3 Deficiencies of AppleScript Implementations 316
  • 22. Contents xvii Chapter 16 Chapter 17 15.4.4 Learning from AppleScript’s Shortcomings 317 15.5 Conclusion 318 References 319 Stimulus-Response PBD: Demonstrating “When” as well as “What” 321 David W. Wolber and Brad A. Myers Abstract 322 16.1 Introduction 322 16.1.1 PBD: An Elaboration of Macro Recording 322 16.1.2 PBD Macro Invocation 323 16.1.3 Augmenting the Capabilities of Traditional Interface Builders 324 16.1.4 A Quick Example 324 16.1.5 Wait a Second! 326 16.2 The Syntax of Stimulus-Response 326 16.2.1 Eliminating Modes 327 16.2.2 Demonstrating Stimuli 328 16.2.3 Demonstrating Responses 334 16.2.4 Demonstrating Aids: Guide Objects and Ghost Marks 334 16.3 The Semantics of Stimulus-Response 336 16.3.1 Object Descriptor Problem 337 16.3.2 Response Parameter Descriptors 338 16.3.3 Linear Proportions 339 16.3.4 Complex Parameters 340 16.4 Feedback and Editing 340 16.4.1 Storyboards 341 16.4.2 The Stimulus-Response Score 341 16.5 Conclusion 342 References 343 Pavlov: Where PBD Meets Macromedia’s Director David Wolber Abstract 346
  • 23. xviii Contents Chapter 18 Chapter 19 17.1 Introduction 346 17.2 Example 346 17.3 Objects that React Asynchronously to Events 347 17.4 Conclusion 349 References 350 Programming by Analogous Examples 351 Alexander Repenning and Corrina Perrone Abstract 352 18.1 Introduction 352 18.2 The GUI to Program Chasm 354 18.3 Programming by Analogous Examples 356 18.3.1 Making Cars Move Like Trains: An Analogy 357 18.4 Discussion 360 18.4.1 Beyond Syntactic Rewrite Rules 360 18.4.2 Erom Substitutions to Analogies 363 18.4.3 Reuse through Inheritance 366 18.5 Conclusion 367 Acknowledgements 368 References 368 Visual Generalization in Programming by Example 371 Robert St. Amant, Henry Lieberman, Richard Potter, and Luke Zettlemoyer Abstract 372 19.1 If You Can See It, You Should Be Able to Program It 372 19.2 What Does Visual Generalization Buy Us? 374 19.3 Low-Level Visual Generalization 376 19.4 High-Level Visual Generalization 378 19.5 Introducing Novel Generalizations: Generalizing on Grids 381 19.6 Conclusion 383 References 384
  • 24. Your Wish Is My Command Programming by Example
  • 25. ■ A .f •i' •■' - • i ' ♦. i. f *f V. ({p I c, v-’ii. •• ^' .. ^ . ^ f ^1-#’ Vf » /.j, ,ij’/l<..**. fiUiax^f ■ --^< 'w^ M - liS • ?"»>CVA,-' •' “ ri/’t** - *-*.4CcV. • ■ * •'4) ‘ > “ '; *■ V- :,-» w Itru I V cS.;;v- ' ^ L:f - » ■ - »c^ . ‘i^- .. f , ■ A V - y;. f?» • ^■' ,:JA -■ !lt« * ^ ’=•*■' # • ; . . I . '* •>-■** • , .- / -'V <- .- ■ •. ■ 1 ■J 0v' ^ ,r>- •H.' ;.v v . .‘- ■■■'** •'f'‘ ' “ - i • •' j ' •■ ■'. *■ '•■ ■^'’A- ■■■ '; 'i ■ *.> : r:— »A ■• , -• ■:' :^<r:
  • 27. 2 Introduction When I first started to learn about programming (many more years ago than I care to think about), my idea of how it should work was that it should be like teaching someone how to perform a task. After all, isn’t the goal of programming to get the computer to learn some new behavior? And what better way to teach than by example? So I imagined that what you would do would be to show the computer an example of what you wanted it to do, go through it step by step, have the computer remember all the steps, and then have it try to apply what you showed it in some new example. I guessed that you’d have to learn some special instructions that would tell it what would change from example to example and what would remain the same. But basically, I imagined it would work by remembering examples you showed it and replaying re¬ membered procedures. Imagine my shock when I found out how most computer programmers actually did their work. It wasn’t like that at all. There were these things called “programming languages’’ that didn’t have much to do with what you were actually working on. You had to write out all the instructions for the program in advance, without being able to see what any of them did. How could you know whether they did what you wanted? If you didn’t get the syntax exactly right (and who could?), nothing would work. Once you had the program and you tried it out, if something went wrong, you couldn’t see what was going on in the program. How could you tell which part of the program was wrong? Wait a second, I thought, this approach to program¬ ming couldn’t possibly work! I’m still trying to fix it. Over the years, a small but dedicated group of researchers who felt the same way developed a radically different approach to programming, called programming by example (PBE) or sometimes programming by demonstra¬ tion (the user demonstrates examples to the computer). In this approach, a software agent records the interactions between the user and a con¬ ventional “direct-manipulation” interface and writes a program that corre¬ sponds to the user’s actions. The agent can then generalize the program so that it can work in other situations similar to, but not necessarily exactly the same as, the examples on which it is taught. It is this generalization capability that makes PBE like macros on ste¬ roids. Conventional macros are limited to playing back exactly the steps re¬ corded and so are brittle because if even the slightest detail of the context changes, the macro will cease to work. Generalization is the central prob¬ lem of PBE and, ultimately, should enable PBE to completely replace con¬ ventional programming.
  • 28. Introduction 3 Significantly, the first real commercial market for PBE systems might be children. Children are not “spoiled” by conventional ideas of programming, and usability and immediacy of systems for them are paramount. We'll present two systems that have been recently brought to market and are en¬ joying enthusiastic reception from their initial users. David Smith, Allen Cypher, and Larry Tesler’s Stagecast Creator, evolved from Apple’s Cocoa/ KidSim, brings rule-based programming by example to a graphical grid world. Ken Kahn’s ToonTalk, a programming system that is itself a video game, uses a radically different programming model as well as a radical user interface. The crucial problem of generalizing examples gets solved in a simple, almost obvious way—if you remove detail from a program, it be¬ comes more general. Later in the book, we’ll see Alexander Repenning and Corrina Perrone-Smith’s AgentSheets, which operates in a similar domain and for a similar audience. One way in which PBE departs from conventional software is by apply¬ ing new techniques from artificial intelligence (AI) and machine learning. This approach opens up both a tremendous opportunity and also some new risks. Brad Myers and Rich McDaniel treat the thorny issue of “How much intelligence?” from their wide experience in building a variety of PBE systems. Of course, we can’t convince people about the value of programming by example unless we have some good examples of application areas for it! Next, we move to some application areas that show how PBE can really make a difference. Everybody’s current favorite application area is the Web. The Web is a great area for PBE because of the accessibility of a wealth of knowledge, along with the pressing need for helping the user in organizing, retrieving, and browsing it. The emerging developments in intelligent agents can help—but only if users can communicate their requirements and control the behavior of the agent. PBE is ideal. Atsushi Sugiura’s Internet Scrapbook automates assembling Web pages from other Web sources, and he also explores Web browsers on small hand¬ held devices. Mathias Bauer, Dietmar Dengler, and Gabriele Paul present a mixed initiative system: at each step, either the user or the agent can take action, cooperating to arrive at a “wrapper” that describes the format of Web pages. Carol Traynor and Marian Williams point out the suitability of PBE for domains that are inherently graphical, such as Geographic Information Sys¬ tems. If you can see it and point to it, you should be able to program it. PBE lets users see what they are doing, unlike conventional program¬ ming languages, in which graphical data can only be referenced in a
  • 29. 4 Introduction program by file names and numbers. They illustrate the utility of PBE for “user-programmers”—those who specialize in the use of a particular appli¬ cation but also, at least occasionally, have the need to resort to program¬ ming. Patrick Girard embeds a PBE system in an industrial-strength com¬ puter-aided design (CAD) application. Designers of mechanical, electrical, manufacturing, or architectural systems can see the objects they are trying to design directly. Rich McDaniel moves from static graphics to the dynamic world of computer games, showing how interaction techniques can also demonstrate “hidden features” of applications that are not directly reflected in the graphics that the user will eventually see but are nevertheless crucial. PBE can automate many common but mundane tasks that tend to con¬ sume a frustratingly large fraction of people’s time. Text editing remains the application that people spend the greatest amount of time in, and so text editing applications are the target of the next set of PBE systems we’ll look at. Tetsuya Masuishi and Nobuo Takahashi use PBE successfully for the common editing task of generating reports. Toshiyuki Masui’s Dynamic Macro and PoBox systems use loop detection and a predictive interface to automate repetitive typing and editing, which can be especially impor¬ tant in minimizing typing in small handheld devices or for users with dis¬ abilities. The systems of Masuishi, Masui, and Sugiura have all been distrib¬ uted to a large user community in Japan. Tessa Lau, Steve Wolfman, Pedro Domingos, and Dan Weld use the time-honored AI technique of version spaces to maintain a space of hypotheses about user actions, illustrating the synergy between work in machine learning and PBE. Bonnie Nardi, David Wright, and I also put PBE to work for user conve¬ nience, in training text recognition agents to recognize by example com¬ mon patterns of data that occur in the midst of unstructured information. Their PBE system for developing text recognition grammars, Grammex, was the first interactive interface of any kind to make the powerful grammar and parsing technology accessible to end users. Alan Blackwell adds to this gen¬ eral approach a visual syntax for the grammar rules, which he shows in¬ creases user comprehension of the resulting programs. We shouldn’t forget programming environments themselves as a do¬ main for PBE, even if the programming is done in a conventional write-a- file-and-compile-it programming environment. Jean-David Ruvini and Christophe Dony take advantage of the truism that people are creatures of habit. They have a software agent detect habitual patterns in a conven¬ tional programming language environment, Smalltalk, and automate those patterns. Well, if PBE is so great, how come everybody isn’t using it? It’s our hope that they soon will. But we realize that PBE represents such a radical
  • 30. Introduction 5 departure from what we now know as “programming” that it is inevitably going to take a while before it becomes widespread. Despite the existence of many systems showing the feasibility of PBE in a wide variety of domains, conservatism of the programming community still seems the biggest obstacle. Signs are growing, however, that PBE might just be beginning to catch on. Commercial PBE environments are beginning to appear, such as the children’s PBE environments cited earlier that are now on the market. But it also makes sense to view more conventional user-programming facilities, such as so-called “interface builders,” macros, and scripting systems, as the “poor man’s programming by example.” Some of these facilities are begin¬ ning to evolve in directions that may incorporate elements of the PBE ap¬ proach. We also will need conventional applications to become more “PBE- friendly” so that PBE systems can use the conventional applications as tools in the same way that a user would operate them manually. Gordon Paynter and Ian Witten show how we might be able to leverage scripting language and macro capabilities that are already present or on the way for applica¬ tions into full-blown PBE systems. This might facilitate an adoption path for PBE. In programming, as in theater, timing is everything. Much of the work in PBE is involved with demonstrating how to do something, but equally im¬ portant is when to do it. David Wolber and Brad Myers explore what they call “stimulus-response” PBE, in which we generalize on time and user in¬ put, to assure that PBE-programmed procedures are invoked at just the right time. Wolber also compares his PBE animation system to a conven¬ tional animation editor/scripting system. Macromind Director, which brings the similarities and differences of PBE versus conventional applica¬ tions into sharp focus. We then move on to explore some directions where PBE might be head¬ ing in the future. Alexander Repenning and Corinna Perrone-Smith show how we can take PBE a step further, using another important intuitive cog¬ nitive mechanism—analogy. We often explain new examples by way of analogy with things we already know, thus allowing us to transfer and reuse old knowledge. Repenning and Perrone-Smith show how we can use anal¬ ogy mechanisms to edit programs by example as well as create them from scratch. Robert St. Amant, Luke Zettlemoyer, Richard Potter, and I explore what at first might seem like a crazy approach. We actually have the computer simulate the user’s visual system in interpreting images on the screen rather than accessing the underlying data. Though it may seem inefficient, it neatly sidesteps one of the thorniest problems for PBE: coexistence with
  • 31. 6 Introduction conventional applications. The approach enables “visual generalization”— generalizing on how things appear on the screen, as well as properties of the data. Programming by example is one of the few technologies that holds the potential of breaking down the wall that now separates programmers from users. It can give ordinary users the ability to write programs while still op¬ erating in the familiar user interface. Users are now at the mercy of soft¬ ware providers who deliver shrink-wrapped, one-size-fits-all, unmodifiable “applications.” With PBE, users could create personalized solutions to one- of-a-kind problems, modifying existing programs and creating new ones, without going through the arcane voodoo that characterizes conventional programming. In this collection of articles, we hope that the diversity of sys¬ tems presented, compelling user scenarios, and promising directions for the future of PBE will convincingly demonstrate the power and potential of this exciting technology. Acknowledgements I’d like to give special thanks to Andy Rosenbloom at ACM for giving me the impetus to get started on this project. Diane Cerra, Marilyn Alan, and Howard Severson at Morgan Kauffman were helpful throughout the publi¬ cation process. I’d also like to extend personal thanks to Christopher Fry, Suzanne Hanser, Walt Lieberman, Cindy Mason, Pattie Maes, Joanie Morris, Liz Rosenzweig, Sybil Shearin, Ted Selker, and Jim Youll. And a special thanks to the contributors to this book, who are all terrific examples of friends and colleagues. About the Web Site Some of the book’s color figures appear in the color insert following page 192. You can also view all of the book’s full-color figures at Morgan Kaufmann’s Your Wish Is My Command Web site at http://www.mkp.com/ your_wish/.
  • 32. Chapter Novice Programming Comes ofAge David Canfield Smith Stagecast Software, Inc. Allen Cypher Stagecast Software, Inc. Larry Tesler Stagecast Software, Inc.
  • 33. 8 Chapter One Novice Programming Comes of Age Abstract Since the late 1960s, programming language designers have been trying to develop approaches to programming computers that would succeed with novices. None has gained widespread acceptance. We have taken a different approach. We eliminate traditional programming languages in favor of a combination of two other technologies: programming by demonstration (PBD) and visual before-after rules. Our approach is now available as a product named Stagecast Creator, which was introduced in March 1999. It is one of the first commercial uses of PBD. Stagecast Creator enables even children to create their own interactive stories, games, and simulations. Here, we describe our approach, offer independent evidence that it works for novices, and discuss why it works when other approaches haven’t and, more important, can’t. 1 • 1 Introduction The computer is the most powerful tool ever devised for processing infor¬ mation, promising to make people’s lives richer (in several senses). But much of this potential is unrealized. Today, the only way most people are able to interact with computers is through programs (applications) written by other people. This limited interaction represents a myopic and Procrus¬ tean view of computers, like Alice looking at the garden in Wonderland through a keyhole. Until people can program computers themselves, they’ll be able to exploit only a fraction of a computer’s power. The limits of conventional interaction have long motivated researchers in end-user programming. An end user in this context uses a computer but has never taken a programming class—a definition describing the vast ma¬ jority of computer users. We use the term novice programmer to describe end users who want to program computers. Is novice programmer an oxy¬ moron? Is it a reasonable goal? Certainly there are “novice document writ¬ ers,” “novice spreadsheet modelers,” and even “novice Internet surfers.” But in more than thirty years of trying, no one has come up with an approach that enables novices to program computers. Elliot Soloway, director of the Highly Interactive Computing Project at the University of Michigan, esti¬ mates that even for novices who do take a programming class, less than 1 percent continue to program when the class ends. We’ll explore the reasons for this, but first we explore our own new approach to programming that seems to work for novices.
  • 34. 1.2 Programming without a Textual Programming Language 9 Stagecast Creator, a novice programming system for constructing simu¬ lations from Stagecast Software, Inc., founded by the authors and others in 1997, is the culmination of a seven-year research and development effort, the first five at Apple Computer (Smith, Cypher, and Spohrer 1994; Cypher and Smith 1995; Smith and Cypher 1995; Smith, Cypher, and Schmucker 1996). The project, initially called KidSim, was later renamed Cocoa, and finally became Creator. The goal was to make computers more useful in ed¬ ucation. The co-inventors of Creator—the authors Smith and Cypher—de¬ cided to focus on simulations because simulations are a powerful teaching tool. They can make abstract ideas concrete and understandable. Interac¬ tion with them is unstructured and explanatory in nature. Students can conduct experiments. They can formulate hypotheses as to what will hap¬ pen, then run a simulation and observe the results (the scientific method). When their hypotheses are refuted, students really get engaged. They lean toward the monitor and begin talking animatedly with each other. Even better, v^th Creator children learn by building simulations, encouraging the constructivist approach to learning. Children learn sequential, causal rea¬ soning. In view of this potential, the goal of the Creator project evolved into empowering end users (teachers and students) to construct and modify simulations through programming. Our initial approach was much like that of other language developers: to invent a programming language that would be acceptable to end users. We tried a variety of syntaxes; all failed dismally. That experience, together with the history of programming languages during the past thirty years—from Basic to Pascal, from Logo to Smalltalk, from HyperTalk to Lingo—con¬ vinced us we could never come up with a language that would work for novices. Our first insight was that language itself is the problem and that any tex¬ tual computer language represents an inherent barrier to user understand¬ ing. Learning a new language is difficult for most people. Consider the years of study required to learn a foreign language, and such languages are natu¬ ral languages. A programming language is an artificial language that deals with the arcane world of algorithms and data structures. We concluded that no conventional programming language would ever be widely accepted by end users. 1 .2 Programming without a Textual Programming Language How can a computer be programmed without a textual programming language? Our solution combined two existing techniques: PBD and visual
  • 35. 10 Chapter One Novice Programming Comes of Age before-after rules. In PBD, users demonstrate algorithms to the computer by operating the computer’s interface just as they would if they weren’t pro¬ gramming. The computer records the user’s actions and can reexecute them later on different inputs. PBD’s most important characteristic is that every¬ one can do it. PBD is not much different from or more difficult than using the computer normally. This characteristic led us to consider PBD as an al¬ ternative approach to syntactic languages. A problem with PBD has always been how to represent a recorded pro¬ gram to users. It’s no good allowing users to create a program easily and then require them to learn a difficult syntactic language to view and modify it, as vdth most PBD systems. In Creator, we first sought to show the re¬ corded program by representing each step in some form, either graphically or textually. Some of the representations were, in our opinion, elegant, but all tested terribly. Children would almost visibly shrink from their complex¬ ity. We eventually concluded that no one wanted to see all the steps; they were just too complicated. Our second insight was not to represent each step in a program; instead. Creator displays only the beginning and ending states. Creator does in fact have a syntax—the lists of tests and actions in a rule—but people can create programs for a long time without even being aware of this syntax. This fea¬ ture is dramatically different from conventional languages, in which users must know whether a routine is called “move” or “go,” the order of the pa¬ rameters, and where all the various quotation marks, semicolons, and pa¬ rentheses belong. As an example of the Creator approach, suppose we want the engine of a train simulation to move to the right. We move the engine by defining a vi¬ sual before-after rule for the engine. Rules are the Creator equivalent of subroutines in other languages. Each rule represents an arbitrary number of primitive operations, or statements in other languages. Visually, Creator shows a picture of a small portion of the simulation on the left, then an ar¬ row, and then a picture of what we want the simulation to look like after the rule executes. Figure 1.1 shows the interactive, visual process of creating a rule by demonstration. First, we define the initial rule. Notice that the left and right sides start out the same; all rules begin as identity transformations. Users define the behavior of the rule by demonstrating changes to the right side. Here, we grab the engine with the mouse and drag it to the right. When we drop the engine, it snaps to the grid square it is over. That’s all there is to it. No¬ where did we type beg in-end, if-then-else, semicolons, parenthe¬ ses, or any other language syntax. The rule we just created may be read as follows:
  • 36. 1.3 Theoretical Foundations 11 Figure Define Drag Drop Defining a rule by demonstration. If the engine is on a piece of straight track and there is straight track to its right, then move the engine to the right. Notice that programming is kept in domain terms, such as engines and track, rather than in computer terms, such as arrays and vectors. Also, in¬ stead of dealing with objects indirectly through coordinates, users program them by manipulating them directly; that is PBD (see Table 1.1). Since a rule in Creator may not show all the steps involved, just their be¬ ginning and ending states, it is not a representation for the steps, suggesting instead the ejfect of the rule. The rule acts as a memory jogger for users. This turned out to be the key technique in Creator for helping users under¬ stand recorded programs, even those written by others. A similar commercial software development system called AgentSheets, developed by Alexander Repenning (1993) at the University of Colorado in Boulder, also uses visual before-after rules (see Chapter 18, “Programming by Analogous Examples,” which also gives an example using a train). A delightful system, it is the closest to Creator of any software system we know of. 1 .3 Theoretical Foundations Why does Creator’s approach to programming apparently work where syn¬ tactic languages don’t? We hinted at the answer earlier. An essential
  • 37. 12 Chapter One Novice Programming Comes of Age Table 1,1 Examples ofthe kinds ofoperations that can be recorded by demonstration. Operation What the user does What the computer records Move Drag an object with the mouse Create Drag an object from the Character Drawer into the rule Delete Select an object by clicking on it and press the Delete key Set Variable Double-click on an object to dis¬ play its variables, select a variable’s value, and type a new value Move <object> to <location> Create <object> at <location> Delete < object> Put <value> into <object>’s <variable> ingredient is certainly the PBD technique, which eliminates the need for any syntactic language during program construction. The technique of us¬ ing visual before-after rules finishes the job, eliminating the need for any syntactic language for program representation. But why would these two techniques be acceptable to the typical novice programmer? The answer is interesting, illustrating why traditional approaches haven’t and, more im¬ portant, can’t work. The main problem novice programmers have when programming com¬ puters is the gap between the representations the brain uses when thinking about a problem and the representations a computer will accept. “For nov¬ ices, this gap is as wide as the Grand Canyon,” as Don Norman documented in his 1986 book User Centered System Design (see Figure 1.2). He argued that there are only two ways to bridge the gap: move the user closer to the system or move the system closer to the user. Programming classes try to do the former. Students are asked to learn to think like a computer. This radical refocusing of the mind’s eye is difficult for most people. Even if they learn to do it, they don’t like where they end up. They don’t want to think like a computer; they want to use computers to accomplish tasks they con¬ sider meaningful. In Creator, we’ve tried to do the opposite of what programming classes do—we want to bring the system closer to the user. We did this by making the representations used when programming the computer more like the representations used in the human brain. To do this, we needed a theory of the brain’s representations that would be helpful to us. We found two: one developed by Aaron Sloman, the other by Jerome Bruner.
  • 38. 1.3 Theoretical Foundations 13 *% Figure 1,2 The “Grand Canyon” gap between human and computer. 1.3.1 Sloman’s Approach In 1971, Aaron Sloman divided representations into two general types; ana¬ logical and “Fregean,” after Gottlob Frege, the inventor of predicate calcu¬ lus. In an analogical representation, Sloman wrote, “the structure of the rep¬ resentation gives information about the structure of what is represented” (Sloman 1971, 273). A map is an example; from a map, one can tell the rela¬ tionships between streets, the distance between two points, the locations of landmarks, and which way to turn when one comes to an intersection. By contrast, Sloman (1971) wrote: In a Fregean system there is basically only one type of “expressive” relation between parts of a configuration, namely the relation between “function- signs” and “argument-signs.” . . . The structure of such a configuration need not correspond to the structure of what it represents or denotes, (p. 273) We can, for example, represent some of the information in a map through predicate calculus statements, such as g: “Gravesend” u: "UnionVille” m: “Manhattan Beach” s: “Sheepshead Bay” East(g, u) EastSouthEast(s, g) South(m, s)
  • 39. Chapter One Novice Programming Comes ofAge Sloman goes on to say: The generality of Fregean systems may account for the extraordinary rich¬ ness of human thought. ... It may also account for our ability to think and reason about complex states of affairs involving many different kinds of ob¬ jects and relations at once. The price of this generality is the need to invent complex heuristic procedures for dealing efficiently with specific problem- domains. It seems, therefore, that for a frequently encountered problem do¬ main, it may be advantageous to use a more specialized mode of representa¬ tion richer in problem-solving power. (Sloman 1971, 274) Most programming languages use Fregean representations, aiming to be general and powerful. Creator emphasizes ease of use over generality and power, and so it has adopted analogical representations. Although Creator is “Turing-equivalent,” meaning it can compute anything, it addresses only the specialized problem domain of visual simulations. It doesn’t try to do everything well but is very good at what it does. A better way to describe it than Turing-equivalent may he “PacMan-equivalent.” Creator is powerful enough to let kids program the game PacMan. That’s all we’re trying to do. Creator uses analogical representations in its rules. For example, a rule for moving a train engine, as shown in Figure 1.1, can do the same thing as Fregean FlyperTalk code, which can include dozens of arcane commands, as in the following list which goes on for another seventy lines. It is obvious which is easier to understand. on runTrain global AutoSwitch,BtnIconName,PrevBtnlconName global Dir,PrevDir,LastLoc,Prev Logs,LookAhead , TheNextMove global LastMoveTime,SoundOff,MoveWait,Stag1ng, TheStage,TheEngine global TheMoves,Choices,Counter,Enginelcon.XEoc -This routine is long. -Most of the code is inline for acceptable speed lock screen setup!rain unlock screen repeat -check user action often if the mouseClick then checkOnThings the clickEoc -get iconName of current position
  • 40. 1.3 Theoretical Foundations 15 put iconName(i con of cd btn LookAhead) into BtnIconName if the number of items in BtnIconName > 1 then put “True” into Staging if TheStage = 0 then put BtnIconName into PrevBtnIconName if BtnIconName contains “roadXing” then put LookAhead into XLoc if BtnIconName contains “Rotatetrain” then put 1 into TheStage end if if the mousedick then checkOnThings the clickLoc put LastLoc & return before PrevLocs put LookAhead into LastLoc put Dir & return before PrevDir if the mouseClick then checkOnThings the clickLoc add 1 to Counter 1.3.2 Bruner's Approach In 1966, the educational psychologist Jerome Bruner (1966) asserted that any domain of knowledge can be represented in three ways: • “By a set of actions appropriate for achieving a certain result (‘enactive’ representation). We know many things for which we have no imagery and no words, and they are very hard to teach to anybody by the use of either words or diagrams and pictures.” For example, you can’t learn to swim by reading a book. • “By a set of summary images or graphics that stand for a concept with¬ out defining it fully {‘iconic’ representation).” For example, children learn what a horse is by seeing pictures of horses or actual living horses. • “By a set of symbolic or logical propositions drawn from a symbolic sys¬ tem that is governed by rules or laws for forming and transforming prop¬ ositions (‘symbolic’ representation).” The first two ways are analogical representations: the third is Fregean. Jean Piaget, the noted Swiss psychologist best known for his work in the developmental stages of children, believed that children grow out of their
  • 41. Chapter One Novice Programming Comes ofAge early enactive and iconic mentalities and that becoming an adult means learning to think symbolically. By contrast, Bruner recommends encourag¬ ing children to retain and use all three mentalities—enactive, iconic, and symbolic—when solving problems. All three are valuable in creative thinking. Creator seeks to involve all three mentalities in programming. The enactive mentality is involved in PBD when users manipulate images di- recdy; drag-and-drop functions are enactive. The iconic mentality is in¬ volved in visual before-after rules and the domain of visual simulations. Finally, the symbolic mentality is involved in Creator’s use of variables, which can help model deeper semantics in simulations. For example, pred- ator-prey-type simulations can be modeled through variables. 1 Empirical Evidence We’ve also gathered evidence that the Creator approach to programming works with novices. This evidence has taken three forms: informal observa¬ tion, formal user studies, and anecdotal user reports. Teachers and parents have used versions of Creator for years. We and our associates conducted hundreds of hours of direct tests on children and adults for the past five years, most on children ages six to twelve in school settings. We implemented three computer prototypes of Creator, each smaller and faster and closer to product quality than the previous one, testing each on progressively larger audiences of novice users, and the final prototype— Cocoa—to an audience of hundreds of novice users. We distributed Cocoa through the Internet, just as we have with Creator, but our most impor¬ tant source of information was longitudinal studies in several elementary school classrooms in California. Teachers integrated the prototypes into year-long curriculums designed to improve their students’ problem-solving skills. They contrived problems that required programming for their solu¬ tions; for example, one had her class program ocean science simulations. Our most gratifying success was when in June the students in one class asked to extend the school year so they could continue to work on their simulations. For the first six weeks of vacation, a third of the class continued to come to school once a week to program. The surprising thing is not that two-thirds of the children decided not to participate but that any of them wanted to keep coming to school during summer vacation. These kids did not find programming an onerous task.
  • 42. 1.4 Empirical Evidence 17 Figure Alien Abduction. Independent researchers at several universities in the United States and England conducted formal user studies of the Creator prototypes KidSim and Cocoa (Gilmore et al. 1995; Brand and Rader 1996; Sharpies 1996; Rader, Brand, and Lewis 1997). While each identified areas for improve¬ ment, all answered affirmatively what we consider the two most important questions; Can kids program with this approach? Do they enjoy it? The studies found that within fifteen minutes, most novice-user chil¬ dren were able to create running simulations with moving interacting ob¬ jects. The studies found no gender bias; girls and boys enjoy Creator equally. The studies also suggest that the technology is usable by novices and is flexible enough for implementing a variety of ideas. One of our early concerns was whether Creator would have enduring interest for children. WeVe now heard from some users and their parents and teachers that it does. For example, in Cedar Rapids, Iowa, Steve Strong, who teaches computer programming to students ages fourteen to seven¬ teen, lets each one choose the language he or she would like to learn, in¬ cluding C, Java, and Creator. Since adding Creator to the curriculum, he reports that as many girls as boys now take his course; students who use Creator have well-developed projects to show at the end of the class, whereas those using traditional languages typically have only a small part of their project implemented. Moreover, students learning Creator first and other languages later are better programmers than those who go directly to a traditional language.
  • 43. 18 Chapter One Novice Programming Comes of Age Figure Olivia’s Owl. Figure 1.3 shows a hilarious game created by a twelve-year-old boy in which a spaceship beams up cows. A user controls the ship’s direction with the arrow keys and the beam with the space bar. The goal is to beam up all the cows. Because of the high-level nature of the Creator rules, this game re¬ quired only thirteen rules to implement. Figure 1.4 shows a model created by an eleven-year-old girl of the way owls hunt mice in winter, when mice dig tunnels under the snow. But the owl had better watch out, because a wolf wants to eat it. The player controls the owl with the keyboard’s arrow keys. The trick is to drop the owl on the mouse just as it passes under its claws. The goal is to catch five mice with¬ out getting eaten yourself. This game (actually two games in one) required fifty-seven rules. 1 • 5 Conclusion Early evidence suggests the approach to programming being pioneered by Creator is more acceptable to novice programmers than traditional ap¬ proaches. Creator uses PBD, which is inherently enactive and iconic, for program construction. It also uses an analogical representation—visual be¬ fore-after rules—for its programs. The programming domain is limited to visual simulations, helping Creator bring the system closer to the user. In summary. Creator shifts the language design emphasis from computer sci¬ ence to human factors.
  • 44. References 19 References Brand, C., and C. Rader. 1996. How does a visual simulation program support stu¬ dents creating science models? In Proceedings of IEEE Symposium on Visual Languages (Boulder, Colo., Sept. 3-6). Los Alamitos, Calif.: IEEE Computer Soci¬ ety Press. Bruner, J. 1966. Toward a theory ofinstruction. Cambridge: Harvard University Press. Cypher, A., and D. Smith. 1995. KidSim: End user programming of simulations. In Proceedings ofCHESS (Denver, Colo., May 7-11). New York: ACM Press. Gilmore, D., K. Pheasey, J. Underwood, and G. Underwood. 1995. Learning graphi¬ cal programming: An evaluation of KidSim. In Proceedings of Interact 95 (Lillehammer, Norway, June 25-30). London: Chapman & Hall. Norman, D. 1986. Cognitive engineering. In User centered system design: New per¬ spectives on human-computer interaction, ed. D. Norman and S. Draper. Hillsdale, N.J.: Erlbaum. Rader, C., C. Brand, and C. Lewis. 1997. Degrees of comprehension: Children’s men¬ tal models of a visual programming environment. In Proceedings of CHI’97 (At¬ lanta, Ga.). New York: ACM Press. Repenning, A. 1993. AgentSheets: A tool for building domain-oriented dynamic visual environments. Ph.D. diss. University of Colorado, Boulder; see www. agentsheets.com. Sharpies, M. 1996. How far does KidSim meet its designers’ objectives of allow¬ ing children of all ages to construct and modify symbolic simulation? Report of the School of Cognitive and Computing Sciences, University of Sussex, Palmer, Brighton, England. Sloman, A. 1971. Interactions between philosophy and artificial intelligence: The role of intuition and non-logical reasoning in intelligence. In Proceedings of the 2nd International Joint Conference on Artijicial Intelligence (London). San Fran¬ cisco: Morgan Kaufmann. Smith, D., and A. Cypher. 1995. KidSim: Child-constructible simulations. In Proceed¬ ings ofimagina '95 (Monte Carlo, Feb. 1-3). Institut National de I’Audiovisuel. Smith, D., A. Cypher, and K. Schmucker. 1996. Making programming easier for children. In The design of children’s technology, ed. A. Druin. San Francisco: Morgan Kaufmann. See also Interactions ofACM 3, no. 5 (September-October 1996): 58-67. Smith, D., A. Cypher, and J. Spohrer. 1994. KidSim: Programming agents without a programming language. Common. ACM37, no. 7 (July): 54-67.
  • 45. - 4 * I in • -, J . ,v »J kr ;.i •I t >■ ■• ...... ^ I * y- ■ K. ' : »♦ . »»Sj| ?tf.-. ■,‘>7.;-ti^ ’.i. • f*V , .>4^^ *. *irvv 1.'^ -■ S*j»**^/fi.T'f " -.^ n^/ it.. »».■*»<-J'»' '*'J Ifit' t*^ii*6 <'^..*<MV'> >-ir-'.i*; i V :»■ ■'*-ti.;' W.n-'.i'S , , ♦; ; »-«► x 4,: :' iii#»ir^*) ^-V.^ Vjfcfc^5^4-: jttMj;; 'x-”*r¥ ■ * ^ • ..«/Sr5 • ■o'f<i ♦’n3iL»f^>'m^4;|^*v« , ,•> i*.***#^^ ^, ■ ■ t ■ 1 ^3*ii •■' *.--?^tt-*,»v. ,.-. *> ii- »■' t‘ > . iv -O' *■ ■»' '..• 1^ S ’‘i. .Mf ?.*■ •/ '‘iv • '.->t •• ?l li ’fcK •Vi''4i *■- io ■/i'f'^'^*'-V »,j'?>---.t‘‘^.'''>^S<'*i,V*i'$)JtV'»‘' ^r.. - t-R . ij* *•)■-" ■.*#•*• <».) tA ■•_ dC^ •'.%*^ ■''• "Vv ’* ' ,- i<. tr 1 '.I t'.- i_ .-4*' ■ j';y ^ < ! V, .-.It** ‘-*.« ■ -t'.. vJ^-i> ...«•, .. ^ ♦ v'Vj -r ^a-.'?-;''- ■*.:^-<-:<^*v^'f i • . *• A^rV- - I'if ■ • .!_''•'< fV.- ' * ■' ^ .‘m'' 0^)1^ * F mJ^‘ ' "'“ “O • ' ' *vurt^3-j'.0« I ,vvv* .j&.- V .1 .J.. ;.• » .^-fa^'ii^.^-mff^r. -. ,f ,' „(4, ,,x. ,; ... : .|i,^'jj.^/,T'^ , %i,.i-4.:fV: .' >■ n-y.' ...-^ '*vf i.'v.v'I V-. "jp.4s, 4m ' ■ t*t. m.x *s*A I i "t.W'T ry!!. ‘ -•.. iit*. 4 i-e *.L -•*.'' * ‘t j, l>*.* f‘ • ^®*i(ar'•>< ^ fo|i'.4» >•♦. ..%•. f...-i‘i^f’k .?•‘Vi ’ ^v . ^■... _j. • * .... :-■ ,'' . XiC.p.^v s : ;ii-.a*M‘' >* ■ - *,.' r *4 • •' ■ ■'ii Jc "trO:. . ,«* ; ■i/i?it il- __ " 1 'liJ >1 Oi « >s
  • 46. Chapter Generalizing by Removing Detail: How Any Program Can Be Created by Working with Examples KEN Kahn Animated Programs
  • 47. Chapter Two Generalizing by Removing Detail Abstract A long-standing goal of the programming by demonstration research com¬ munity is to enable people to construct programs by showing how the desired programs should work on sample inputs. A major challenge is how to make the programs general. Heuristics and inference can generalize re¬ corded actions on sample data in narrow domains but have yet to be much help in general-purpose programming. This chapter describes a program- ming system called ToonTalk (Kahn 1996, 2001) that takes a different ap¬ proach. In ToonTalk the programmer generalizes recorded actions by ex¬ plicitly removing details. Children as young as six have constructed a wide variety of programs in this manner (Playground 2001). 2 • 1 Introduction There is a very important interplay between the way in which pro¬ grams are created and generalized in ToonTalk and the underlying model of computation. A program is executed as a collection of autonomous processes that communicate asynchronously in which the behavior of a process is specified by a set of guarded clauses. A clause is constructed by performing operations on a single sample data structure. To make the clause capable of operating on other data structures, the programmer needs only to remove details from the guard or conditional part of the clause. ToonTalk is built on the idea of animated programming. Animated pro¬ grams are not constructed by typing text or by constructing diagrams or stringing icons together. Instead, the programmer is a character in an ani¬ mated virtual world where programming abstractions are replaced by tangi¬ ble analogs (see Figure 2.1). A data structure, for example, is a box whose holes can be filled with number or text pads, other boxes, birds, nests, and robots. Birds and nests are concrete analogs of send and receive capabilities on communication channels. A robot is a guarded clause that has been trained by the programmer to take actions when given a box. The thought bubble of a robot displays the guard or conditions that need to be satisfied before the robot will run. To generalize a robot, a programmer needs only to use an animated vacuum to remove details from the box inside the robot’s thought bubble.
  • 48. 2.1 Introduction 23 Figure 2*1 Computational Abstraction ToonTalk Concretization Computation 1 City Actor Process Concurrent object House ^9 Method Clause Robot f Guard Method preconditions Contents of thought bubble m _ Method actions Body Actions taught to a robot Message Array Vector Box I Comparison test Set of scales >45^/ tr - Process spawning Loaded truck Process termination Bomb • Constants Numbers, text, pictures, etc. 1 9 9 *7 1 ? Channel transmit capability Message sending Bird i Channel receive capability Message receiving Nest _ Persistent storage File Notebook 1 Sally 2 Computer science terms and ToonTalk equivalents.
  • 49. Another Random Scribd Document with Unrelated Content
  • 50. “Yes; and if I were in your place I’d raise another. There’s nobody in sight, and how is the owner of the cattle going to know who did the shooting? Knock one of ‘em over! I dare you to do it!” Ned hesitated. He had talked bravely enough, when in the presence of his cousin, about doing this very thing, but since that time he had seen a fight, had heard the reports of firearms and the yells of excited and angry men, and thought he had some faint conception of the scenes that had been enacted during that neighborhood row, and which would, no doubt, be repeated if another should arise. But here was his fine field of wheat so nearly destroyed that it would not pay for the harvesting; within easy rifle shot of him were some of the cattle which had done the mischief and which probably belonged to one of the neighbors who wouldn’t visit with him or his father because they wore good clothes and claimed to be gentlemen; and there was no one in sight. “Knock one of them over,” repeated Gus, “and perhaps it will teach their owner to keep his stock out of the way of your field, the next time you plant wheat in it. Hand me your gun, and I’ll show you that I am Gus Robbins yet, and not afraid to do anything.” The boy leaned forward in his saddle as he said this, and taking the rifle out of his friend’s grasp, rode toward the cattle (there were probably a dozen of them in all) which were dashing along the fence and trampling down the wheat that had escaped destruction during their former raids. As Gus approached them, they charged in a body in the direction of the gap; but instead of going through it they ran on by, kicking up their heels and shaking their heads as if they enjoyed the sport. While Ned galloped through the field to head them off, Gus dismounted, and taking his stand near the gap, cocked the rifle in readiness to shoot one of the herd the next time they went by. Ned succeeded in turning the cattle after a short race, and, as before, they took no notice of the gap, but dashed by it and started for another gallop around the field. At that moment the rifle cracked, and one of the finest steers in the herd threw his head and tail
  • 51. higher in the air, galloped faster for a short distance, then sank to his knees and rolled over on his side. By the merest chance, Gus had sent a bullet smaller than a buckshot into some vital part, and there was one less steer in somebody’s herd to break down fences and destroy wheat crops. “What do you think of that?” cried Gus, in great glee. “It was a splendid shot,” replied Ned, who just then rode up and extended his hand for the rifle. “You did it, didn’t you? Since we have begun the work, we’ll do it up in shape. If they won’t go out they can stay in; but they’ll stay dead!” The horse that Gus rode, having been broken to stand fire, was not at all alarmed by the report of the rifle. He allowed the boy to catch and mount him again, and by the time he was fairly in the saddle, Ned had placed a fresh cartridge in his rifle. “You head them off and drive them back,” said he, “and I’ll wait here at the gap to salute them as they go by.” In accordance with this request Gus rode off, and in a few minutes the herd came dashing along the fence again. They must have been growing tired of the sport by this time, for they headed straight for the gap, and all got through; but one of them carried a bullet somewhere in his body, the effects of which very soon became apparent. The rest of the herd began to leave him behind, and when he followed them over a ridge, which lay about a quarter of a mile from the field, he was staggering about as if he could scarcely keep his feet. While the work of driving the cattle out of the field was in progress, a horseman appeared on the ridge of which we have spoken, riding slowly along, with his eyes fastened on the ground, as if he were following a trail. Just as he reached the top, he heard the report of a rifle, and looked up to discover that the cattle of which he was in search, were running about a wheat field, and that two persons were engaged in shooting them down. One of the cattle fell just as he raised his eyes. When he saw this, he placed his hand on one of
  • 52. the revolvers he carried in his belt, and seemed on the point of dashing forward to take satisfaction for the loss he had sustained; but he evidently thought better of it a moment later, for he backed his horse down the swell until nothing but his own head could be seen over it, and there he sat and saw all that Ned and Gus did. When the wounded steer came over the swell, staggering from the effects of the bullet Ned had shot into him, the man shook his clenched hand in the direction of the wheat field, muttered something to himself, and galloped off in pursuit of the uninjured cattle, leaving the wounded one to take care of himself. “There!” exclaimed Ned, when the laggard of the drove had disappeared over the swell, “it’s done, and I am glad of it. If the owner of those cattle finds out that we did it and has anything to say about it, I shall tell him that this is my land—it may be mine some day, you know, and before long, too—and that no cattle except my own have any right on it.” “I wish that steer had got over the fence before he died,” said Gus. The boys seemed to be highly elated over what they had done. They had performed the same feat which, not so very many months ago, had set the whole settlement together by the ears, and no one was the wiser for it. Of course some rancheman would some day find out that one of his fattest steers had been killed and another badly wounded, but how was he going to find out who did the shooting? Ned fully expected that there would be trouble about it; that there would be threats and inquiries made, and that he and Gus, being safe from discovery, would have many a hearty laugh in secret over the storm they had raised. “Remember one thing,” said he. “No matter what is said or done, we don’t know anything about it. They can’t crowd us into a corner tight enough to make us own up. That would only make matters worse.” Gus readily agreed to this, and the boys shook hands on it. In order to make assurance doubly sure they rode around the rancho and approached it, just at dark, from a direction opposite to that they
  • 53. had taken when they rode away from it in the morning. When the events of the afternoon became known nobody could fasten the guilt upon them by saying that they had been seen coming from the direction of the wheat field. They found supper waiting for them, and when they had eaten it they went into the office to spend the evening in reading and conversation. While they were thus engaged inside the house, a proceeding which looks strange at the first glance, but which will be plain enough when all the circumstances connected with it are known, was going on outside of it. A horseman, who was riding rapidly along the road toward the rancho, turned off just before he reached it, and made his way to the corral that was located a short distance to the right of the shed in which Ned had taken refuge on the night of the fight. He stopped in front of the gate and uttered an exclamation of disappointment when he found that it was secured by a heavy padlock. After looking about him for a moment, as if he were turning some problem over in his mind, he dismounted, pulled the bridle over his horse’s head and hung it upon the horn of the saddle; whereupon the animal turned and galloped toward a watering- trough a short distance away, where he was joined by a small, dark- colored mule which had followed the horseman down the trail. The horseman himself moved toward the house, pausing every now and then to listen and reconnoiter the ground before him, and presently reached the steps leading to the porch. These he mounted with cautious tread, and was about to place his hand upon the door when it was suddenly opened from the inside, a flood of light streamed out into the darkness, and the horseman was confronted by a stalwart herdsman who started back in surprise at the sight of him. Arresting by a hasty gesture the cry of amazement that arose to the herdsman’s lips, the visitor stepped into the hall, and, closing the door behind him, uttered a few short, quick sentences in a low tone of voice which the other received with subdued ejaculations of wonder. When he ceased speaking the herdsman hastened away, and the visitor, who seemed to be perfectly familiar with the internal arrangements of the house, moved quickly along the hall, turning
  • 54. several corners, and finally opening a door which gave entrance into Mr. Ackerman’s office. There was a happy party gathered in that office, if one might judge by the ringing peal of laughter which echoed through the hall, when the door was opened; but it was quickly checked at the sight of the boy who entered as though he had a perfect right to be there, and whose appearance was so sudden and unexpected that it brought two of the three persons in the room to their feet in an instant. “Why, George!” they both cried in a breath—and a quick ear would have discovered that there was more surprise than cordiality in their tones—“Is this you? Where in the world have you been so long? We have been worried to death about you!” “Yes it is I,” answered George Ackerman, for he it was. “I have come back safe and sound, and that is all I can say to you now about myself. I want to talk to you about yourselves, and especially to you Ned. By the way, I suppose this is the friend from Foxboro’ whom you have so long been expecting.” Ned replied that it was, but he forgot to introduce the two boys to each other, and so did Uncle John. There was something about George that made them forget it. When they came to look at him they saw that he was very much excited, and that his face wore an expression they had never seen there before. They could not tell whether he was frightened or troubled. “Why, George!” exclaimed Uncle John, in some alarm. “What is the matter? Any bad news? Are the Indians or Mexicans——” “Yes, I have bad news,” interrupted George, almost impatiently, “and but little time to tell it in. Ned, you and your friend must pack up and leave this rancho, and this county, too, without the loss of an hour’s time. You are in danger, and I have placed myself in danger by coming here to tell you of it!” The boy’s words produced the utmost surprise and consternation among those who listened to them.
  • 55. G CHAPTER XII. A NARROW ESCAPE. eorge found his herdsman eager for news from the settlement, as he always was, but he had nothing to tell him that was very interesting. He could have given him some information that would have made him open his eyes and put him in fighting humor at once; but he thought it best to avoid that subject altogether. If he told Zeke that Uncle John had threatened to take his herd of cattle away from him, under the plea of reducing expenses, but really as George believed, for the purpose of turning it over to Ned, the old man would have been as angry as George was when he first learned of the fact. But the boy didn’t want to let Zeke know how mean his uncle was, and so he said nothing about his plans. They never could be carried out while Zeke was there to protect his stock, and George could afford to be magnanimous. George and his herdsman made an early start on the following morning, and the third night found them at Catfish Falls. They now felt perfectly safe, for the raiders had never been known to penetrate so far into the country. Their depredations were principally confined to the counties bordering on the river, it being their object to stampede all the stock they could find in one night’s raid, and drive it across the river into Mexico, before the settlers could gather in sufficient numbers to pursue them. They tried as hard to avoid a fight as the ranchemen did to overtake them. George made the camp and cooked the supper, and when they had satisfied their appetites, the former laid down on his blanket in front of the fire with his saddle for a pillow, and listened to Zeke, who
  • 56. talked and smoked incessantly. Their work for the day was over now. The cattle were always brought close in to camp at dark, the horses and mule were staked out, and the campers went to bed at an early hour. If they awoke during the night, they replenished the fire with some of the fuel that was always kept close at hand, and walked around the herd to see if there were any restless ones in it who felt inclined to stray away. George performed this necessary duty twice on this particular night making the first round about twelve o’clock. To his surprise, he found the most of the cattle on their feet, and saw that some of them were exhibiting unmistakable signs of uneasiness and alarm. They stood snuffing the air eagerly, carrying their heads high and their ears thrown forward, and now and then they would walk a few steps out of the herd, lower their horns and paw the ground as if challenging the object that had excited them, whatever it was, to come out and give them battle. The rest of the cattle were lying down, chewing their cuds contentedly, and apparently not at all disturbed by the antics of their nervous companions. George threw himself flat upon the ground and swept his eyes around the horizon. In this position, he could distinctly see any object that might be approaching the camp (provided, of course, that it was taller than the grass) for it would be clearly outlined against the sky. But he could see nothing. He arose to his feet again and listened intently, but could hear nothing calculated to excite his alarm. The wolves which serenaded them every night were holding a concert a short distance away, and that made George believe that if there was any danger approaching, it was yet a long distance off; for he knew that the wolves would be the first to discover it, and that they would then bring their concert to a close and take to their heels. “There’s something up,” thought George, once more turning his eyes toward the cattle. Some of the uneasy ones, reassured by his presence, were walking about among their companions, as if they were looking for a good place to lie down, while the others remained in a defiant attitude and snuffed the air as before. “There’s
  • 57. something up,” repeated George, “and I have been expecting it. I have felt very nervous and timid for two or three days, and I don’t know how to account for it. If there is anybody within hearing or smelling distance who has no business here, I can find it out.” George walked back to the camp, picked up his rifle, and after unfastening the lasso with which his horse was confined, he jumped on the animal’s back without saddle or bridle and rode away in the darkness, paying no heed to a bray of remonstrance from Bony who followed as far as the length of his lariat would allow him to go. He rode out on the prairie for a hundred yards or more, and then stopped his horse and listened again. The animal stood perfectly quiet for a few seconds, looking first one way and then another, and turning his ears toward all points of the compass, and apparently satisfied with the result of his reconnoissance, he put down his head and began cropping the grass. “Hold up, here!” exclaimed George, seizing the horse by the mane and tapping him gently on the side of his head with the muzzle of his rifle to make him turn around. “We have nothing to be frightened at yet—that’s evident. Now, old fellow, I shall leave you loose. Keep your ears open and wake us up if you hear anything!” George rode back to camp and sought his blanket feeling a little more at his ease. He had as much faith in his horse as he had in Zeke (the latter used to say that he could smell an Indian or a Greaser at night as far as he could see him in the daytime), and since the animal could not discover anything suspicious, it was as good evidence as he wanted that there was nothing to fear. No doubt some of the wild members of the herd felt as nervous and uneasy as he did, and took their own way to show it. Although George brought back to his blanket a most refreshing feeling of security, he did not sleep as soundly as he usually did. He went through all sorts of terrible things in his dreams, and started every time the fire snapped. He was wide awake again at one o’clock, and set out on his second tour of inspection. The moon, now nearly half an hour high, had brought up with it a cooling breeze
  • 58. which gently rustled the long grass of the prairie, and sent the sparks from the camp-fire circling high in the air. The wolves had closed their concert and gone off to find a more appreciative audience, and there was an air of peaceful quiet brooding over the scene. George forgot all his fears and continued his round with a light heart. He found the cattle quiet, but some of them had begun feeding and were straying away from the rest of the herd. While George was engaged in driving them back, and forcing the remainder of the herd into a more compact body, a yell, so sudden and startling that it made the cold chills creep all over him, arose on the air, and out from a little thicket of willows that grew a short distance from the belt in which the camp was located, dashed a party of horsemen who charged toward the herd at the top of their speed. They were Mexicans; George could see that at a glance. They had doubtless been hovering about the camp all night, and it was while they were working their way around to the leeward of the herd that their presence had been detected by the wakeful cattle. George stood for an instant as if he were rooted to the ground; and then with a wild cry of alarm he dashed forward, running diagonally across the front of the herd, hoping almost against hope that he might succeed in passing them, and thus avoiding the rush which he knew would come in a moment more. It was the only way in which he could escape being trampled to death. He ran as he had never run before, but he had made scarcely half a dozen steps when a rumble like that of an avalanche sounded close at his side, telling him that the cattle were coming. The strongest fence that was ever built would not have stopped them now, and George, had he attempted to drive them back or turn them aside, would have been trampled under their feet like a blade of grass. He saw and fully realized his danger, but could not escape it. Even Zeke, who was as light of foot as an antelope, could not have saved himself by his speed; and George, giving himself up for lost, fell flat upon the ground, clasped his hands over his head and awaited his fate. By the merest chance he threw himself into a little excavation in the prairie, which, in the years gone by, had doubtless served as a wallow for
  • 59. some old patriarch of a buffalo; but now it was covered with grass, and there were two or three little willows growing out of the bottom of it. This protection, slight as it was, saved the boy’s life. He had barely time to crowd himself close against the frail stems of the willows before the frantic cattle were upon him. The roar of their hoofs on the hard ground was almost deafening. It was louder than the roar of all the northers he had ever heard crowded into one; but even while he was wondering why some of the cattle did not jump upon him the roar subsided, and George, looking up through the willows which had been bent over his head, saw the moon shining down upon him. Every steer had jumped the wallow, and George had escaped with nothing more than a terrible fright. While he was congratulating himself upon his good fortune, a clatter of hoofs sounded near, and he ducked his head just as two horsemen, riding side by side, dashed over the wallow in pursuit of the flying herd. The boy’s first thought, after he had satisfied himself that he had escaped without injury, was of Zeke. What had become of him? There was one thing certain—George knew it now as well as he did a few minutes later—and that was that the herdsman had made a fight, and a good one, too. Although the old fellow appeared to be a sound sleeper, he would jump to his feet the instant he heard any unusual noise, and he was wide awake the moment he opened his eyes. More than that, he kept his Winchester close at hand, and could discharge it with a rapidity and accuracy that George had tried in vain to imitate. Zeke was probably on his feet before the yell that frightened the cattle was half uttered, and as soon as he got there he was ready to begin shooting. Of course George had not heard the report of his rifle, for the rumble of that multitude of hoofs about his ears would have drowned the roar of a cannon. “But I know, all the same, that he did shoot, and that some of those raiders didn’t get away,” thought George, as he once more raised his head and looked over the grass in the direction of the camp. “I think I had better stay here. Zeke will know when the danger is over, and
  • 60. then he will call to me. I wonder if he is there now? Somebody is punching up the fire, sure!” The old buffalo wallow into which George had thrown himself, was about a hundred yards distant from the willows, and the grass was so high that he could not see the camp; but he could see the smoke of the fire as it arose through the tops of the trees that hung over it. Just now the fire was blazing brightly, and the sparks were rising from it in volumes. This was what led George to believe that there was somebody in the camp. It couldn’t be one of the raiders, he told himself, for they never stopped. They stampeded the cattle and dashed on after them to get out of reach of the bullets in the herder’s rifles. “Of course Zeke is there,” thought George as he arose from his place of concealment; but he had scarcely placed himself fairly upon his feet before he dropped back among the willows again. There were several figures moving about the fire, and there were riderless horses and mounted men near by. The men were all dressed in Mexican costume—the wide brims of their sombreros were plainly visible in the moonlight—and there were at least a dozen of them in sight. One of them seemed to be poking up the fire for the purpose of making as bright a light as possible, while the others were going into the willows with blazing fire-brands in their hands. Some of their companions had already gone in there armed in the same manner, for George could see the lights dancing about among the trees. The boy saw all this during the instant of time he was on his feet, and when he dropped back into his concealment again, his fear had given place to a feeling of exultation. The raiders were searching the woods in the vicinity of the camp, and of course they could be looking for nobody but Zeke. Probably the old fellow had given them a very warm reception. No doubt he had tumbled three or four of them out of their saddles, and the survivors were hunting him up with the intention of taking vengeance on him if they caught him. “But they’ll never catch him,” chuckled George, “because he’s too old a ‘coon. He has fought Indians too long to be beaten by a lot of
  • 61. lubberly Greasers.” George drew the tops of the willows closer together, confining them in that position by twisting their branches, and having thus formed a screen that was large enough to cover his head, he raised himself upon his knees, so that he could look over the grass and watch the motions of the raiders. They were certainly looking for somebody, and they seemed resolved to find him, too, for they did not grow discouraged and go away, as George hoped they would. Their failure only seemed to make them the more determined. First one and then another seized fire-brands and joined their companions in the woods, and finally those who were mounted, swung themselves out of their saddles and went in too, leaving the camp to take care of itself. “I wonder what Zeke has done to make them so persistent!” said George to himself. “Perhaps they’ve got an old grudge against him. They might as well go away, for they’ll not find him. He’s safe long before this time, and if I could only make my horse hear me, I’d soon be safe too.” George could always find something to feel happy over, no matter how unpleasant the situation in which he might be placed, and he found something now. He had lost his fine herd of cattle, but Zeke was left to him, and so were his horse and pack-mule. The former had been stampeded with the cattle, but George knew he would not run far before he would leave them and strike a straight course for home. The two Mexicans who had followed the herd to head it off and turn it away from the settlements toward the river, would not bother their heads about him, for while they had three hundred fat cattle to look out for, they could not afford to waste time in pursuing a single horse. Bony was still staked out near the camp, and so was Zeke’s nag. They both made the most desperate efforts to escape with the herd, but the lariats with which they were confined were too strong to be broken, and the picket-pins were driven so firmly into the ground that they could not be easily pulled up. The Mexicans, when they were ready to leave the camp, would probably
  • 62. turn these animals loose, expecting them to follow their own horses, just as Silk Stocking had followed off the raiders who made the attack on the rancho; but that was something Bony would not do. He was very much afraid of strangers, and when left to himself he would make the best of his way home. The search for Zeke was continued? until broad daylight, and all this while George lay in his concealment watching the motions of the raiders and wondering what his herdsman had done to make the thieves so anxious to find him. When day began to dawn he discovered something that seemed to explain it all: there were five wounded men sitting and lying beside the fire. George knew that they were wounded, for he could see that they wore bandages, and that one who limped considerably and used a stick to walk with, would now and then get up to bring a cup of water from the bayou to two of his companions who kept their blankets. Probably one of these men was the leader of the band, and that was the reason why the others were so determined to find Zeke. But they had to give up the search and go away without him, as George knew they would. Shortly after daylight they began to come into camp by twos and threes, and when they were all assembled George counted eighteen of them. They talked earnestly together for a few minutes and then set about preparing a hasty breakfast, helping themselves bountifully to the contents of the pack-saddle, and using the cooking utensils which George had provided for his own use and Zeke’s. George waited with no little impatience to find out what they were going to do when they made an end of the bacon and coffee, and was very glad to see that they were preparing for an immediate departure. When all was ready the wounded members of the band were assisted into their saddles, Zeke’s horse and George’s pack- mule were set at liberty, and the raiders moved slowly along the willows in the direction the cattle had taken when they were stampeded. It was a wonder that their suspicions were not aroused by the actions of the mule which, foolish as mules generally are, ran at once to the buffalo wallow in which George was concealed, and not content with shying at the sight of it and giving it a wide berth,
  • 63. as Zeke’s horse did, Bony circled around it two or three times, and finally stopping, thrust out his neck, threw his long ears forward and looked suspiciously at the crouching form of his master. George, who had been in a fever of suspense for long hours, and who began to breathe more freely when he saw the raiders moving away, was frightened again; but, as it happened, the thieves paid no attention to the mule’s actions. Better than that, Zeke’s horse kept on his way without stopping, and Bony, seeing that he was going to be left behind, started in pursuit. The danger was over now, but George was much too wary to run any risks. He saw the raiders disappear over the nearest swell, but he allowed another hour to pass before he left his hiding-place. Then he moved very cautiously, crawling along on his hands and knees, stopping every few feet to look over the grass and listen, and examining the ground about the camp very thoroughly before he ventured into the woods. He found the camp in the greatest confusion. His rifle and revolvers were gone, so were his blankets and poncho, and also a good portion of the contents of the pack-saddle; but there was still a little of the bacon and hard-tack left, and the raiders had forgotten to take his haversack and frying-pan. He replenished the fire at once, and while waiting for it to get fairly started, employed himself in cutting up the bacon with an old rusty hunting-knife which one of the thieves had probably left in exchange for his own new one. While he was thus engaged he did not neglect to keep an eye open for any straggling raiders who might have fallen behind the main body; but there were none in sight. He placed the bacon in the frying-pan, and when it was done to his satisfaction he put it into his haversack, together with the small supply of hard-tack that was left, extinguished the fire and set out for home. “I am glad the thieves left me provisions enough to last me until I can get more,” said George, to himself. “If I have to travel all the way on foot, it will take me four or five days to reach the nearest rancho, and I have no fears of getting hungry during that time. What
  • 64. brought those raiders so far from the river? That’s what I can’t understand.” During the two days that followed, while the young cattle-herder was trudging painfully over the lonely prairie, he had ample leisure to turn this question over in his mind. He travelled early and late, but his progress was necessarily slow, for one who spends the most of his time in the saddle, finds it hard work to go on foot, and soon grows weary. He kept a bright lookout for Zeke, and stopped on the top of every swell to scan the prairie before and on both sides of him, in the hope of discovering his horse or pack-mule; but Zeke was miles ahead of him, hastening toward the settlement, intent on alarming the ranchemen in time to cut the raiders off from the river, while Bony and Ranger were making the best of their way toward home. “They are all safe, I know, for they are able to take care of themselves. So am I; but there’s no fun in looking forward to three days more of such walking as I have had. I shouldn’t mind it so much if I hadn’t lost my cattle,” said George, with a long-drawn sigh. “Those lazy Greasers have robbed me of years of hard work, and now I must begin all over again, or else go to herding cattle for Uncle John. Of course I can’t loaf about the house all the time and do nothing, as Ned does. Hallo!” While George was talking to himself in this way he came to the top of a ridge, and found before him a long line of willows which fringed the banks of a water-course. A solitary horse was feeding near the willows, and this it was that attracted the boy’s attention and called forth the exclamation with which he finished his soliloquy. The sight of the animal alarmed him, for it was not at all likely that a horse, wearing a saddle and bridle, would be feeding contentedly in that wilderness, so far from all signs of civilization, unless there was some one with him. George dropped to the ground, and ran his eyes along the willows in search of a camp. If there was one in the neighborhood he could not find it. There was no smoke to be seen,
  • 65. nor were there any other indications of the presence of human beings. “But there’s somebody here all the same,” thought the boy, shifting his position a little, so that he could obtain a better view of the willows, “for that horse never came here without a rider. Somebody has stopped in the willows to rest, and he’s a Mexican, too. I know it by the silver ornaments on the saddle. I wish I could think up some way to capture that horse. Shall I try it?” Not knowing what else to do just then, George lay there in the grass and considered the matter. Weary and footsore as he was, the thought of finishing his journey on horseback was a most agreeable one. The animal was loose—when he raised his head, George could see that he was not confined by a lariat—but if he attempted to creep up to him the horse would doubtless take fright and run off; and that would excite the suspicions of his owner, who might be tempted to send a bullet from his carbine in that direction. There was too much danger in it George found when he came to think it over. He sighed regretfully, thought almost with a shudder, of the long, weary miles that lay between him and the nearest rancho, and was about to crawl back down the swell again, when he was astonished almost beyond measure, to hear his own name pronounced in a weak and trembling, but still distinct voice. “George! George Ackerman!” came the hail from the willows. George jumped to his feet, and looking in the direction from which the voice sounded, saw a sombrero waved in the air, and could dimly discern the figure of a man, dressed in Mexican costume, who was sitting on the ground, with his back against one of the willows. “George!” repeated the man. “Hallo!” was the reply. “Come here, will you? I am badly hurt and in need of help!” George grew more and more astonished. The man was a Mexican beyond a doubt, but the voice sounded strangely familiar.
  • 66. “Don’t be afeared, George!” continued the man, in a pleading tone. “I couldn’t hurt you if I wanted to! I’ve got something to tell you!” “Who are you?” asked the boy. “Why, don’t you know Springer, who used to herd cattle for your father?” Yes, George knew him, and he didn’t know anything good of him either. “If you are Springer,” he shouted “what are you doing there with those clothes on?” “Come here, an’ I’ll tell you all about it!” was the answer. “I’ll tell you something else, too—something that’ll make you open your eyes. Do come, George, and give me a drink of water! I’ve got a chunk of lead through each leg!” “Aha!” said George, who thought he understood the matter now. “You were with the raiders, and Zeke got two pulls at you with his Winchester!” As he said this he ran down the swell, and in a few minutes more was standing beside the wounded man. It was Springer, sure enough, but he was so much changed that George could scarcely recognise him. His face was very pale and his strong frame was convulsed with agony. The sash he usually wore around his waist had been cut in two, and the pieces were bound tightly about his legs above the knee to stanch the flow of blood from the wounds made by the herdsman’s rifle. He was a hard-looking fellow, and any one would have taken him for just what George knew him to be—a cattle-thief. Without stopping to ask any more questions George seized the man’s hat, and hastening to the bayou presently returned with the crown filled with water. The wounded raider drank eagerly and sank back against his tree with a sigh of great satisfaction.
  • 67. G CHAPTER XIII. GEORGE HAS COMPANY. eorge knew Springer well. The latter had once been in his father’s employ; but being of no use as a herdsman or anything else, he had been discharged, to make room for a more industrious and pains-taking man. This enraged Springer, who threatened vengeance, and followed up his threats by attempting to fire the rancho. He had been detected in the act and almost captured; but he succeeded in making his escape, and since then George had never met him until this particular day. He had often heard of him, however, as a member of a band of cattle-thieves, who now and then made a raid through the country farther down the river. There were a good many others just like Springer, on the opposite side of the Rio Grande—renegade Americans—who, having left their country for their country’s good, had taken refuge among the Mexicans, and joined with them in raiding upon the well-stocked farms and ranches of their Texan neighbors.
  • 68. George returns Good for Evil. “You needn’t be afeared, George,” repeated Springer, seeing that the boy cast uneasy glances about him, as if half expecting to see the rest of the band start up from some ambush among the willows. “Thar’s nobody here but me.” “Where are your friends?” asked George. “They’ve gone on, an’ I s’pose they’re acrosst the river by this time.” “Did they leave you here to take care of yourself?” inquired George, who found it difficult to believe that men could be so heartless. “What else could they do?” asked Springer, wincing a little, as he tried to move one of his wounded legs into a more comfortable position. “A man who is fool enough to get hurt, must take his chances. If he can keep up with the rest, well an’ good; if he can’t, he must fall behind an’ look out fur himself. I’m glad I ain’t in the settlement. I’d rather stay here an’ starve, fur want of grub an’ water, than have the ranchemen catch me. I ain’t had a bite to eat fur two days.” “You haven’t!” exclaimed George. “I’ll divide with you.” He opened his haversack, as he spoke, and producing from its capacious depths a goodly supply of bacon and cracker, placed it in
  • 69. the hands of the wounded man, whose eyes brightened as he received it. George stood by and saw him eat it, and was glad to see that he enjoyed it, although he knew that by thus diminishing his store he put himself in a fair way to go hungry for many a weary mile of his journey. The man was a scoundrel—no one except himself could tell what deeds of violence he had been guilty of during his raids—but for all that George was glad that it was in his power to relieve his distress. “I am sorry to see you in this situation, Springer,” said he, when the bacon and cracker had disappeared. “Are you, though?” exclaimed the man, wiping his mouth with the back of his hand, and looking up in surprise. “I didn’t s’pose you would be.” “Well, I am; and I hope that when you get well, you will behave yourself and live among white men.” “That’s unpossible; ‘kase why, white men won’t have nothing to do with me,” replied Springer, almost fiercely. “Would you hire me to herd cattle fur you?” “Yes, I would. I know you threatened that you would be revenged on my father for discharging you, but I don’t see why you should follow me up. I haven’t done anything to you. How did you get shot? And how came you here?” “Wal, you see, we made the dash on your camp, kalkerlatin’ to take you by surprise; but Zeke, he allers sleeps with his rifle in his hand an’ one eye open, an’ I was the fust feller he got a crack at. He took two pulls at me, an’ this yere is the consequence,” said Springer, pointing with both forefingers toward his bandaged legs. “When we left your camp, the fellers put me on my hoss, an’ I kept up with ‘em fur a few hours; but the pace was too fast fur me—I couldn’t stand the joltin’; so I had to pull up. When I reached this bayou, I thought I’d get a drink of water; but when I got down I fell, lettin’ go my bridle, an’ my hoss walked away. I was too weak an’ bad hurt to crawl to the water; I couldn’t ketch my hoss, an’ I reckoned I’d got
  • 70. to stay right here. I happened to see you when you come to the top of the ridge, an’ called to you, thinkin’ mebbe you wouldn’t refuse to give me the drink I was a’most ready to die fur. But you wouldn’t a done it, if you knowed as much as I do!” “Yes, I would. I don’t bear you any ill-will because you stole my cattle.” “But that aint all!” exclaimed Springer. “I know it isn’t! You tried to burn my home over my head; but I don’t bear you any ill-will for that, either; and I’ll prove it to you by putting you on your horse and giving you a chance to save yourself!” “But that aint all!” said Springer. “How do you reckon we knowed whar to look for you?” “I’m sure I can’t tell! I never knew raiders to venture so far from the river before!” “An’ they never did, nuther! Whar was you when we was in your camp?” “I was lying in a buffalo wallow about a hundred yards away!” “Did you see the fellars while they was a pokin’ around in the willows with their fire-brands? What do you reckon they was a lookin’ for?” “I supposed they were looking for Zeke!” “Wal, they wasn’t lookin’ for Zeke, nuther! They didn’t care nothing about Zeke! You was the fellow they wanted to find!” “I was!” exclaimed George. “What did they want of me?” “They wanted you ‘kase there’s a thousand head of fat steers wrapped up in you, ‘sides them three hundred we stole from you the other night!” The boy was greatly astonished, and he was certain, too, that he knew what Springer was trying to get at. He seated himself on the
  • 71. ground with his back against a neighboring tree, and said as calmly as he could: “You must speak plainer than that if you want me to know just what you mean!” “I mean jist this yere,” said Springer; “an I’ll tell you ‘cause you was good enough to come here an’ give me the drink of water I was starvin’ fur, an’ feed me outen your grub when you haint got enough to eat yourself. George, you are in danger every day you spend at your rancho! Your uncle and cousin don’t want you there, an’ they aint goin’ to let you stay nuther!” George thought from what Springer said before that he had some such revelation as this to make, but when it came it almost took his breath away. He had long been of the opinion that his relatives didn’t want him at the rancho, but how could this cattle-thief, who lived miles away on the other side of the river, have found it out? The man talked in a positive tone, as though he knew all about it, and this was what surprised George. There was one thing certain, however: He was not going to discuss family matters with any such fellow as Springer. “I’ll tell you what it is,” said he, as he arose to his feet and slung his haversack over his shoulders. “I’ll not stay here if you are going to insult my uncle and cousin!” “Say, George, whar you goin’?” demanded Springer. “I am going to start on again. Shall I put you on your horse before I go?” “You needn’t go off mad,” said the man, earnestly, “‘cause every word I’m tellin’ you is the gospel truth. We got it all through Philip!” “Got all what through Philip?” asked George. “I mean we done all our business through him; an’ if I was in your place, I’d go home an’ bundle him outen the house, neck an’ heels. He’s makin’ mischief thar, I tell you. He told us we’d find you in that
  • 72. grove on Brown’s Run; an’ when we didn’t find you thar, we follered your trail to Catfish Falls.” “But how did Philip know I was going to that grove?” demanded George, growing more and more bewildered. “What’s the use of me tellin’ you when you’ll get mad?” asked Springer in reply. “The under-standin’ atween us, was, that arter we had drove off your three hundred head of stock, we was to come over agin, in a week or two, an’ we would find a thousand more head whar we could get ‘em easy.” “Who was going to put them where you could get them easy?” “If I tell you, you’ll get mad at me. But mind you, we wasn’t to get them thousand head unless we gobbled you. The fellers done their level best, but couldn’t find you!” “What were you going to do with me if you found me?” “That’s something I can’t tell. Nobody but Fletcher knows that.” “Who’s Fletcher?” “He’s the boss—the cap’n.” “Who told you to gobble me?” “What’s the use of me tellin’ you when you’ll be sartin to go off mad? You see, we kalkerlated to make twenty-six thousand dollars clear by two night’s work, but that didn’t satisfy us. Philip, he told us that thar was a whole bit of gold and silver in your uncle’s office, an’ we wanted that too; so we slipped down thar, an’ Philip, he opened the door an’ let us in.” “Into our house!” cried George, who now learned for the first time of the attack that had been made upon the rancho. “Yes, into your house; but we didn’t get nothing but bullets an’ one hoss fur our pains.” “It served you just right,” said George, indignantly. “They are not all traitors in that house, I tell you.”
  • 73. “Not by no means they ain’t,” said Springer, with a knowing shake of the head. “One of the herders, who was awake, aroused the others by firing his revolver, an’ it’s the biggest wonder in the world that any of us got out. We tried to cut down the doors, but they drove us off, and then we made a strike fur Brown’s Run, whar we allowed to find you. On the way we run into about five hundred head of stock, an’ thinkin’ that a bird in the hand was worth a dozen in the woods, we drove ‘em off. We got ‘em across the river all right, an’ dodgin’ the rangers who follered us, we came back arter you. We found you too, an’ some of us got more’n we wanted,” added Springer, looking down at his bandages and groaning faintly. George listened to all this in the greatest amazement. He remembered now, that just before he left home with his supplies, his uncle had questioned him closely about some things in which he had previously shown no interest whatever, and that he seemed particularly anxious to know where his nephew expected to find his herd, and which way Zeke would probably drive it after George joined him. The boy never would have thought of the circumstance again, if it had not been for this interview with his father’s old herdsman; but now it was recalled very vividly to his mind, and he was obliged to confess to himself that the half-formed suspicions he had long entertained were not without foundation. His Uncle John was at the bottom of all his troubles, and Philip, the Mexican cook, was his confidential assistant. The boy’s heart sank within him while he thought about it. He didn’t know what to do, and there was only one man in the settlement to whom he could go for advice. “Well, Springer,” said George, suddenly, “we have wasted time enough. I have a long journey to make, and so have you. I hope you will succeed in getting safely over the river, and that the lesson you have received will be the means of making you an honest man. I will put you on your horse and divide my provisions with you, and that is all I can do for you.” “An’ it’s a heap more nor any body else would do for me,” said Springer, gratefully. “You won’t tell none of the settlers that you seed
  • 74. me, will you?” “I’ll not put any of them on your trail,” replied the boy. “I may be obliged to say something about you; but if you have good luck, you ought to be safe across the river before I reach Mr. Gilbert’s house, and that is where I am going.” After bringing Springer another hatful of water from the bayou, and dividing with him the small supply of bacon and crackers he had left, George brought up his horse, and with infinite difficulty assisted the man to mount. Springer groaned a little and swore a great deal during the operation, and being a heavy man and almost unable to help himself, it required the outlay of all George’s strength to put him into the saddle. After thanking the boy over and over again for what he had done, he rode slowly away, and George feeling as though there was nothing in the world worth living for now, once more turned his face toward the settlement. He looked back now and then to see how Springer was getting on. The last time he saw the man he was standing on the top of a high swell holding his hat in his hand. When he saw George looking at him he waved it in the air and rode down the swell out of sight. “If he can keep in his saddle for forty-eight hours—and he would have no trouble at all in doing it if it were not for his wounds—and can dodge the rangers who are probably out looking for the raiders, he will be all right,” thought George; “but if he is compelled to dismount, I don’t know what will become of him. He can’t possibly get on his horse again without help. Now, what shall I do? I am going back to a home where I am not wanted.” This was the burden of the boy’s thoughts all the rest of the day. He could not make up his mind to any course of action, for he was so stunned and bewildered by what he had heard that he could not think clearly. The only thing he determined upon was, that he would lay the case before Mr. Gilbert, and be governed by his advice. Mr. Gilbert was a wealthy cattle-raiser and a prominent man in the settlement, who had gained his start in life through the assistance of George’s father. He was a firm friend of the family, and the boy knew
  • 75. that he could trust him. Toward his rancho he directed his course, making all the haste he could. He would have been glad to travel all night, but his weary limbs demanded rest, and when it grew dark George was obliged, much against his will, to go into camp. He built a fire in the edge of a belt of post-oaks that ran across his path, and after gathering fuel enough to last all night, he ate a very light supper and sat down to think over the situation. When eight o’clock came he scraped a few leaves together for a bed, and was about to throw himself down upon it, when he was brought to his feet by the clatter of hoofs, which sounded a short distance away. George seized his haversack and waited with a beating heart for the horsemen, who he knew were approaching his camp, to come in sight. They came a moment later, and to the boy’s intense relief the light from his fire shone not upon silver buttons, gaudy sashes and wide trowsers, but upon a couple of red shirts and slouch hats. With a long-drawn sigh, indicative of the greatest satisfaction, George threw down his haversack and stepped forward to greet the new comers. “Good-evening, stranger,” said the foremost horseman. “Have you any objections to good company to-night?” “None whatever,” answered George, readily. “I shall be only too glad to have it, for it is lonely work keeping house all by one’s self.” “We saw the light of your fire,” said the other, “and as we have got a little out of our reckoning, we made bold to come here, thinking that perhaps you could set us right.” “I am glad to see you,” answered George; “but I hope you have brought your supper with you, for it is little I can offer you.” “O, that’s nothing. It is no uncommon thing for ranchemen to go supperless to bed, you know. Where did you stake out your horse, my lad?” “I haven’t any, sir. He was stampeded when the Greasers stole my cattle, and I haven’t seen him since.”
  • 76. 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