In honor of PyCon and all things Python, we sat down recently with Daniel Greenfield (aka @PyDanny) to discuss the importance of instrumenting Python applications.
How does Python compare to other languages like Ruby or PHP in terms of instrumenting performance?
Performance of programming languages is a tricky issue. Database access tends to be the big offender in slow performance, which is why caching systems like Memcached and Varnish exist. That said, cPython tends to be slightly faster than Ruby or PHP. And if you can get away with using PyPy instead of cPython, you can get performance in some cases rivaling C or Java.
Is it important to instrument and customize your Python apps?
Absolutely! When we launched our project, Consumer Notebook, the site was terribly slow. We manage to really enhance site performance by using tools like the django-debug-toolbar and New Relic to discover and address bottlenecks.
Do you have any tips to help developers to become better Python developers?
What I love about Python is that you can walk into a room of Python developers and everyone knows something you don’t. Try to learn from everyone, not just the visible community leaders. Look at everyone’s code and try to determine clear patterns. Take notes and put them in version control so you don’t lose them.
Do you have any recommendations for developers just starting out in Python?
My favorite book for Python beginners is Learn Python the Hard Way. Even if you’re already an experienced developer, work your way through all the chapters. It will be one of those fun challenges you’ll remember forever.
Go to conference sprints, join a project, and volunteer to do anything. If a project leader can’t get you started on something right away, go find another project.
What is your role in the Python community?
My official role is that like over 100 people, I’m a member of the Python Software Foundation. Which means I vote on new members and have a minor say in the direction of the Python community.
Unofficially, I co-lead the Open Comparison project which hosts sites like Django Packages, Pyramid Packages, and Plone Packages. We have hopes to launch an implementation for all of Python in the next few months.
Over the past few years I’ve taught a number of entry level Python and Django courses. And I’ve supported various advocacy efforts, including the PyLadies group that my fiancee, Audrey Roy, co-founded.
I’ve also given talks at a number of conferences. I try to participate in the various conference talk selection processes. This year I was unfortunately mostly absent from the PyCon evaluation effort. On the other hand, my startup, ConsumerNotebook, got into PyCon Startup Row.
Speaking of PyCon, this year, I’m leading the OAuth sprints. There are existing OAuth tools out there, but they could use some improvement. Specifically in the areas of code quality, documentation, discovery, and test coverage.
I also blog on a regular basis at http://pydanny.com.
Sign up here. It's free, so why not?