Python is one of the languages that we use the most in Paradigma along with Java and Node.js. For years, we have carried out successful projects developed in this language.
A few weeks ago, an interesting article was published on the Stackoverflow blog, the world’s leading programming question and answer page, reflecting on the incredible growth in the use of the Python programming language.
As a result of this article, which has had a great impact, we want to do a more in-depth analysis of the causes that have led Python to be one of the most used languages and what future perspectives are raised.
The origins of Python
The Python language emerged in the early 1990s and was initially developed by Guido Van Rossum, a Dutch engineer working at the time at the CWI in Amsterdam, the Dutch Computer Science Research Center.
Python emerged as a hobby for Guido and his name, Python, was taken from the British comedy group Monty Python, of which Guido was a huge fan. From the beginning, Python was born as a free software project and possibly owes part of its success to the decision to go open source.
Currently, the evolution of the Python language is managed by the Python Software Foundation, a non-profit society dedicated to spreading the word about the language and supporting its evolution. Guido remains fully involved in development and design decision making.
Python is licensed under the PSFL license, derived from BSD and GPL compliant. Many companies and organizations, such as Google, Microsoft or Red Hat, make great use of Python and influence its evolution, but none exerts control over it. This differentiates Python from other languages.
Python has a series of characteristics that make it very particular and that, without a doubt, provide it with many advantages and are at the root of its widespread use.
Python is a multiparadigm language, this means that it combines properties of different programming paradigms. It is primarily an object-oriented language, everything in Python is an object, but it also incorporates aspects of imperative, functional, procedural and reflective programming.
One of the most notable features of Python is that it is an interpreted language, this means that it is not compiled unlike other languages such as Java or C / C ++, but rather it is interpreted at runtime. In addition, it is dynamically typed, although optionally from version 3.5 we can use static typing.
Python is cross platform, that is, we can run it on different operating systems such as Windows or Linux simply by using the corresponding interpreter.
Some blame Python for being slower at runtime than other compiled languages such as Java or C / C ++. And it’s true, being an interpreted language, Python is slower.
However, this is not a big problem, the differences in speed are small and today the bottleneck in software development projects is not in the CPU.
Thanks to advances such as cloud computing, today we have great computing capacity at a very affordable cost. The challenge is to shorten development times, improving the maintainability and quality of the code. Python focuses on this, making life easier for developers.
The design principles of the language are guided by a series of aphorisms collected in the “Zen of Python”. In these principles we can see that the readability of the code and favoring its simplicity are essential parts of the language design from the beginning.
These ideas have helped a lot to keep Python’s learning curve low compared to other languages.
Python as a scripting language
Python has traditionally been widely used as a scripting tool, replacing scripts written in bash, other more limited scripting languages or tools such as AWK or sed. This is why Python has always been a good companion for sysadmins and operations teams.
Today, many of the leading infrastructure and deployment management tools use or are based on Python. Some of the most prominent are Ansible, Salt or Fabric.
Another area in which Python is a pioneer is in the world of scraping and crawling, where we can extract information from web pages thanks to scraping techniques. Python tools such as Scrapy are widely used in this context.
Python in web development
Another of the fields in which Python has shone in recent years is in the development of web applications, mainly thanks to very powerful web development frameworks such as Django, a complete framework or Flask, a microframework.
However, in the web development ecosystem there are many very mature and established alternatives and frameworks such as Symfony for PHP, Spring for Java, Grails for Groovy or Rails for Ruby. All these frameworks are continually taking ideas from each other, immersed in offering the best alternatives for developers.
In this case, the advantage provided by Django, the main framework for web development in Python, is to offer a complete and quality framework for developing web applications very quickly. As its leitmotif says it is: “the framework for perfectionists with deadlines.”
Big Data, Data Science, AI: the Python boom
However, apart from all the benefits that we have discussed about the language, in recent years something has happened that has radically revolutionized and extended the use of Python.
The generalization of Big Data in recent years, followed by the explosion of Artificial Intelligence, Machine Learning, Deep Learning and the emergence of data science or data science as a new area of work with its own specialists, has revolutionized the landscape.
And it is that many of the new tools that have emerged, and that are exploited by data engineers and data scientists, have been developed in Python or offer us Python as the preferred way to interact with them.
We can talk about technology for Big Data like PySpark, about tools for Data Science like Pandas, NumPy, Matplotlib or Jupyter. Natural language processing tools such as NLTK, and finally the area of machine learning that is arousing so much interest with tools such as Tensorflow, MXNet or scikit-learn.
We can say that Python is a mature language, with a large base of developers, documentation and projects in production.
The growth in the use of language is being spectacular thanks, fundamentally, to the new technologies of Data Science and Machine Learning, where together with the language R is king.
However, R is one more niche language that comes from the world of statistics. Python, on the other hand, is a general-purpose language and its use is much more widespread.
In the following graph we see a projection for the next years of Stackoverflow on the number of visits it expects to receive based on the main programming languages.