Preface

The author believes with Cowper, that

It is the sad complaint, and almost true,
Whate’er we write, we bring forth nothing new.

and he has few pretensions to originality. To be useful, rather than to be original, has been his aim; but if he has not presented to his readers any new thoughts, he hopes it will be found, that he has placed old ones in a new light; or so grouped them together, as to give them an air of novelty. He has endeavoured to profit by the sentiments of the various authors, to whose works he has had access, and has not scrupled, on some occasions, to use even their language; but he is not conscious of having servilely followed any one: his desire has been to appropriate the motto, “I think for myself.”
— WILLIAM BANKS, The English Master (1823)

Innumerable innovative approaches have been devised to introduce coders of all ages to the art of computer programming.

  • Richard E. Pattis christened Karel in Karel The Robot: A Gentle Introduction to the Art of Programming (John Wiley & Sons, 1981). Karel The Robot, Pattis explains, “lives in a world that is unexciting by present-day standards (there are no volcanoes, Chinese restaurants, or symphony orchestras), but it does include enough variety to allow the robot to perform simply stated, yet interesting tasks.”
  • The Lifelong Kindergarten Group at the MIT Media Lab created the rare cat that responds to commands in Scratch—a kid-friendly, online, visual programming language and integrated development environment (IDE).
  • With support from the National Science Foundation, Brian Harvey and Jens Mönig designed the (now) entirely browser-based language/IDE called Snap!, where a blank slate similar to the “scratchpad” found in Scratch invites us to compose programs by dragging, dropping, and snapping together components that look and act like puzzle pieces.
Thus, the time seems ripe to welcome into the fold new avatars representing a wider array of species (including frogs and flies).

In addition to helping you learn a little and get excited about programming, these documents and the classes they are designed to accompany can also serve as an introduction to The Art of Computer Programming, the definitive series of books by Donald Ervin Knuth, which in 1999 American Scientist dubbed one of the twelve best physical-science monographs of the century. In fact, one of my hidden agendas is to help you see that books like Knuth’s contain a lot of Good Stuff!

As much as I would like these page to be the most beautiful, the most brilliant, the most appetizing that anyone could imagine, I know that like begets like; and I’ll be happy if they don’t make anyone sick. I’ll be delighted if they somehow help even one person inch toward Knuth where, if the culinarian in chief can make it to the end of the evening, a seven course feast awaits. And I’ll be overjoyed if they encourage some of you to really sink your teeth into Computer Science: An Interdisciplinary Approach by Robert Sedgewick and Kevin Wayne, especially if you’re taking AP Computer Science A in the Java era.

Finally, some advice in case you someday find yourself at Everest base camp (chapter 1, “Basic Concepts,” of Volume 1: Fundamental Algorithms, of TAOCP):

DON’T PANIC!
You don’t have to digest all the math Don dishes up. Take a deep breath. Proceed slowly and carefully. And pick the route that is best suited to your interests and abilities. Knuth points out not only what parts of his books we might want to hop over and why, but also when we might want to return to some of the interesting and challenging parts. That said, you really should try at least some of the math, not to mention Knuth’s computer and assembly language. Math is good for us. You might acquire a taste for it, if not an insatiable appetite. And low-level programming can actually be a lot of fun.

1010011.11

What's the difference between a Turing machine and an Intel microprocessor?
It's the same as that between Hillary's pursuit of The White Whale
and the establishment of Trump Plaza in its spout.

— Alan's 83rd epigram got hacked!

Punny Preface