PyDev of the Week: Lukasz Langa
Lukasz discusses a bit about himself, how he got started with Python and how he's using it, and where he sees the future of the language going.
Join the DZone community and get the full member experience.Join For Free
This week we welcome Łukasz Langa (@llanga) as our PyDev of the Week! Łukasz is the author of PEP 443 — Single-dispatch generic functions. He also authors an interesting blog, although it’s not just a programming blog. You can see what Łukasz has been up to over on Github. Let’s take a few moments to get to know him better!
Can You Tell Us a Little About Yourself (Hobbies, Education, etc):
My first name is Łukasz which is an endless source of Unicode joy. I have been committed to Python since 2010 and started out as a maintainer for configparser. Nowadays I am working on the type hinting side of things. I like analog synthesizers, bicycles, and the Fallout game series. In my free time, I’m helping Facebook embrace Python 3.
Why Did You Start Using Python?
This is a bit embarrassing. It was Autumn 2004, I was studying Computing Science at Poznan University of Technology in Poland. I had trouble with some courses I took, namely Linear Algebra. A friend showed me some scripts he wrote in Ruby and some linear algebra library to check his results when solving homework assignments. I badly needed some reassurance so I got excited about this. Sadly, for some reason, Ruby refused to install on my Windows XP box at the time.
As a test was scheduled for the very next day, I started looking for alternatives. I literally typed “ruby alternative” in Google and found Python that way. This installed cleanly and I quickly found a functional linalg library replacement. I can’t remember what it was anymore, this was before NumPy was a thing! Either way, I got hooked.
What Other Programming Languages Do You Know and Which is Your Favorite?
I’ve done a lot of programming in Java back when Java 5 was the latest and greatest. It was a pretty simple language which is both a good thing (you could get up to speed pretty quickly) and a terrible thing (design patterns were a must). I liked the comprehensive documentation, I liked being able to “build once, run everywhere.” To this day I have some applications I wrote 12 years ago with some early version of NetBeans on a Windows box. I can still build them perfectly fine on the latest MacOS with ant and run them with no changes. With GUI and sounds. That’s pretty neat.
There’s also C that I invested a few years of my life in, but ultimately don’t use much anymore except when interfacing with Python. I tend to romanticize it a little, but when forced to actually work with it, I’m amazed at how tedious simple operations are. It really *is* a low-level language.
What Projects Are You Working on Now?
As part of my day job, I’m introducing type annotations to several large codebases. It’s pretty early but we’re making good progress. This enables me to contribute back to Python, too. These days I spend most of my time maintaining typeshed, our collection of external type annotations for the standard library and third-party libraries.
Since I’m also taking care of Python code linting at work, I semi-regularly fix things in pyflakes, flake8, and friends. I maintain two flake8 plugins myself (flake8-bugbear and flake8-pyi), you should use them.
Which Python Libraries Are Your Favorite (Core or 3rd Party)?
I like how asyncio is bringing async to the masses. It’s getting a lot of traction, and rightfully so! If you have the opportunity, try it out, it’s amazing. With the native async/await syntax and numerous improvements it received in the 3.5.x releases, it’s a joy to program in. Maybe it’s the Eastern European genes in me, but I find asyncio fits my brain very well.
Speaking of the standard library, pathlib is quickly becoming one of my favorite Python libraries. It’s very elegant. I also cannot recommend mypy enough. Use it, it will make you design your APIs better, make your intent clearer to the reader, and will find bugs in the process.
Where Do You See Python Going as a Programming Language?
For a while there, I was pretty concerned with the state of Python because of the Python 2 vs. Python 3 split. Fortunately, it looks like we reached critical mass now. At work, over 16% of our Python projects are currently running on Python 3.5+ already. In the wild, we see all major dependencies supporting Python 3 now. The situation is steadily improving. I think in 2017 we will start seeing projects dropping support for Python 2 altogether. The recent release of Python 3.6 cements that it’s the best version of Python yet and many library maintainers are eager to use it.
With the 2 vs. 3 problem out of the way, we can finally restart the conversation about what Python really is and where it should go. Historically, we’ve seen it being used despite its performance, which was always pretty limited by its being interpreted and by the Global Interpreter Lock. Big projects got done in Python despite its loose approach to type safety, encapsulation, and meta-programming so advanced it’s sometimes indistinguishable from magic. Clearly, there’s some other reason why it got so popular.
In my view, the killer feature of Python is the high level at which it enables you to program. Some people go as far as calling it “runnable pseudocode.” I think this is a unique advantage of Python and we should double down on it. There are some voices that say we should rather focus on the areas where Python is “lacking.” Most of the time this means “performance,” either better multicore CPU usage or more efficient bytecode. Sometimes it means “suitability for enterprise software,” which is really asking for easier ways to find bugs before hitting production. I say we should look at those issues by the lens of further empowering people to enjoy the most high-level language out there.
In this sense, I hope for Python to reach new levels of expressiveness. Specifically, for asyncio to grow to become the default choice for efficient single- and multi-core processing. And for type annotations to start a renaissance of static analysis tools for Python, enabling programmers to enjoy friendly syntax while providing increasingly powerful testing and validation.
What Is Your Take on the Current Market for Python Programmers?
I find the Python community very empathetic about diversity issues and I hope this will have a long-term positive impact in the workplace as well. I see the situation slowly becoming better in that regard. In terms of language popularity, looks like Python is only getting more popular, probably thanks to the new machine learning and AI frameworks.
Is there anything else you’d like to say?
Globally speaking, 2016 turned out to be a pretty nasty year. Let’s make sure 2017 turns out better!
Thanks for doing the interview!
Published at DZone with permission of Mike Driscoll, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.