PyDev of the Week: Brian E. Granger

This week we welcome Brian E. Granger (@ellisonbg) as our PyDev of the Week! Brian is an early core contributor of the IPython Notebook and now leads the Project Jupyter Notebook team. He is also an Associate Professor of Physics and Data Science at California Polytechnic State University. You can also check out what projects he is working on over at Github. Let’s take a few moments to get to know Brian better!

Can you tell us a little about yourself (hobbies, education, etc):

I am going to start with the fun stuff. Since high school I have been playing the guitar, swimming and meditating. It is hard to be disciplined, but I couldn’t survive without a regular practice of these things. Doing intellectual work, such as coding, for long periods of time (decades) is really taxing on the mind, and that spills over to the body. I truly love coding, but these other things are the biggest reason I am still coding productively at 45.

In some ways, I look like a pretty traditional academic, with a Ph.D. in theoretical physics from the University of Colorado, Boulder, followed by a postdoc and now a tenured faculty position in the Physics Department at Cal Poly San Luis Obispo.

Along the way, I started building open-source software and that has slowly overtaken my entire professional life. Fernando Pérez (IPython’s creator) and I were classmates in graduate school; I began working on IPython around 2005. Fernando remains a dear friend and the best collaborator I could ever ask for. The vision for the IPython/Jupyter notebook came out of a late night discussion over ice cream with him in 2004. It took us until 2011 to ship the original IPython Notebook. Since then my main research focus has been on Project Jupyter and other open-source tools for data science and scientific computing.

Why did you start using Python?

I first used Python as a postdoc in 2003. My first Python program used VPython to simulate and visualize traffic flow. I had written a previous version of the simulation using C++, and couldn’t believe how Python enabled me to spend more time thinking about the physics and less about the code. Within a short period of time, I couldn’t bring myself to keep working in C++ for scientific work.

What other programming languages do you know and which is your favorite?

I used Mathematica in my physics research during the 1990’s. During graduate school and as a postdoc, I worked in C++. At the time, C++ was still pretty painful. I don’t miss that, but modern C++ actually looks quite nice.

Python remains my favorite language, mainly because it is so much fun and has an amazing community.

At the same time, these days I am doing a lot of frontend development for JupyterLab in TypeScript. For a large project with many contributors, having static type checking is revolutionary. TypeScript looks a lot like Python 3’s type annotations, and I can’t wait to begin using Python with static type checking.

What projects are you working on now?

Jupyter and IPython continue to take up most of my time. On that side of things I am working hard with the rest of the JupyterLab team to get the first version of JupyterLab released this summer.

In 2016, Jake VanderPlas and I started Altair, which is a statistical visualization package for Python based on Vega/Vega-Lite from Jeff Heer’s Interactive Data Lab at the University of Washington. While I spend less time on Altair, it, along with Vega/Vega-Lite are a critical part of the overall data ecosystem we are building for Jupyter users.

Which Python libraries are your favorite (core or 3rd party)?

Wow, there are so many. Pandas brought Python to the data world. I love the API design of the libraries that Matt Rocklin has built (Dask, multipledispatch, toolz). In spite of healthy competition from all the new JavaScript based visualization libraries, Matplotlib remains indispensable.

Where do you see Python going as a programming language?

It won’t be long before we are all writing statically type-checked Python 3 code 😉

Is there anything else you’d like to say?

A huge thanks to everyone, users and developers, in the Python community. It is a great blessing to work alongside all of you!

Thanks so much!