Did you know? DZone has great portals for Python, Cloud, NoSQL, and HTML5!

Java technology consultant and author of several books related to topic. Have been working with Java platform since 1995. John has posted 2 posts at DZone. View Full User Profile

Land of Lisp: Learn to Program in Lisp, One Game at a Time

01.31.2011
Email
Views: 3355
  • submit to reddit
Published by: No Starch Press
ISBN: 978-1-59327-281-4

Reviewer Ratings

Relevance:
5

Readability:
4

Overall:
4

Buy it now

One Minute Bottom Line

Great introduction/refresher to Common Lisp and game development. Interesting use of author's own comics to keep reader amused, if not as only a side tangent. Presents a view into the power of functional programming as author codes several games, like Grand Theft Wumpus.

Review

I haven't programmed in Lisp since the 1980s, but after seeing this title I thought it would be interesting to freshen things up a bit. Who wouldn't want to read a programming book with a comic alien on the cover driving his spaceship around the moon? In fact, the comics are spread throughout the book and even make up their own chapter or two. While they are cute and quirky, after a while I found them distracting, as this is a book about learning a programming language, and not a comic book. Enough about the comics though. What you have here is a great book to get you started in the land of functional programming with Common Lisp. Sure, you might get lost in silly parenthesis but author Conrad Barski tries his best to keep you interested with the help of game development as you read your way through the comics.

The Land of Lisp title is broken into four sections, where each section takes you deeper and deeper into your understanding of functional programming with Common Lisp. Like a typical introductory programming book, you have the sections broken into getting started with a “Hello, World” like program, syntax basics, some structural elements, and then a big example at the end. All along the way, the author introduces new concepts with comics and game-related examples.

The book’s chapters vary widely in their breadth and depth. Skipping around a bit, the Create a Web Server chapter offers a great example of creating a whole web server, in Lisp obviously. I liked the Advanced Datatypes and Generic Programming chapter as a pure refresher for handling complex data structures in the language. And the Building a Text Game Engine chapter brought back memories of Zork and 300 baud acoustic couplers.

Coming from a strong UI side background, reading this book felt like a big step back in time. Instead of examples full of creating screens to demonstrate programming concepts, the book’s examples are full of text-oriented gaming concepts: guess a number, roll some dice, or hunt a wumpus. Even the web-based drawing example seemed so last century. This isn’t necessarily a bad thing. The book is about learning Common Lisp and what Common Lisp is good for isn’t those fancy screen based user interfaces. Lisp has its appropriate domain for solving problems and that is how this book teaches you.

To learn Common Lisp with this book you need to sit down at your computer and open up your read-eval-print loop (REPL) interface. Then type. As the <a href="http://www.youtube.com/watch?v=HM1Zb3xmvMc">video</a> on the <a href="http://landoflisp.com/>book’s web site</a> shows, it is just like typing those BASIC programs from the 1980s into your computer and seeing the results immediately. Yes, the source code is available online for you to download, but if you don’t type it in yourself here, you are really not going to learn as you go. Sure, you can play Dice of Doom more quickly, but playing the different games more quickly isn’t the main reason why you get an introductory programming text. It is to learn the language, and you do that by typing in the code yourself.

If you’re looking to use this book as an academic text, it may work but I’m not sure how well. If you were to use Land of Lisp, the student should already have a grasp of programming as the book doesn’t try to address topics too introductory. While the gaming examples are great in each chapter, to learn the Lisp concept at hand, there aren’t any natural exercises/problems to do at the end of each chapter. Each chapter does end with a “What You’ve Learned” section, but the section is just that, a rehashing of what you’ve learned in the chapter. And what academic text would be full of comics? Plan on creating your own teacher’s guide with exercises or ask in the book’s <a href="http://groups.google.com/group/land-of-lisp">Google Group forum</a> to see if someone already has. It is certainly possible someone has already done that.

In the end, the book provided a great Lisp refresher for me. In all these years, the language hasn’t changed much and I was able to pick up the syntax fairly easily again through the help of the book’s readable text and friendly examples. The biggest hurdle for me was the thought differences in functional versus object-oriented or procedural programming. Lisp isn’t for everyone but if you’re interested in learning the language Land of Lisp provides a great jumping off point. For me, I might have to look more at Clojure in the land of Java. As far as the comics go, you may have first seen them online at the author’s <a href="http://www.lisperati.com/casting.html">Casting SPELs in Lisp tutorial</a>. They certainly are very prevalent in the book. Almost too much so. Almost.

Published at DZone with permission of its author, John Zukowski.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)