Python is one of the most used languages in Paradigma along with Java and Node.js. For years, we have carried out successful projects developed in this language.
A few weeks ago, the main page of questions and answers on programming worldwide was published in the blog of StackOverflow, an interesting article reflecting on the incredible growth of the use of the Python programming language.
As a result of this article, which has had a great impact, we want to make a deeper analysis about the causes that have led Python to be one of the most used languages and what future perspectives are posed.
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 comic group Monty Python, of which Guido was a big fan. Since its inception, Python was born as a free software project and possibly part of its success to the decision to do open source.
Currently, the evolution of the Python language is managed by the Python Software Foundation, a non-profit society dedicated to spreading the language and supporting its evolution. Guido is still fully involved in the development and design decision making.
Python is licensed under PSFL, derived from BSD and compatible with GPL. Many companies and organizations, such as Google, Microsoft or Red Hat, make great use of Python and influence its evolution, but none exercise control over it. This differentiates Python from other languages.
Python has a series of characteristics that make it very special and that undoubtedly provide many advantages and are at the root of its widespread use.
Python is a multi-paradigm language, this means that it combines properties of different programming paradigms. It is mainly an object-oriented language, everything in Python is an object, but it also incorporates aspects of imperative, functional, procedural and reflexive programming.
One of the most remarkable characteristics 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 it is interpreted at runtime. In addition, it is dynamic typing, although optionally from version 3.5 we can make use of static typing.
Python is a cross-platform, that is, we can run it on different operating systems such as Windows or Linux simply by using the corresponding interpreter.
Some attribute Python to it, which is slower at runtime than other compiled languages such as Java or C / C ++. And it is true since it is 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 the development times, improving the maintainability and quality of the code. Python puts focus on this, making life easier for developers.”
The principles of language design 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 favor the simplicity of it are essential parts of the design of the language from the beginning. These ideas have helped a lot that the learning curve of Python is low compared to other languages.
Python as a scripting language
Traditionally Python has had a widespread use as a scripting tool, replacing scripts written in bash, other more limited script languages or tools such as AWK or sed. That’s why Python has always been a good partner with system administrators and operations teams.
Today, many of the leading tools for deployment and infrastructure management use or rely on Python. Some of the most prominent is 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 field in which Python has shone in recent years is 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 ecosystem of web development there are many alternatives and frameworks very mature and established 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 to develop web applications very fast. As his leitmotiv says is: “the framework for perfectionists with delivery dates”.
Big Data, Data Science, AI: the Python boom
However, apart from all the benefits, we have mentioned about language, in recent years something has happened that has revolutionized and radically 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 panorama.
And is that many of the new tools that have emerged, and that is 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, of tools for Data Science like Pandas, NumPy, Matplotlib or Jupyter. Natural language processing tools such as NLTK, and finally the machine learning area that is awakening so much interest with tools such as Tensorflow, MXNet or scikit-learn.
We can affirm 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, mainly, to the new technologies of Data Science and Machine Learning, where together with the language R is the king.
However, R is a 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.
Another very relevant index, the PYPL, based on the popularity of programming languages in Google, places Python as the second with a growth of 10% in the last 5 years.
Other rankings, such as the IEEE in mid-2017, also place Python at the top.
If we talk specifically about the data area, the comparisons are even more devastating. Recently, Kaggle, the platform for Machine Learning and Google’s Data Science, has conducted a study gathering information on the preferences of professionals in the sector.
A very significant fact is the answer to the question: What programming language would you recommend to new data scientists to learn first? More than 63% of respondents answered Python.
In summary, if you are a developer, engineer or data scientist it is a good time to learn Python and get involved in this community.