PyDev of the Week: James Bennett

This week we welcome James Bennett as our PyDev of the Week! James is one of the core developers of the Django web framework. He is also on the Board of Directors of the Django Software Foundation. James maintains a blog and has several fun projects over on Github that are worth checking out. Now let’s take some time to get to know our fellow Pythoneer better!

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

I did my degree in philosophy, at a little liberal-arts college in Virginia. It wasn’t until I was in college that I had regular access to a computer or the internet, and I I taught myself HTML one weekend because a professor offered the choice between writing a 20-page paper or building a 5-page website to present some research, and I was lazy. Then people started paying me to do sites for them (it was the 90s, when people found out you knew HTML they’d do that!), and things just kind of proceeded from there. I never did take any CS courses, but I did learn DocBook and LaTeX when deciding how to typeset my thesis.

After college I bounced around a bit, worked an office job for a while to build up some savings, then started doing full-time contract work as a web developer. Later, I tried and fell in love with Django shortly after it was initially released which led to moving to Kansas and working at the company which originally developed Django. While I worked there, I picked up a commit bit and became the release manager. After five years there I went to Mozilla, where I spent four years as a member of the team building the Mozilla Developer Network platform.

These days I live in the San Francisco Bay area and work at Clover Health, where we’re trying to make health insurance a whole lot better. I also keep a blog where I occasionally write about Django, Python, or whatever else is on my mind.

My unbearably nerdy non-tech hobby is Magic: The Gathering, which came out originally when I was in middle school. I’ve played it off and on since then, and for the past seven years I’ve also worked as a tournament official on the semi-professional and professional circuits (yes, there are professional tournaments). I’ve met a lot of cool people through that, and gotten to travel quite a bit; once, for one of the top-tier pro tournaments I got a free trip to Hawaii, since that was where it was held.

The amount of travel I ended up doing between that and tech conferences and (until 2015) being a remote employee also got me sort of inevitably into being a bit of an aviation geek and knowing more than is good for me about planes, airports and frequent-flyer programs.

Why did you start using Python?

I picked up Python back when I was doing contract web-dev work, mostly in PHP and Perl, and frustrated by the amount of rote memorization and inconsistency in those languages. And I kept hearing good things about Python, so I worked through the online edition of “Dive Into Python” and got hooked. I wasn’t able to start doing paid work in Python for a little while after that, though, because I didn’t know Zope and back then Zope was where most of the web-dev contract money in Python was.

I first started getting to use Python professionally shortly after Django was initially released, and my first full-time Python gig was working at the little newspaper in Kansas (the Lawrence Journal-World) where Django was originally developed.

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

I’ve written quite a lot of PHP and Perl, though it’s been a long time so I’m not sure I’d say I “know” them anymore. I do keep up with JavaScript, and I have to say it’s a lot nicer language (and the browser environment is *way* nicer) than it was back in the days when we called it “DHTML” and just used it to make image rollovers and annoying things that moved away when you tried to click them. I feel like the core language is getting pretty good, really, but it’s in desperate need of someone to provide it with a solid standard library.

Beyond those, I know enough C to pose a moderate danger to myself, I can write Java or C# if I have a library reference handy (earlier in my career they seemed like “safe” backup languages to know), I know enough Bash to know that I shouldn’t write Bash, I’ve got some Emacs Lisp courtesy of something like 18 years of using it as my everyday editor, and then bits and pieces of a bunch of other things.

