Innovations like Microsoft Excel are so embedded in our society nowadays that we forget that there was a time when they didn’t exist.
Without ‘spreadsheets’ how did people and businesses manage any task that revolved around data calculations?
Well, it was pen, paper, and a good, old-fashioned calculator of course! Python is an increasingly-popular, general purpose coding language that for the purposes of analytics and data synthesis, may become the next Excel.
While the spreadsheet is extraordinarily utilitarian for all sorts of advanced calculations and analysis – especially with macros and other add-ons – it is primitive when compared to the innovations coming out on the back of Python.
These innovations are not necessarily a part of the code itself, they are derived from the way the code was designed. As we have seen with many code-based platforms that have a strong open-source development community, new command-line applications are being built on Python that give users and their entities superior processing, analytical, and scalability for an array of applications.
What is a command-line application?
Well one example is OpenBB – originally designed as the ‘Gamestonk Terminal’ that germinated from the r/wallstreetbets hysteria – that bills itself as an open-source Bloomberg terminal.
As you can see, this isn’t your average piece of software. In fact, it loads in Terminal and requires basic commands such as ‘stocks’ or ‘crypto’ to initiate analysis. But if a Bloomberg Terminal – which offers advanced, high-value data analysis and research capabilities to investment firms worldwide – costs $24,000 USD as a starting point; then we can see how these types of oper-source ‘applications’ built on Python become intriguing to say the least.
In this edition of ‘New Tech,’ we dig deeper into Python.
What Is Python?
The conception of Python occurred in the late 1980’s via Dutch computer scientist Guido van Rossum. The name ‘Python’ was inspired by Guido’s desire to create something edgy, and so the name was inspired by the popular comedy series ‘Monty Python’s Flying Circus.’
Python is known as a very clean programming language. Its designed so that the code can be read by developers and amateur ‘Pythonistas’ alike as cleanly and simply as possible. In the world of code, this is saying a lot.
It was originally invented as a cleaner alternative to a programming language known as ABC. The guiding principles for the design of Python can be succinctly summarized by aphorisms such as “Beautiful is better than ugly” and “Simple is better than complicated.”
Python – The History
In 1989, inventor Guido van Rossum was working on an application in the computer language C, when he came to the realization that his efforts would be better spent developing his own language to cut out some of the complexity.
He had an idea of a scripting language that would be somewhere between C and a shell script: interpreted, but much more easily programmable and readable than shell scripts.Exyte
The initial version of the code was launched in 1991. In 1994, Version 1.0 was released (we are currently in Python 3,). Other languages such as Ruby and Pearl were also being launched around this time as the need for dynamic, multi-purpose coding languages started to become apparent.
In February 1991, Van Rossum published the source code of Python’s interpreter to alt.sources, a Usenet group for open-source code.Exyte
The decision to release the code initially into an open-source community is very similar to what we have seen with innovations like Bitcoin – released by the anonymous Satoshi Nakomoto to the cypherpunk community in 2008 – but this was not a common strategy in the early ’90s, when the Internet was barely a thing.
Guido has said that open-sourcing Python was one of the things that significantly helped it succeed at that time.Exyte
Python 2.0 was launched in 2000 with several ‘upgrades’ to the language, which would set it on a path to becoming as popular as it is today. Python grew steadily in the 2000s, but was not one of the most popular coding languages.
Starting from 2000, core developers started thinking about Python 3.0. They wanted to streamline the language, cutting unnecessary language constructs and functions that Python had accrued in its almost 20 years of existence. As the Zen of Python says: “There should be one—and preferably only one—obvious way to do it.”Exyte
Python 3.0 was launched in December, 2008 as a somewhat new language compared to Python 2.0, as the core developers sought to eliminate a lot of the complexity of the release with the language. This release came with some problems for applications that were dependent on 3rd party Python libraries, as the code was not backwards compatible; despite a somewhat choppy release, the birth of Python 3.0 paved the way for cleaner level of code and a new era of applications.
In the 2010s it started to explode in popularity as the field of ‘machine learning’ entered the mainstream lexicon of computing.
In the current decade, interest in Python remains extremely high, both for software developers and business analysts who use some of Python’s advanced analytical and data visualization capabilities to open up new capabilities in their respective fields.
Python- The Innovation
There are several deep innovations around Python, but the majority revolve around libraries and the Jupyter Notebook. While two different things, one is somewhat dependent on the other.
As mentioned above, Python is in many ways an open-source innovation, despite being pioneered by Guido van Rossum in the ’80s and ’90s. ‘Libraries’ are open-source versions of the code that are frequently published to GitHub or other equivalents.
In the example, you see below, if you were interested in libraries related to machine learning, for example, then you would probably install/learn about TensorFlow.
There are different software packages that are considered essential for coding/learning Python. Anaconda is one such example, and as part of the Anaconda install comes a Jupyter Notebook. Jupyter Notebooks are a ‘web app’ of sorts that enables sharing and creation of documents such as ‘.ipynb’ files for Python.
This means that when one installs a library, or downloads another person’s Jupyter Notebook, they can take that code into production right away in their own way. This is where the real community-driven innovation comes into play.
Essentially, there are some libraries that are so professionalized and polished for Python that they have become the de-facto standards. There are other libraries – and indexes of libraries – where talented developers and quants alike post their code onto open-source sites that anyone can download them onto.
Jupyter Notebook is the standard software to be able to access such code; furthermore, anyone can run their own libraries on a Jupyter Notebook with a simple line of code or two.
Seaborn – for example – is a data visualization library to create amazing charts and other sorts of data visuals.
In the example from the Jupyter Notebook above, one can see seaborn, yfinance, numpy, and matplotlib were ‘imported.’ Generally, the process to install these libraries revolves around a ‘pip’ command (ie. pip install yfinance) and then the ‘import‘ function calls it into the Jupyter Notebook where each library has its own commands.
In combo, for example, with a library called Plotly, one could learn to create their own stock chart as an exercise.
In isolation, such examples may seem trivial – after all, there are 1000s of apps to plot out a stock chart. But in combination, these libraries can be used by literally anyone (usually for free) to create almost anything. Here are a few such applications:
- Reducing complexity – libraries like Seaborn enable data visualization in an unprecedented manner and simplify complex data/topics into visuals. In areas like science, healthcare, finance, and others, this can help educate people and share pertinent stats/information
- Automation – through connections into mainstream apps via API, Python can be used to automate trivial business, productivity, and other tasks. This isn’t automation of work by robots, this is automation of tasks that enable business owners/entrepreneurs to scale-up their own productivity with a few ‘hacks’
- Advanced applications in machine learning and AI (Artificial Intelligence) – this is obviously the most notable and popular area of Python. Everything around Data Science requires advanced knowledge of mathematics, statistics, coding, and some domain expertise relative to the application. The upside for everyday professionals and/or interested observers is a lot of these advanced Data Science applications get loaded back onto GitHub as an open-source library that really anyone can start playing around with
The upshot is that individuals don’t need to learn to code each dimension themselves, they need to learn the basics of Python (a rigorous and challenging endeavour) and how to enable specific libraries. At that point, the work is done for them relative to the specific library.
And that is why the real innovation in Python is the libraries and through the early stages of mainstreaming the Jupyter Notebooks.
Python – The Technology
Python is meant to be a ‘clean’ language relative to other coding languages, but that doesn’t mean it isn’t complex to learn in the first place. The difference is that when you see the code you can interpret it (on the balance) in a much easier way than a lot of other code.
Python is literally like a language; except instead of learning nouns, verbs, adjectives, etc. one will learn lists, dictionaries, functions, and methods.
The Python Software Foundation (PSF) oversees the ongoing development/maintenance of the core code, along with frequent releases of new features and/or bug fixes. It is a non-profit and Python itself is open-source, meaning that nobody “owns” the whole code.
There may be specific nuances/legalities in regards to who owns the rights to a library, or a certain element of the code, but in general nobody pays to download and start learning/writing Python.
In terms of how Python compares to other languages, there are certainly some criticisms at the technological level:
- it may be slower compared to some other languages and consumes a lot of memory
- it may not be ideal for the creation for certain types of applications
- the model of Python executing the code means that a lot of errors will only show up in runtime
In this light, Python is not necessarily a holy grail or supreme language. Like the languages of the world – French, Spanish, Japanese – some will prefer to learn one language for various reasons compared to another.
Where Python is seeing an explosion currently is in relation to what we talked about in the intro – as an advanced statistical/mathematical/computing platform, many open-source innovations are occurring in the various open-source communities around the world.
Non-developers with experience in math, stats, finance, etc. are using Python to be able to perform advanced calculations/data visualizations and/or create automations/algorithms that reduce the need for constant maintenance of a complex spreadsheet for example.
Overall, Python is not ‘New Tech’ in the sense of something that just launched last year. It is the product of decades of research/testing/experimentation from millions of people around the world.
The community-driven element is propelling its applications to the next level and so we can expect a new batch of ‘apps’ to disrupt various areas in the future thanks to the combo of Python, Jupyter Notebooks, open-source libraries, and of course, Pythonistas.