This week we welcome Dan Bader (@dbader_org) as our PyDev of the Week. Dan does a weekly Python Tricks newsletter / blog that’s a fun read. He has also authored a Python Tricks book. I always like checking out my interviewee’s Github page to see what they enjoy coding or writing about, so I encourage you to check that out as well. Let’s take a few moments to learn more about Dan!
Can you tell us a little about yourself (hobbies, education, etc):
Hey everyone My name is Dan Bader and I’m a complete Python nut. I’ve been obsessed with programming ever since I managed to convince my parents to buy me a dusty old Commodore 64 from the classifieds in a local newspaper. And my love for writing code hasn’t diminished since then.
Eventually I got a bachelor’s and a master’s degree in Computer Science. I worked in full-time positions for a few years and today I’m an independent software developer and consultant.
I was born and grew up in Germany but then later moved to Canada. I love both countries€”and fortunately I mostly work remotely these days so I get to visit each one a fair bit. I’m glad I found a partner who’s willing to put up with these antics
In terms of hobbies I like working out at the gym, cooking vegetarian food (buying my first proper cast-iron wok in Vancouver’s chinatown changed my life, haha), and going on hikes. I also read a lot. In general I found what makes me the happiest is building stuff. So I try and optimize for that. Every now and then I play some guitar to relax.
Why did you start using Python?
I believe that “code is communication.” A good programmer can express his or her ideas so that a machine can execute them. But a great programmer can structure his thoughts so neatly that machines AND humans have no trouble following them.
Sure, sometimes it’s nice to write super terse code to impress your friends and colleagues. But what I find the most motivating about building software is simplifying a complex process and breaking it down so that a machine can execute it€”and at the same time balancing that with the need to have a maintainable piece of software that other programmers can improve and modify in the future.
I found that my philosophy aligns well with Python as a language and also its amazing community. There’s less of a “cowboy/cowgirl coder” attitude and more of a pragmatic desire to get things done and to do them well at the same time. I love that.
I’d dabbled in Python throughout my whole CS education. I think the first time I learned about it was when a friend of mine had brought a little “Learn Python in X days” (or something like that) booklet to a ski trip. I immediately fell in love with the clear syntax that basically looked like executable pseudo code. The more I learned about Python and its creators the more I appreciated it. I have a lot of respect for its pragmatic and simple design.
The first “serious” project I wrote in Python was the data crunching pipeline I needed for my bachelor’s thesis. And it worked so well and was such an enjoyable experience that I started using Python for other “serious” projects as well. From that point on I tried to find ways to use Python everywhere I could.
What other programming languages do you know and which is your favorite?
Well, I got started with BASIC on my trusty Commodore 64 and then dabbled in other languages (C and Pascal) once I got my first PC.
But I couldn’t really wrap my head around C at first, so I spent a lot of time in QBasic for DOS. For some reason I was always really interested in assembly level languages, I really wanted to see what was going on behind the curtain (imagine how mind blown I felt when I later learned about CPU micro code…). And learning x86 assembly and writing a few programs in it made all of the C stuff like pointers and memory management “click.” C is basically a macro assembler with an odd syntax
Eventually I discovered Delphi, which was (or still is?) sort of a combination of an OOP version of Pascal with an excellent GUI framework and a graphical editor. I wrote tons of software with that, like little games and utilities.
Delphi was simply amazing. I remember having to save up enough money so I could mail order the “full version” of the Delphi compiler and IDE€¦
Delphi’s standard library and its GUI framework taught me a lot about designing good APIs. Compared to the Win32 and MFC stuff that Microsoft was putting out at the time Delphi’s approach just seemed so much more beautiful. I loved working with Delphi.
Then after that I had a phase where I was obsessed with writing game engines. There was just something fascinating about how these game engines were almost little operating systems, with their own memory management, filesystem abstractions, and even little multi-threaded scripting runtimes.
Around that time I had access to the internet for the first time and I discovered that some of the Quake 1 source code was already open-source at the time.
You could download the source code for Quake’s scripting language compiler and the game logic from id Software’s FTP server. I ate that stuff up. Initially I had no idea what was going on, but I couldn’t put this code down. I printed it out and carried it around with me and scribbled down notes… I learned so much from reading John Carmack’s code. He’s one of my heroes, I’d love to shake his hand one day and thank him for the impact he had on me as a coder.
So anyway, I was writing these little OpenGL renderers, scripting systems, and networking code and I just went deeper and deeper down these rabbit holes€”without actually producing a playable game.
At some point I had built almost this “Game SDK” with my own VM-based scripting language and hot-reloading for code changes and a graphical map editor€”but there was practically no progress on the game I wanted to build (and that I had promised to my friends).
This experience taught me a lot about pragmatic design and program architecture. I got so tangled up in this mess (even though it was fun) that I made no actual progress on the things I said I was going to build. I’m sure most developers are familiar with this effect
Now to reel it all the way back in to Python:
Of course Python is my favorite programming language! I still remember when I thought about Python in those terms for the first time:
I was asked to re-write a terribly convoluted mess of a Java web application that was the API back-end for a mobile app. I rebuilt the whole thing in Python with Flask and SQLAlchemy. It took me about a month to do it and I used a test-first development style for everything.
The whole experience was just so enjoyable and felt so “right” I couldn’t believe it at first. Since those days my love for Python never faded
What projects are you working on now?
I love Python and programming in general. I want to inspire as many developers as possible to become better engineers and to grow their skills.
For me programming is a passion. And I know how hard it is to find people who feel the same, especially when you’re growing up out in the boonies. So I try to be a “force for good” in that space.
Pretty much every tech job I ever had in my life had some teaching element to it. For example, I tutored a few programming classes and even got to give a series of introductory lectures during my university days.
Or I would give presentations and do Q&A’s with the engineering team at companies I worked for. At the last company I worked at I started this weekly thing called “Clean Code Friday”. Eventually I also started to manage other developers as a lead dev and did weekly 1-on-1s with them.
And I always found that part of the job incredibly rewarding. I really enjoyed it.
When I started doing more and more remote work this teaching aspect suddenly disappeared. And it didn’t feel right…
So to bring it back, I gradually built up these outlets like my website, my weekly Python newsletter, my YouTube channel, and my Twitter account where I talk about how you can become a better Python developer.
And it’s been so much fun!
It’s just awesome how much you can scale your impact that way… If you can help 10 developers to become 10% better at what they do that already has a HUGE impact.
And this scales linearly: It’s much harder to train yourself to become 100-times better at development. But helping 10,000 developers to become 1% better at what they do? That’s totally possible with the power of the internet and the reach you can have through articles and videos.
To me that’s just awesome… So if I can move into a direction where I can make a living helping developers over the internet, that’s my ultimate goal.
Right now I’m working on a new book called Python Tricks: It’s a buffet of Awesome Python Features. If you’ve been learning Python for a while but you still catch yourself thinking I don’t even feel like I’ve scratched the surface of what I can do with Python then you should check it out.
A slightly “crazier” side-project is this brand for Python developer swag that my wife and I just launched: Nerdlettering.com: Mugs & Accessories for Python Developers
Which Python libraries are your favorite (core or 3rd party)?
I love the collections module in the Python standard library. The more experience I gained programming the more I realized that often the most important thing is picking the right structure for your data. Once you’ve expressed a problem with the right data structure the solution often flows from it naturally. It always feels great to do a big refactor that swaps out some complicated mess that’s grown over time for a clear data structure.
My favorite third-party libraries are pdb++ (an improved pdb) and bpython (an alternative Python REPL). I guess they’re more development tools than something you’d use as a dependency in your own programs. But because they’re such great tools I get to use them on pretty much all projects I work on, so I get a lot of value out of them.
I really like what Kenneth Reitz is doing with his projects like requests or clint. I know some people think the “XYZ for humans” thing has been overdone at this point, but Kenneth’s stuff and the way he designs his APIs is a great inspiration for me to this day. I like libraries that have been built with the user in mind and helping them achieve their goals.
Where do you see Python going as a programming language?
We’ll all be writing Python 3
Typing hints will play a big role and open up niches where Python previously wasn’t the best choice, for example by enabling performance optimizations and making large-scale programs easier to maintain (e.g tool-assisted refactoring)
I’m convinced that Python will expand its foothold in the scientific community. I mean who wouldn’t want to trade a bunch of R code for nice and clean Python?
When I grew up in Germany as a kid there was this craze about “desks that can grow with you.” Like, you’d buy your kid an adjustable desk and then they’d be able to use it throughout their whole education career.
Python is a great “adjustable desk” language.
With the small but important difference that Python is also a much prettier desk. One that you wouldn’t be embarrassed of using past elementary school, and one that you’d be okay with showing to your girlfriend/boyfriend.
(Okay, let’s just stop with the desk analogy here.)
Basically, I really like Michael Kennedy’s idea that Python is a “full spectrum” language. It’s easy to get started with it but it’s not going to prevent you from growing as a developer and getting some really impressive real-world work done with it.
What is your take on the current market for Python programmers?
I think today is a fantastic time to be a Python developer. According to search engine trends Python is the 2nd most popular programming language in the world right now. That’s powerful.
The job perspectives for Python developers are really solid. I’m getting contacted with interviewing opportunities multiple times per week. From talking to hiring managers I believe there’s a huge demand for “intermediate” Python devs with 2-5 years of experience. Companies are desperate for these folks.
Actually€”and this is a bit of a shameless plug€”I teamed up with another blogger, Elena Ruchko, a short while ago to write an article to answer the question “Is Python worth learning?”
I’d gotten some questions from developers who said “Look, I really love Python but can I expect to make a career out of it? What’s the market for Python right now?” and the article was a way to give some insight into that.
So if you’re looking for some more detail, the article goes into salary data and job trends to gauge the market demand for Python developers. You can find it here: Why Learn Python? Here Are 8 Data-Driven Reasons
We also included interviews with industry experts so I think it gives a quite comprehensive overview for someone who’s interested in digging deeper.
Is there anything else you’d like to say?
First of all, kudos to you, dear reader, if you made it all the way down here
And then also, thank you Mike for inviting me to be a part of this! It’s great what you’re doing for the Python community. I really like the “conversational” teaching style you use in your books. To me that’s much more engaging than handing someone a dry technical reference. It’s something I try to emulate in my own writing.
Oh, and one more random thing: I believe every developer should read Bob Martin’s book “Clean Code” at some point. Seriously, get it now if you haven’t read it. It’s a book I’ve been recommending for years.
Thank so much for doing the interview!
2 thoughts on “PyDev of the Week: Dan Bader”
I enjoyed reading this interview. I follow both of you guys online and appreciate what you’re doing for the Python community.
Thanks for your kind words
Comments are closed.