I try to do a tutorial for a new language every so often, to see if there’s some cool idea or paradigm I’m missing. In the last few years I’ve tried out several functional languages (OCaml and F# seem nice), and when I worked at Mozilla I gave Rust a spin. My biggest barrier to going further with a new language is usually lack of something non-trivial that I’d want and have the time to write in a new language, since my coding time is dedicated to my day job and my existing open-source commitments.

My favorite language is still Python, no question. The combination of readability and conciseness I get from Python is something I’ve never found in another language. It also just seems to really fit my brain, and when you couple that with the standard library, the huge ecosystem of third-party stuff and the awesome community, I feel like I can do just about anything I’d ever need to do in Python.

What projects are you working on now?

I’m less directly involved in Django these days than I was when I first got my commit bit; now I describe my role in the project as “grumpy old man”, though I think a couple other people would challenge me for the title. I’m still on Django’s security team, I’m on the technical board which acts as the final tiebreaker for some types of decisions ever since Jacob Kaplan-Moss and Adrian Holovaty formally stepped down as co-BDFLs of Django, and I’m on the Board of Directors of the Django Software Foundation.

I still maintain a few Django-related packages, which I’m always tinkering with to some degree, and now I’m prepping all of them for new releases to coincide with Django 1.11 coming out. I’ve also been giving thought to writing another book (I wrote two editions of an introductory Django book once upon a time), but I know better than to publicly commit to such a thing. If I go for it, I’ll probably just write it in my spare time without telling anyone, then announce it when I find a way to get it published.

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

I should say up-front that I like boring software. And when I use that term, I don’t mean it in the sense of “not interesting”, I mean it in the sense of “not surprising”. My ideal of boring software is something that does its job, quietly and reliably, and doesn’t spring any nasty surprises on me. I’ve been the person who gets the phone call at 3AM on a Sunday because some crucial service just went down, and those are the kinds of surprises I don’t need in my life.

So in the standard library I’d go with the csv module. I’ve probably gotten more mileage out of it than just about any other module Python ships with, and it’s the epitome of a “boring” (in the good way!) piece of code: probably nobody’s ever going to get to the front page of Hacker News by using it, but it just does its thing and makes life easier.

Third-party I guess I’d be cheating if I said Django, so I’ll go with BeautifulSoup. It’s another one of those unglamorous but incredibly useful pieces of code, and I don’t think I could begin to estimate how much time and work it’s saved me over the years.

Where do you see Python going as a programming language?

I want to repeat what I said above about boring software, and boring being a *good* thing, because I think Python is boring software. It’s gone through a certain amount of trendiness and newsworthiness, but it feels like that’s passed, and we’re back to it being just a solid, decently popular language that’s used by people who are getting things done.

Python 3 cleaned up a lot of accumulated warts in the language, and the addition of the async/coroutine stuff seems to be in good shape, so I don’t know that there’s anything major the language is really lacking. And one of the things I’ve always liked about Python was how much of each release was in small, sensible improvements that just make a programmer’s life easier a little bit at a time.

At this point I expect the big things to be happening in the ecosystem of tools and libraries rather than in the language itself. For example, packaging has gotten a lot better than it used to be, but I’m excited to see the work that’s still going on in that area to really make the tooling and infrastructure great.

What is your take on the current market for Python programmers?

I think it’s a good time to know Python. When I first started learning it, Python (outside of its own community) was seen as maybe a fringe Unix scripting language for people who didn’t like Perl. Now, it’s everywhere and lots of companies are building all sorts of things on top
of it.

To take an example: I work at a health-insurance company. We do everything — from receiving and parsing and categorizing data, to processing and analytics pipelines, to applications which implement our business logic and interoperate with vendors — in Python, end to end. And of course we’re in a highly-regulated space, and one where regulations and requirements are subject to change, so Python is a big advantage for us: we can implement complex requirements, or adapt to even some pretty big changes, much faster than if we were built on more traditional enterprise-space languages and tooling.

The ability to do that is a big selling point for Python, which turns into a lot of demand for Python programmers. And everything I’ve read suggests there is quite a lot of demand.

Is there anything else you’d like to say?

One of the biggest risks facing our entire field right now is our own elitism and our entrenched belief that somehow we select on or reward “merit”. The truth is, we subject people to a barrage of hazing rituals and shibboleths; reward luck and arrogance; and confuse insults and mockery for honesty and straightforwardness.

The result is a dangerous monoculture of mediocre assholes — rather than selecting for people who show technical merit (which comes in many shapes and forms), we put the power of selection in the hands of people whose “merit” was willingness to put up with all that crap in order to one day be the ones dishing it out to others. So naturally they end up recruiting people like themselves and perpetuating that cycle.

In the process we drive away a *lot* of people who can and would write good code if only we’d give them a bit of help and kindness as they get started, which is something that’s strange to tolerate given how desperate companies always are to find people with good technical skills, and how even more desperate open-source projects always are for contributors to keep them going. Going back to the aviation-geekiness I mentioned earlier, I can draw an analogy: airlines in the US have been agitating for a while about a “pilot shortage” threatening their industry, but the problem isn’t a shortage of people who’d make good pilots. The problem is the airlines treat their junior pilots horribly, and news about that has gotten around, so there just aren’t enough people willing to put up with it anymore and the airlines can’t keep their ranks filled. The software industry feels like it’s heading for a very similar situation.

This won’t be easy to fix, but we *have* to fix it or else it will pose an existential threat to our industry and to the open-source ecosystem. And we have to fix it in a lot of places: we have to fix it on mailing lists and discussion forums, we have to fix it at conferences, we have to fix it in interviewing and hiring processes, we have to fix it in office cultures, we have to fix it basically everywhere and in every process we have.

The Python community has taken some big steps on this, but there’s still a lot of work ahead of us. And it’s going to take effort from all of us in order to succeed. If you’re unsure what you could do, the best thing is just to be kind to people and assume newcomers are smart and capable of doing good work if given a chance to learn, rather than being driven away for not being experts from day one. I certainly wasn’t an expert when I started out, and neither was anybody else!

Thanks for doing the interview!

Print Friendly
  • Good interview. And thanks, James, for saying what you did in the last section of the interview. I too see a lot of that stuff and agree with you. Cheers.