PyDev of the Week: Cooper Lees

This week we welcome Cooper Lees (@cooperlees) as our PyDev of the Week! Cooper has contributed to the Python programming language. He is also a maintainer on bandersnatch and black, among others.

You can see what else Cooper has been up to over on his website or on GitHub. Let’s spend some time getting to know Cooper better!

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

I’m a relocated Aussie living in South Lake Tahoe, California, USA. I am currently employed by Facebook Inc. and have been there for over 8 years. I like sports in general, with Cricket + Aussie Rules Football as my favorite sports to both watch and play. I also Ski and Snowboard (living in the mountains helps). In the summer I love road cycling.

I studied “Internet Science” at the University of Wollongong, NSW, Australia. It was meant to be a new Internet-based Computer Science/Electrical Engineering degree, which I believe has since been retired. Since college, I have done many Cisco + Juniper networking courses and exams + lots of self-teaching.

Why did you start using Python?

My python life started meaningfully at my first job at the Australian Nuclear Science and Technology organization. A colleague told me to write more “civilized” code in Python, rather than the perl I was hacking together to get my Systems Administration tasks done. My first meaningful Python code was an LDAP to Sendmail alias file generator for Solaris 10 mail-relay hosts in Python 2.4. I never got to experience < 2.4.

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

I know a little C, Perl, and Go. But I’ve really knuckled down and learned Python reasonably well. Python by far is my favorite language as most of my workloads I need to code for asyncio, so thread pools and process pools allow me to get the job done.

What projects are you working on now?

In the OSS world I currently help maintain the following packages:

  • bandersnatch – Python PyPI PEP X Mirroring Software
  • black – Opinionated AST safe-ish Python code formatted
  • flake8-bugbear – AST flake8 plugin finding bad code smells

At my day job as a Production Engineer at Facebook, I work on our Internal Routing Protocol daemons that run our own FBOSS Switches. Main software we develop and maintain is:

  • Open/R
  • An in house BGP daemon
  • Server VIP injection (via thrift + BGP)

are my main projects. I am also helping remove the long tail of remaining legacy IPv4 in our datacenter network. We are slowly pushing it all out to our edge only. 99. Many 9’s of our internal traffic is IPv6.

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

  • Core Libraries: Bias to the ones I’ve contributed to: pathlib + venv

Third Party:

  • click – For easy clips with subcommands + color output etc.
  • aioprometheus: I love metrics so love putting prometheus exports on everything I write
  • aiohttp: Best async http library to run servers or clients to http based services
  • uvloop: Best way to speedup your asyncio program having a fast C libuv based event loop

Is there anything else you’d like to say?

Contribute to Open Source. From triaging, writing code and CI, it all helps! Proof of concept PRs are worth it to get your point across. Automate your pain away. Always add unit tests!

Thanks for doing the interview, Cooper!