Sunday, March 1, 2020

Mike Driscoll: PyDev of the Week: Doug Farrell

This week we welcome Doug Farrell (@writeson) as our PyDev of the Week! Doug is working on Python book entitled The Well-Grounded Python Developer for Manning. He is also a contributor for Real Python. You can find out more about Doug on his website. Now let’s spend some time learning more about Doug!

Doug Farrell

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

I’m a developer with a lot of other interests and have a varied background. After a couple passes through college, I graduated with an AS degree in commercial art in 1980, and a BS in Physics in 1983. Two clearly related fields. Part of why I graduated so late was having spent five years working at a bronze sculpture foundry. As fun as that was, it took me a while to realize the physical toll of working there wasn’t sustainable, and I went back to school. I guess I’m a slow learner.

During my last year of school, I bought a Tandy Color Computer and learned basic and a little 6809 assembler, and the programming hook was set in me. I’ve worked as a software developer in quite a few industries; process control, embedded systems, retail CDRom software, Internet reference titles, and web applications for production systems. I’ve also worked in several languages during that time; Pascal, Fortran, C/C++, Visual Basic, PHP, Python, and JavaScript.

My wife and are bicyclists and have ridden quite a few organized century rides. We’ve shortened our distances and ride more for enjoyment and fitness now, and of course, competing with each other. I also have gotten back into artistic pursuits and have started painting. This is challenging for me as I never did any creative painting work, or in a larger format. I know I tend to be a realist, but I’m trying to get more expressive fooling around with abstraction.

Susan and I have one daughter and son-in-law, and one grandson who just turned 3 and is fantastic!

Why did you start using Python?

In 2000 I changed jobs to join a school and library publisher putting some of their encyclopedia’s online. Before this, I’d been a long time Windows developer, and now was jumping into a Sun/Unix world. At the time, they were developing their web applications using C/C++ as CGI programs. Offline tasks and processing work was beginning to be done with Perl. I was horrified by the Perl syntax and was fortunate enough to find Python. Python appealed to me immediately because of its clean syntax, “one obvious way to do things” philosophy, and in particular, its native support for Object-Oriented Programming. I was firmly in the OOP camp from working with C++ for a few years.

In 2006 I was fortunate enough to join a company where I could program exclusively in Python and have stayed with it as my favorite language ever since.

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

As mentioned before, I’ve worked in several different languages over the years, Assembler (6809), Pascal, Fortran, C/C++, VB, PHP, Python, and JavaScript. Though I was a “speed freak” working with C for embedded systems and loved that very close to the hardware kind of work, I don’t really want to go back to doing that. Python is my current favorite language, and language of choice for most, if not all, my projects. I also like JavaScript/TypeScript because I like to work on both the front and backend of applications. I enjoy that interface between Python and JavaScript, and in many ways, find lots of parallels between them.

What projects are you working on now?

The book project is pretty much taking up most of my free time, but I do have a few other projects I was working on and want to get back to. Ages ago, I wrote a Python Twisted based logging server that would allow multiple applications across multiple machines log to a single file. This was very handy to see the chronological logging activity of an entire system in one place. I want to rebuild that to use Python asyncio with a WebSocket interface to an Angular web application to display a live/searchable view of the logs in the system.

There is a STEM place near me called Robotics & Beyond, where I’ve taught Python programming a few times. The material I wrote for the classes is also used by the teenage mentors to teach the course as well. This is fun, as kids are fun and challenging to present to!

I also want to/need to rebuild my personal website as it’s out of date. Since I sort of use that to “show off”, it’s shameful the state it’s in!! Here’s a link to my website.

As a complete geek, I have a Lego EV3 Mindstorms system. Now that Lego has released MicroPython for it, I want to get into that as I really like controlling hardware devices with code. This might also lead to trying to do some contracting (possibly) using MicroPython rather than PLC’s or custom C.

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

Some of my answers are obvious. I like and use the requests library quite a bit. I use the Flask web framework for the web applications I build because of it’s “add it as you need it” approach to what it provides. This also means I use SqlAlchemy quite a bit for database work because I’d instead work with Python objects than rows of raw data. I’m not much of a database wonk, so the abstraction SqlAlchemy provides appeals to me. Because I like to build rich web applications, I create quite a few REST API’s as part of my Flask work. For this I use two libraries. The Connexion library is a great way to generate these API’s. It’s configuration file approach to defining the API, what it accepts, and the path to how it’s handled really appeals to me. And the automatic Swagger interface to the API is a huge bonus! In conjunction, I use Marshmallow to serialize the data back and forth between SqlAlchemy and Connexion.

You are a contributor to Real Python. Can you tell us how that came about?

I got into giving presentations at the engineering all-hands at my place of work. This was fun because where I work is a heterogeneous tech stack, and I’m part of the mission to promote and convert people to Python. I turned some of my presentations into articles for Dan on dbader.org, and have written for RealPython since he acquired the site.

You can find the articles I’ve written there by going to realpython.com and searching for “farrell”.

How did you end up writing a book on Python?

It was the articles at RealPython that attracted the attention of one of the Manning Publishing acquisition editors. We talked quite a bit about the kinds of things we’d like to do/see, and eventually I wrote a book proposal they were interested in. I’m currently writing “The Well-Grounded Python Developer” for them, which has been a fun, interesting, and sometimes nerve-wracking project.

Here’s a link to the book.

What have you learned as an author?

Writing is wonderfully improved if approached as a collaborative process, the work benefits a great deal from the input of others. The editors at RealPython have helped me improve my writing quite a bit. I also find writing to have certain aspects in common with programming. It’s like optimization, the process could go on nearly forever, but eventually you have to call it “Done!” and walk away. Shipping is a feature!

My Dad, who was a great writer, taught me the beauty of a simple, declarative sentence.

I’ve also learned that editing and read-throughs are essential and never fall in love with a sentence. Cutting is important.

Is there anything else you’d like to say?

I’ve been working from home for the last two years, and while I don’t miss the commute at all, being able to interact with my colleagues and peers directly is something I do miss. Being part of the RealPython community has been great because I’ve broadened my circle of peers to include people who work in all kinds of different domains. Besides helping me to stay sharp, it’s exposed me to all sorts of different thoughts about how to solve problems.

Thanks so much for doing the interview, Doug!

The post PyDev of the Week: Doug Farrell appeared first on The Mouse Vs. The Python.



from Planet Python
via read more

No comments:

Post a Comment

TestDriven.io: Working with Static and Media Files in Django

This article looks at how to work with static and media files in a Django project, locally and in production. from Planet Python via read...