This week we welcome Giampaolo Rodola’ (@grodola) as our PyDev of the Week! Giampaolo is the creator and maintainer of the psutil project as well as the pyftpdlib and pysendfile packages. He is also been a core developer and maintainer of ftplib, asyncore and asynchat stdlib modules. You can check out some of his work over on Github or check out his blog! Let’s take some time to get to know our fellow Pythonista better!
Can you tell us a little about yourself (hobbies, education, etc):
I am a Python freelancer working remotely. I am Italian and I am currently based in Prague. My main hobby is programming and I also enjoy playing guitar, singing and astronomy. I also enjoy traveling and have been semi-nomadic for the last 3.5 years. As such I may also work and travel at the same time, although if I get a long gig I prefer to stay in Prague. I have no formal IT education. I learned programming because it was fun and I ended up paying the rent with it by accident.
Why did you start using Python?
Initially (early 2000s) I was fascinated by hacking and the underground hacking scene. I remember I used to read lots of articles and hacking e-zines. I was particularly interested in networking and was fascinated by vulnerabilities which could be exploited via the network. I had a huge limit though: I didn’t know any programming language, and those articles often contained code samples and exploits which were written in C. I was stuck, so I decided I would learn C. I started reading a tutorial but I got discouraged pretty soon because I just couldn’t wrap my head around the language (pointers in particular). I didn’t give up and started looking for an easier language to learn and I eventually ended up on a Python tutorial (I don’t remember how exactly). Contrarily to C I found Python easy to learn and extremely fun to play with. I wasn’t really sure what I was doing but I focused my efforts around (RAW) sockets and libpcap, because that was what I needed to realize my idea (a backdoor). After a couple of months I released my first hack-related tool: a remote shell using ICMP instead of TCP. Shortly after I came up with a second tool, a port knocker, which is basically a sniffer which listens for combinations of packets in order to open ports on a firewall. Funnily, shortly after the release of these two hack toys, I gradually started losing interest for hacking but I still liked networking and sockets, so I decided I would write a server, I didn’t care which one. I started reading RFC-959, the FTP protocol spec, I kind of liked it, so I ended up writing my first network server! Initially it was a command line tool and it was using threads for concurrency, I later rewrote it from scratch by using an event-driven approach and ended up being a library intended for other developers: pyftpdlib. That was my first “official” open source project including a VCS, a bug tracker and (some time later) an actual user base.
What other programming languages do you know and which is your favorite?
I know C, mainly because I had to learn it for psutil, but I’m not particularly good at it nor I particularly like it. 🙂
What projects are you working on now?
The only project I’m actively working on right now is psutil. Other ones I work on from time to time are pyftpdlib, pysendfile and confix. I also contribute some patches to python-dev every now and then or propose something on python-ideas when I’m particularly inspired.
Which Python libraries are your favorite (core or 3rd party)?
How did you get started with the psutil project?
I think it happened when pyftpdlib started getting a user base and I received my first job offer for it. With pyftpdlib I learned tons of things about networking, asynchronous programming and API design. I even became the maintainer of ftplib, asyncore and asynchat stdlib modules because the whole FTP server was centered around them and they were poorly maintained. But above all I learned that I enjoyed taking care of an open source project: writing doc for it, make it evolve release after release, respond to bug reports and feature requests, interact with users, etc. It was good and I wanted more of that.
Do you have any advice for new developers that would like to join an open source project?
For me having an idea and an actual project to work on was vital after I learned the basics of the language because I needed a *goal*. Actually I first came up with an idea (write a hack-related network tool) and then I learned the language. I think that is very important because you risk to invest a lot of time into acquiring a knowledge which you may end up not using if you don’t know what to do with it. The real joy of programming derives from problem solving, so it is vital to have a real problem to solve. And if you don’t have it just find one, and do it quickly, because the risk of losing interest is a real possibility, especially at first, even though you spent 2-3 months reading a tutorial in your spare time. This is exactly what I did when I started the pyftpdlib and psutil projects. I didn’t write a FTP server because I needed one. I didn’t really care about monitoring systems or system programming with psutil. I am *not* a user of my projects. I was just looking for a problem – any problem – to solve, possibly in my area of interest (networking), because I genuinely enjoyed writing code. I was looking for an excuse to start coding and keep coding. Secondly, if you plan to make a living out of programming (I wasn’t), bear in mind that your open source project doesn’t really bring you money but it may become your resume. That was especially important for me because I have no formal IT education, no official piece of paper which demonstrates what I can do. I just have my passion for programming and my open source projects. That is one of the most practical payoffs of open source in the long term (for me at least): getting recognition from your (public) work and (possibly) find good gigs with it. That is basically what I say to my friends who don’t understand why the heck I do all this for free. It’s a hobby which incidentally also happen to be a potential long term investment. 🙂
Thanks for doing the interview!