Sunday, December 08, 2013

A fun programming book: Land of Lisp

Do you want to read a fun programming book? Grab a copy of Land of Lisp.  Still undecided? Read on.

The recent explosion in programming languages and platforms has led to a similar explosion in books about programming. You can get a dozen books on each of a dozen popular languages: C++, Java, Python, PERL, Ruby, Scala, Haskellapackman.  There is a large variety of books, but I feel all of them miss out an essential ingredient.

None of them are any fun.

Remember fun? When you popped open an arcane book with funny cartoons and typed out a program filled with cryptic letters? And if you were right, the game worked!  You could change the source to see what happened.  That was truly fun: experimentation without an objective. You could imagine a wide expanse of possibility: there was so much a computer could do. Sometimes you typed hundreds of lines, and nothing worked. But that was fun too, in its own frustrating way. Sometimes you figured out how to make it work and felt very good about yourself.

Fast forward twenty years and modern computer programming is a mindless drudgery. Books are all about the techniques: how to combine five libraries to produce an XML parser. How to combine visual elements to make an application for a bank. None of these books would inspire anyone to learn a new language. They are all about how to get specific skills. Boring and dry, these books are made so a career software engineer can learn the buzzwords and stay employed for a few more months.

Learn <language> in 20 days: data types, branches, functions, objects, network programming, advanced techniques. That describes half of the books I see in bookshops.

So amidst this very boring scene I stumbled on The Land of Lisp. This book could be about an arcane and completely useless language and it would still be a lot of fun!  The book revolves around writing games in LISP.  Unlike old books containing BASIC code, the LISP code in this book is well explained and motivated. You can see why the author writes a specific function one way. Little functions are presented highlighting what their purpose is. You are told how to get CLISP and run code inside it. The games are fun! And there are cartoons.

Funny cartoons.
In a programming book about LISP. Hell just froze over.

This book gets you to enjoy programming. It could be written for Java or C++, and it would still be a lot of fun. Because programming, like any other hobby, is a heck of a lot of fun.  You could be a dentist and write code for fun. Isn't that a crazy thought?

To be fair, this book won't work for children. It is quite a detailed look into LISP, and requires a lot of motivation to get through. Children might enjoy looking at the cartoons (my kid certainly does) but they might not understand the intricacies (my kid certainly doesn't). It is like Calvin and Hobbes: a child will enjoy it but not understand a word.

For younger kids, a simpler book would be welcome. I'd love to see more books written in this style.  Let's make programming fun, and kids will learn it without any further incentive. A similar book on BASIC or Python might just work for young children. Yes, BASIC, that language nobody uses because grandpa won't stop talking about it. Well, that ancient language is still a lot of fun for children because children don't care about infix versus prefix, or cyclomatic complexity. They care about doing cool things with a computer. Children want to have fun while playing with their computer.

And while we are hoping, let's see more books like this for adults. I'm waiting for a book on Android programming or C++ that makes it fun!

(Image courtesy: Land of Lisp website)