Category Archives: Uncategorized

Public service announcement

Hey, everybody!  Please don’t leave these lying around in the street:

Pile of nails

And if you see them in the street, please pick them up.  Thank you!

Bike tire punctured by a nail

Comments Off on Public service announcement

Filed under Uncategorized

Bayesian statistics for undergrads

On June 13 at Olin College, Sanjoy Mahajan and I are offering a workshop for college instructors interested in teaching Bayesian statistics to undergrads.  More information about this and the other workshops is here.  Here’s the description:

Bayesian Statistics for Undergraduates

Bayesian statistics is a powerful approach to problems involving probability, to making and judging statistical arguments, and to making decisions under uncertainty. But Bayesian methods are rarely taught to undergraduates, in part because they are thought to require too much background in math and statistics.

However, as we will show in this workshop, Bayesian statistics is accessible to undergraduates with diverse preparation. It allows students to study interesting and relevant topics, such as medical testing, courtroom arguments, and polling; it develops quantitative reasoning; and it develops thinking skills with broad application.

In this workshop, we present topics and methods that we teach in two courses at Olin College: “Computational Bayesian Statistics” and “Bayesian Inference and Reasoning.” We include (1) problems appropriate for students with no calculus and no programming background, (2) topics that require, motivate, and reinforce, knowledge of calculus; and (3) methods that require and develop programming skills.

Workshop participants will be able to use these modules and supporting materials to develop courses for a range of audiences and learning goals. Participants should be familiar with basic probability and statistics but need no knowledge of Bayesian statistics. Our computational modules use the Python programming language, but they can be adapted to any language and are accessible to anyone with basic programming skills.

Presenter Bios

Allen Downey is a Professor of Computer Science at Olin College and the author of Think Bayes, Think Stats, and several other books published by O’Reilly Media. He has previously taught at Wellesley College and Colby College. Prof. Downey has a Ph.D. in Computer Science from U.C. Berkeley, and Master’s and Bachelor’s degrees from MIT.

Sanjoy Mahajan is Associate Professor of Applied Science and Engineering at Olin College. He received his PhD in theoretical physics from the California Institute of Technology, and was a member of the physics faculty at the University of Cambridge. While at Cambridge, he helped found the African Institute for Mathematical Sciences in Cape Town, was its first curriculum director, and taught the first courses in physics and computer science. He is the author of  Street-Fighting Mathematics and The Art of Insight in Science and Engineering.


The workshop is at Olin College in Needham, MA.  The morning session runs from 9am-12pm; the afternoon session from 1-4pm.  Lunch and coffee breaks are provided.  Free parking is available.

The fee for the workshop is $500, but the fee is waived for faculty at Babson, Olin, and Wellesley, as well as our Davis partner schools: Bard College At Simons Rock, Central Connecticut State University, Mass Bay Community College, New England Institute of Technology, Norwich University, Regis College, University of Mass/Boston, Wentworth Institute of Technology, and Wesleyan University.

Additional information and the application form are here.

Comments Off on Bayesian statistics for undergrads

Filed under Uncategorized

Epic Munchkin Win!

So, there I was, on Level 8, equipped with my Boots of Butt-Kicking, Gentleman’s Club, Really Impressive Title, fetching Leather Armor, and a Rat on a Stick.  Add it up, I’m fighting at Level 18.


I kick in the door, and what do my wondering eyes behold?  An Undead Horse!


No problem, I say. I am winning, 18 to 4, unless someone wants to mess with me.

And that’s when my older daughter, let’s call here Goneril, plays King Tut, bringing 16 levels of monster to the party.


Fortunately, I have a handy Magic Missile, bringing me to Level 23 and back to winning.


Unless someone wants to mess with me.

And that’s when Goneril pipes up again (how sharper than a serpent’s tooth!) with a a wandering Plutonium Dragon.

Now I’m fighting three monsters with a total or 40 levels, singlehanded.


Or am I?  Because all of a sudden, there are two of me!


Now we’re at Level 41 and winning by a nose.

Unless someone wants to mess with me?

And that’s when my younger daughter, let’s call her Regan, plays the Potion of Idiotic Bravery on the Plutonium Dragon, tipping the balance to 42-41, and I’m losing.


But I have one more card in my hand, a Help Me Out Here, which allows me to steal the Bad-Ass Bandana from Regan’s head, bringing the score to 44-42, and an epic win for the forces of good!


In the aftermath, I gain 5 levels, topping out at Level 13, and collect 11 treasures and the game.

Hey Steve Jackson: best Munchkin win ever?

Comments Off on Epic Munchkin Win!

Filed under Uncategorized

Concurrent Programming at Tufts

Yesterday I visited my friend and former colleague, Mark Sheldon, who is now teaching computer science at Tufts University, and I sat in on his concurrent programming class.  Four teams presented their final projects, which I thought were excellent: the teams came up with interesting and diverse topics.  And in the four presentations I saw, all of the demos worked!

Here’s an action shot from class:


And here’s the mandatory picture of me with Jumbo:


Thanks to Mark and his students for a great visit!

Comments Off on Concurrent Programming at Tufts

Filed under Uncategorized

Think Python 2nd edition

The second edition of Think Python is in production now, and I just got the final draft of the cover:

Think Python 2e cover

And that reminds me to answer a question I get a lot: do you get to choose the animal on the cover?  The short answer is no.  When I worked on my first O’Reilly book (Think Complexity), there was a page for O’Reilly authors that laid down the law: cover designers choose the animals, not authors.  That page seems to be gone, and maybe the rules have relaxed, because I (sort of) got to choose the animal for Think Python.

