Allen Downey's Projects


Allen B. Downey

Free Textbooks

I have written several free textbooks, including How to Think Like a Computer Scientist, The Little Book of Semaphores, Physical Modeling in MATLAB, and Learning Perl the Hard Way. All are available under the GNU Free Documentation License, which means that readers are free to copy, modify and distribute them.

There are versions of How to Think... that use Java, C++ and Python, and some versions of the book have been translated into other natural languages. I am currently working on a revised edition of the Python version with the working title How to Think Like a (Python) Programmer.

The Little Book of Semaphores is a (still relatively) small book intended to teach concurrent programming and synchronization.

Physical Modeling in MATLAB is an introduction to programming in MATLAB and simulation of physical systems. It includes an introduction to numerical approximation of differential equations.

Learning Perl the Hard Way is a short introduction to Perl intended for people who already know a programming language and some data structures, and who want to dive into what I think are the more interesting parts of Perl.


Lately I have been working mostly in Python, developing programs that I use for my classes, and also some small programs that other people might find useful:

  • Swampy: is a suite of programs I use in my classes, including a Logo-like TurtleWorld and a simulator for use with The Little Book of Semaphores.

  • X11 Color Space Visualization: a few simple Python programs for visualizing the space of X11 named colors.

  • Lumpy: a UML generator for Python.

  • a simple, incomplete translator from LaTeX to (MoinMoin) wiki.

I contributed a wrapper class for Python's heapq module to the Python Cookbook.

I am embarassed to admit that I wrote a Java program that searches a text file to file instances of unintentional haiku.

I wrote a small program called label.tcl that generates labels in Postscript.

I wrote a set of programs called Geoduck that provides transparent GUIs for some common UNIX commands.

I have also written a network measurement tool called clink that estimates the bandwidth of links in an Internet path.


Here are some essays on a selection of random topics.