This week we welcome Allen Downey (@AllenDowney) as the PyDev of the Week! Allen is the author of Think Python, Modeling and Simulation in Python, Think Java: How to Think Like a Computer Scientist, and several other books. Allen is also a professor at Olin College in Massachusetts.
You can catch up with Allen by visiting his website. Now let’s spend some time getting to know Allen better!
Why did you start using Python?
I started using Python in 1999 when I was teaching computer science at Colby College. That’s when I wrote the first version of the book that became Think Java, which I published online under a free license. Jeff Elkner took advantage of the license and translated the book into Python, so I learned Python by reading my own book!
What other programming languages do you know and which is your favorite?
The first language I learned was BASIC running on a Commodore 64 (in 1982, I think), followed by 6502 Assembly and C, then Java and C++, and then Python. I know smatterings of a few other languages, but Python is by far my favorite. Along with other modern programming languages, I think Python fundamentally changes the nature of programming. First-generation languages are for coding, which is translating ideas into code. Second-generation languages are tools for exploring, learning, teaching, and thinking.
I wrote more about this topic in this article:
What projects are you working on now?
The big project right now is Probably Overthinking It, a new book based on articles from my blog. I am working on the second-to-last chapter now; if things go according to plan, it will be published in early 2023. In the meantime, I’m posting updates and excerpts on my blog at http://www.allendowney.com/blog/
Which Python libraries are your favorite (core or 3rd party)?
One of my favorites is empiricaldist, which provides objects that represent empirical distributions (based on data rather than mathematical formulas). But that’s my library, which I wrote to support Think Bayes and projects, so maybe that doesn’t count. My favorite library that I didn’t write is Pandas, which I use for just about everything now, including the implementation of empiricaldist.
How did you decide to be a book author?
Out of frustration! I was teaching an introductory programming class using Java and I was really frustrated with the existing books. Among other things, they were much too long. There was no way the students could read them — they just don’t have time. I thought if I could get it down to 150 pages, which is about 10 pages per week, they would be able to read and understand them, and we could build from there. I started writing about two weeks before the semester started, one chapter a day, then one day to edit and off to the printer! That’s the other benefit of short books — they don’t take so long to write.
What concepts do you find your computer science students struggle with the most?
Functions, no question. For a lot of students, functions are the make-or-break moment in learning to program. If you think about it, there’s a lot going on when you call a function: the arguments get evaluated and assigned to parameters, the flow of execution takes a detour, local variables get created and destroyed, and then the return value gets passed back. That’s a lot for beginners to get their heads around. And then we add recursion! Unfortunately, that’s a barrier a lot of students don’t get past, at least on their first attempt.
Is there anything else you’d like to say?
I have news! At the end of this semester, I am retiring from Olin College and starting a new position as Staff Scientist at DrivenData. I still love teaching, but I have been on a college campus in one role or another since 1985, so I am ready for a change. And I am excited about the opportunity to apply Data Science for Social Good, especially in the areas of development and climate change.
Thanks for doing the interview, Allen!