Preface (Hello World)

#|

Step into Realm of Racket, a book that takes you on a unique journey into the land of computer programming. In the style of Conrad Barski’s Land of Lisp, this book teaches you how to program in Racket by creating a series of games. Racket is a friendly mutation of Lisp that’s perfect for all, from those who want to launch their education in computer science to those looking to expand their knowledge and experience in programming.

|#

You’ve certainly heard of JavaScript, Perl, Python, and Ruby. But what about Racket? Just because it’s not the most mainstream programming language doesn’t mean you should discount its capabilities. Racket allows functional programming and other different paradigms that even hard-core programmers have never seen before. Get ready for the excursion. Even after you get through Realm of Racket, there is a lot to explore.

Our mantra is “by freshmen, for freshmen,” but that doesn’t mean you should drop this book if you are a sophomore or an industry professional. True, we were freshmen when we started writing this book, but our mantra means only that this book was written for you by peers who have a special interest in programming and want to explore it in a new, fun way. So you see why our mantra is what it is—it would have been a bit of a mouthful to say, “By people who have a special interest in programming and want to explore it in a new, fun way, for people who have a special interest in programming and want to explore it in a new, fun way.” And our recent expedition into the realm of Racket has enabled us to write this book with genuine empathy for a novice learner.

Regardless of your programming background, many of the topics in this book will be new to you, and much of what you’ve learned before will appear in a new light. This book is written for those who are truly inquisitive and interested in exploring a unique world of programming, so really we are all “freshmen” in this context.

It won’t take you long to realize that this is not your typical programming textbook. We decided to present the material in a way that is engaging and really sticks—with games and comics.

In this book, we will teach you various topics through coding games, including a text-based game, some old-school games like Snake, and others that we invented ourselves. Along the way, you will need to use your programming skills to help a character named Chad navigate the dungeons of DrRacket.

You might think you can skip ahead and save Chad right away, but we highly recommend that you read this book from front to back. Each chapter depends on the knowledge you learned from the previous one, and we don’t want you to miss out on any of Chad’s adventures.

The source code of our games is available with the code base of Racket. Once you download Racket, navigate to the Racket installation and look for the collects/realm/ folder. All the game code is there for you to explore, modify, and experiment with.

Finally, the book comes with its own website. Visit realmofracket.com and keep visiting—you never know what you’ll find there. Onward!