The first draft I saw had a python on the cover, but I explained to my editor that Python is named after Monty Python, not the snake, so putting a python on the cover is like telling the world that you are not in on the joke.  She asked if there were any appropriately Pythonic animals, so I suggested either a vorpal bunny or a dead parrot.

They were not willing to put a dead animal on the cover, but they suggested a parrot, and I happily agreed.  I did not realize until much later that the designers had the last laugh: my cover animal is a Carolina parrot, which is extinct.  In other words, “This parrot is no more!  THIS IS AN EX-PARROT!”.

The second edition will be published in December, but the early release is available now.

Comments Off on Think Python 2nd edition

Filed under Uncategorized

Think OS and eduScrum

I am teaching Software Systems this fall, which is an introduction to operating systems and C programming, with a splash of networks and databases.  Last time I taught it, I started work on a new textbook, called Think OS, to address some of the problems I ran into:

  1. Most Operating Systems classes, and the books that go with them, are written for students who already know C.
  2. Most OS books are big, and get into details about implementation that are not always relevant to programmers.
  3. Most OS books have a chapter on synchronization, but if you only spend a week on it, most students don’t really get it.

So Think OS is aimed at a different audience.  I assume that readers are just learning C, so I start out using only the most basic language features and work my way up.  And I focus on the parts of operating systems most relevant to programmers.  Think OS is my answer to “What do programmers really need to know about the OS?”

Over the last week or so, I revised the existing chapters of Think OS and added new chapters on synchronization.  The current draft is up now at Green Tea Press.

A few weeks ago I heard about a group in the Netherlands that uses Scrum methods in the classroom.  They call it eduScrum, and their web page is here.  The fundamental idea is that the teacher, as product owner, creates the product backlog, which specifies what the students should learn.  The students pull items from the product backlog into their sprint backlog and make their own decisions about which items to work on, how to proceed, and in some cases how to demonstrate what they have learned.

I am planning to try it in Software Systems, so we’ll see how it goes!


UPDATE 6 October 2015: We just finished Sprint 2.  Things are going well so far.  Here’s what the standups look like.




Comments Off on Think OS and eduScrum

Filed under Uncategorized

Think Python 2e

I am hard at work on the second edition of Think Python.  The current draft is up now at

New features include:

  1. Python 3!  The first edition is mostly Python 2, with notes about some of the differences in Python 3.  The second edition is the other way around: all Python 3, with a couple of notes about Python 2.
  2. All the supporting code runs under Python 3 and Python 2.
  3. I’ve added a new chapter called “The Goodies” that includes handy Python features that didn’t make the first cut, including list comprehensions, sets, namedtuples, and my personal favorite under-appreciated data structure, Counters.
  4. In the turtle graphics case study (Chapter 4), I’ve replaced my home grown package, Swampy, with the standard module turtle.  I hear from a lot of people having trouble installing Swampy, so this change should make life easier, for them and me.
  5. For beginners, I am working on instructions for starting out running Python in a browser, using PythonAnywhere.  That way, people can get right into Python without dealing with installation issues.

The draft for technical review is due next week.  We’ve got an excellent group of reviewers lined up; I am looking forward to their feedback.  Publication date is not set yet, but should be some time this fall.

Comments Off on Think Python 2e

Filed under Uncategorized

Report from SciPy 2015

Last week I was in Austin, TX for SciPy 2015.

On Monday afternoon I sat in on a tutorial on multibody dynamics using SymPy, lead by Jason Moore and Jim Crist.  I learned a ton.

Tuesday I ran my tutorial, Computational Statistics I, then sat in on Chris Fonnnesbeck’s Computational Statistics II.  Here’s an action shot from the afternoon session:

Wednesday I presented a talk called “Will Millennials Ever Get Married?” which included results from a survival analysis I applied to data from the NSFG.  Here’s the view from the back of the room, a few minutes before I went on:

And in the afternoon I presented a talk called “Basic Sound Processing in Python”, based on material from Think DSP.  So the first few days were busy!

After that, there were a lot of excellent presentations and I got to talk with lots of interesting people.  But it was nice to take it easy.  Thursday night we went on a river boat to see the bats.  I didn’t get a good photo of the bats, but here’s a twilight shot of downtown Austin:

Overall an excellent conference.  Many thanks to the organizers!

Comments Off on Report from SciPy 2015

Filed under Uncategorized

Bayesian Data Science workshops starting July 22

This summer I am offering a series of workshops on Bayesian statistics.  The first workshop, based on the tutorial I taught at PyCon, will be offered July 22 and August 10.  Then on August 18 I am rolling out a new workshop with more advanced material.

This web page has more details about the workshop.

The workshops will be at the Cambridge Innovation Center (in Cambridge) starting at 9am.

Here’s what it looks like when I teach a workshop.  You can tell I’m pretty serious.

20150528-Orbitz-Downey Session-0002

Comments Off on Bayesian Data Science workshops starting July 22

Filed under Uncategorized

Sound processing in Python

At SciPy 2015 I’ll present a short talk on sound processing in Python, based on my book-in-progress, Think DSP, and the class I helped teach this spring.  I’ve been preparing the talk this week; it is almost ready to go!  The current draft of the slides is here, and the accompanying notebook is here.

Here’s my favorite figure from the talk, the spectrogram of a sawtooth chirp (notice the aliasing bouncing off the Nyquist roof):

Spectrogram of a sawtooth chirp


To hear what it sounds like, you can load the notebook and play it.  The talk is July 8 at 2pm.

Comments Off on Sound processing in Python

Filed under Uncategorized