Skip to content

Racket Programming the Fun Way

This is the second programming book that uses Racket that I have reviewed. I reviewed Realm of Racket back in 2013. I also reviewed a book about Racket’s ancestor, Land of Lisp, earlier that same year. While those books brought back some positive memories of when I first studied Lisp back in 1987 as an impressionable young lad, it was today’s book, Racket Programming the Fun Way by James W. Stelly that actually got me to stretch out beyond the book’s examples and exercises and write a little of my own code in Racket. First, the book, then a link to my silly personal stuff.

Going back decades, my memories of Lisp and it’s variants like Scheme and Racket involve things like everything is a list and remembering to count parentheses. I could read code quotes (slowly) but whilst I see the value in functional programming, this world of it was too much of a brain teaser to retain my focus.

When I picked up Stelly’s book, I flipped through the pages as I usually do with a new book. I was greeted by graphs and art and, GUI apps. Interesting. Then I noticed the math. Very cool.

The book takes you through a logical series of chapters that build on one another, passing from the needed introduction to lists and all the basics of handling data of various types to arithmetic, functions, conditionals, into realms where Racket gets super interesting. Creating plots and graphs, GUIs, and working with data are done in ways unique to Lisp and its dialects and I really like how this book explains how to do so. The last few chapters of the book are super fascinating as they delve into topics like logic programming, computing machines, and even writing an algebraic calculator in Racket.

Throughout, the book suggests the use of an editor I had not heard of called DrRacket. I found it to be useful, especially with its text highlighting and various interactive testing and execution abilities. While I can certainly write Racket code using my usual editor and run it from the command line, the suggestion was appreciated.

So, I read the book. I played with several of the exercises. I decided to give Racket my personal Hello World test: could I write the Guess My Number game in Racket using only what I learned in the book and the official Racket reference website as I have done with several other languages? Short answer: Yes, in about three hours. Not bad for not having written anything from scratch in Racket ever and not in Lisp in over 30 years, even with the possibility that perhaps I wrote some of the code in a non-standard way for Racket, it works as intended.

Disclosure: I was given my copy of this book by the publisher as a review copy. See also: Are All Book Reviews Positive?