This week we welcome William Punch as our PyDev of the Week. Mr. Punch is the co-author of the book, The Practice of Computing using Python and he is an assistant professor of computer science at Michigan State University. Let’s take a few moments to get to know him better!
Can you tell us a little about yourself (hobbies, education, etc):
Iâ€™m a graduate of The Ohio State University. I did my undergraduate work in organic/bio chemistry and worked for a while in a medical research lab. I found I didnâ€™t like the work as much as I did in college so I looked for something else. Fortunately the place I worked offered continuing education so I started going to school at night at the University of Cincinnati to study chemical engineering. I thought I could get through that quickly given my background. The first courses I took were computer science courses and I was completely taken with them. I changed to CS and eventually went back to OSU and got my Ph.D.
As a chemist I was always fascinated with glasswork, and so I do glass blowing in my town when I have the time.
Why did you start using Python?
My colleague, Rich Enbody, and I were starting to re-design our introductory programming course which had been in C++. We knew that was a bad choice for an introductory language but were unsure what to use instead. Most fortunately, we had a new faculty member join us as MSU, Titus Brown (now at UC Davis) who was a Python fan. His enthusiasm was contagious so we looked into Python and were immediately convinced that this was a great introductory programming language.
We redid the course in Python but couldnâ€™t find a good book to support it so we wrote our own (â€œThe Practice of Computing Using Pythonâ€, now in its third edition)
What other programming languages do you know and which is your favorite?
I was pretty proficient in Lisp, especially in my early years as I did a Ph.D. in Artificial Intelligence. I still love Lisp, but other languages proved more â€œdurableâ€ so I mostly program in Python or C++ (the alpha and omega I would think of programming languages, at least in terms of difficulty)
What projects are you working on now?
I think my experience with Python gave me the incentive to rethink how C++ is taught (we teach C++ as the second language here at MSU). Given the changes with C++11 through 17 and with the development of the STL, you can write very Python-like code in C++ and be effective. Iâ€™m revamping the course and developing a book to accompany it.
Which Python libraries are your favorite (core or 3rd party)?
Far and away my favorite library is matplotlib. The focus for the Python book was data analysis and visualization and matplotlib is the visualization tool. So easy to use but so flexible as well. I love their saying: â€œMaking easy things easy and hard things possibleâ€. I use numpy (who doesnâ€™t?) and pandas (given the data analysis focus), but also like more computational stuff like pycuda and pytorch. One of my Ph.D. studentâ€™s did a lot of his Python prototyping using pypy to speed things up which helped us a lot in working out some of the details of his dissertation.
And finally, I use ipython as my console, which I think is a given these days as well. What Fernando Gomez did when he started the whole ipython/notebook/jupyter system is a remarkable story about how a small idea can take off and make a very big difference.
What did you learn from writing the book, “The Practice of Computing using Python”?
What I learned is probably not what most would think. I learned that writing a book is hard. Not just the hard work of grinding out the pages, but writing in a way that is useful to the students who might read it. Explaining ideas simply and clearly is not easily, nor quickly, done. One of my favorite quotes (probably rightfully attribute to Blaise Pascal), is translated to something like
â€œI have made this longer than usual because I have not had time to make it shorter.â€
(see https://quoteinvestigator.com/2012/04/28/shorter-letter/ )
What would you do differently if you were to rewrite it?
Iâ€™m a huge fan of the whole notebook/jupyter ecosystem and I regret that our work came out before that was a well-developed system. I think the future of writing textbooks is going to be changed because of notebooks and students will be much better off because of that work.
Thanks for doing the interview!