Contact Us
Python BlogDjango BlogBig DataSearch for Kubernetes AWS BlogCloud Services



4 Reasons to go with Python over ${language}

October 28, 2020

“Use the right tool for the job” is a golden rule of engineering. Working on software, however, there are often dozens of different languages that can get the job done. How can you know which one constitutes the right tool for the job? Some programming languages are designed with one use in mind, but most try to be general purpose. One language that stands out for being general purpose and yet often out-performing languages custom built for the task is Python

In this post we’ll look at some of the reasons to choose Python whenever it's in competition with any other language for the "right tool for the job” status.

1. "Python is the second-best language for everything"

This was actually a quote from Dan Callahan, speaking at PyCon 2018. If it's the second-best language, why not use the first-best language? Simple — because then you’d have to learn a whole new language. Unless the gulf from second to first best is significant enough – if the custom “made for the task” language provides indispensable features and performance improvements – it simply does not pay to learn a new language when Python more than suffices.

When you work on a truly diverse set of problems, it helps to have a complete mastery of a language versatile enough to tackle any and all of them. For me, that language is Python.

2. Batteries Included

You can go a long way writing Python before you have to download some external dependencies to make your code do something useful. Node.js and JavaScript are an example of the opposite — if you need to do anything there, you are npm install 'ing something and now you are down a road of tracking those dependencies and dealing with when they break. Not so with Python. The Python Standard Library is expansive and robust enough to tackle most problems.

Here is an amazing example of "batteries included" at work in the wild. One of my favorite conference speakers, David Beazley, got a gig doing eDiscovery for a legal case. He had to sit in a secure room and process 1.5 TB worth of source code looking for certain patterns. All he had to do it with was a computer with a fresh OS install, and no Internet connection. He had no way of bringing in additional programs or downloading any libraries, but the computer happened to have Python installed. So, he wrote his own set of tools on the spot to aid in sealing the deal on that case.

You're not likely to find yourself in quite the same extreme circumstance, but you will still benefit from minimizing dependency management and building more robust applications.