PyDev of the Week: Mariano Anaya

This week we welcome Mariano Anaya (@rmarianoa) as our PyDev of the Week. Mariano is the author of Clean Code in Python and has been a speaker at EuroPython. You can see what he’s been working on over on Github or you can check out his website.

Let’s spend a few moments getting to know Mariano better!

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

My name is Mariano Anaya, and I’m a software engineer. I grew up in Buenos Aires, Argentina, but moved to Barcelona, Spain in 2016.

I went to college to study Information Systems Engineering, and I graduated in 2010. Shortly thereafter, I started a post-degree specialization in software engineering, which I finished in 2013.

When I’m not writing software, I really enjoy outdoor activities, such as hiking with friends, running, and cycling. I also enjoy going to the gym, and reading.

Why did you start using Python?

When I was in college, I was lucky enough to meet really smart and interesting people. We were working on a project for a subject, that entailed creating a large application for a distributed operating system, in C. It was a lot of code, and a friend in the group was toying with the idea of how much simpler things would be if we were coding in Python rather than C. At first, I didn’t pay much attention to the comment, but by the end of the semester (after we’ve successfully delivered the project), he sent us an email, demonstrating how the shell for the same application would look like in Python. When I looked at the code I couldn’t believe how much simpler it was, so I decided to try it for myself.

That experience taught me how powerful Python is so that very same week (this was by the end of 2007), I decided to start learning Python. From that on, I always tried to use Python on every opportunity, because I discovered a powerful language that abstracts away unnecessary complexity, and lets you focus on the problem at hand.

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

I also know C, JavaScript, I really like bash scripting, and I’ve briefly used some Java before. Nowadays, I’m using Kotlin daily, so that’s another language I’m becoming more proficient in.

I suppose Python still remains as my favorite language (and also my strong suit), but that depends on how the experience with Kotlin continues to be.

What projects are you working on now?

I’m focused on my day job. On 2019, and 2020 I did some contributions to gRPC to better support asynchronous Python, so refloating that, is something that could be part of my backlog, and though I have other projects I’d like to start (mostly to experiment with new technologies), I still don’t have anything in concrete, but I look forward to contributing to CPython as well as other open-source libraries.

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

From the standard library, itertools is by far my favorite module. I also like functools. As per 3rd party, I like the black project, and is what I use to format all my code (I’ve even configured my editor to use black). Moreover, I think it’s something the Python ecosystem needs, so I’m glad that the project is becoming increasingly popular.

In addition, I think pytest is awesome, because of how powerful it is, and the productivity it gives me for writing tests.

How did you end up writing a book about Python?

Back in 2016, I gave my first talk at a conference, in EuroPython. My talk was titled ‘ Clean Code in Python’, and I liked how it turned out to be, but more importantly, people liked it. Quite sometime after it, a publisher contacted me saying that he’d seen the talk and was interested in having me write a book about the topic, so that’s how I ended up writing a book with the same title.

What have you learned as an author?

The first thing I’ve learned was that I love writing. It’s been a great learning experience, and I enjoyed the journey a lot. This motivates me to keep writing and publishing more.

I also gained more experience in planning and executing a long-term project, and leading an initiative from beginning to end. Writing a book is a challenging, and even scary goal, but as a result of rising up to the challenge, you grow a lot, so in the end, it’s worth it.

Last but not least, becoming an author helped me change the perspective of the content I’m making. I shifted my perspective to ask myself things like “How would a reader perceive this?” or “How clear am I making myself with this explanation?” It’s important to keep a coherent narrative, and to unravel the themes with a smooth transition among them, so that someone who’s completely new to the topics, can enjoy them.

Is there anything else you’d like to say?

Thanks for the interview and I wish everybody a good year ahead!

Thanks for doing the interview, Mariano!