Its fun to see my sabbatical project getting loose the wild. It is always a bit scary to work on something creative and new and then let other people play with it and respond to it. Such is the case with the new eBook I worked on during my sabbatical. Unlike other eBooks that you may be aware of, this book — in the words of Emeril — “kicks it up a notch”. Using some cool open source javascript code that I’ve had to modify and bend a bit for my own use this book allows the reader to try their hand at Python right in the book. Examples are fully runnable in two different ways. Each section has an accompanying video. My co-author, David Ranum and I are using this book in class this Fall and its fun to see how the students interact with the book. We’ve had none of the usual Fall frustration at getting Python installed on students machines. You can have a look at the book here. Note, you’ll need a good modern browser, and a gmail account. We’ve had the best success with Chrome and Safari. Firefox 6 works but seems a little flakey at times.
Yesterday Phil Wagner posted a nice little writeup about our project on his BrokenAirplane blog.
As I told Phil, this book is really a triumph of open source. Here are the open source components we’ve used and modified for this project:
- The text in the book is based on the original How to Think Like a Computer Scientist by Jeff Elkner, et. al. You can find the non-interactive version here
- The Python Interpreter is By Scott Graham and you can find out information about it at Skulpt.org. This was a really key piece and although I’ve spent a ton of time creating a turtle graphics module for it, the book wouldn’t have gotten off the ground without it. In the book the pieces we refer to as activecode all make use of sculpt, along with the really nice javascript editor Codemirror.
- What we call codelens in the book is based on work by Philip Guo. I really like this part because students can step through the code a line at a time both forward and backward.
- Finally, the glue that holds the whole thing together is the excellent Sphinx publishing system. This really turned out to be the key as Sphinx lets you create new directives to use in writing. I was able to add directives to sphinx to make it really easy to include the interactive features without getting in the way of the writing.
I really think this Interactive Edition has huge possibilities for the future, I can see incorporating many other interesting kinds of visualizations, and video collections. My future todo list is already very large, and I’m anxious to hear ideas from others as they use the book.