Inspired by Guido van Rossum? Follow up on that inspiration by thinking of how you could extend the capability of Sage 300 using Orchid Extender and custom Python scripts.
We reflect on Python’s birth and evolution through the eyes of its creator, the recently retired Guido van Rossum.
Anyone who has been paying passing attention to Orchid’s newsletters and blog posts in recent years can’t have helped noticing that we are big fans of Python, the scripting language used by our Extender module.
Since making that decision several years ago to use Python we’ve taken vicarious pleasure from seeing survey after survey proclaim its rise and rise, to the point where it is now widely regarded as the world’s most popular programming language.
This article looks at Python’s journey through the eyes of its creator, the recently retired Guido van Rossum
But first, some background...
Van Rossum, a Dutch programmer, started working on Python almost exactly 30 years ago. As an ‘open source’ language it has continued to evolve thanks to an ever-growing band of passionate advocates, but van Rossum always had the final say on all changes.
Guido’s unquestioned leadership earned him the honorary title of BDFL, ‘Benevolent Dictator for Life’.
That remained the case for three decades until, in July 2018, he suddenly announced his decision to step back into the shadows. His provocative Transfer of Power post threw out this challenge to the broader Python community:
“So what are you all going to do? Create a democracy? Anarchy? A dictatorship? A federation? But here's the catch - I'm going to try and let you all figure it out for yourselves.”
They rose to the challenge, guided by the Python Code of Conduct, and by the end of 2018 had settled on a governance regime headed by a steering committee elected by the broader group of ‘core team members’.
Don’t Worry, by Appy
You might be surprised to learn how many hugely successful apps have been developed wholly or predominantly in Python. Instagram, Uber, Spotify and Pinterest to name just a few. Another is Dropbox.
It’s become part of Dropbox folklore that the first prototype was written, in Python, on a 5-hour bus trip from Boston to New York.
In 2013, after 7 years at Google, van Rossum joined Dropbox as ‘Python Charmer in residence’. The deal was that he could spend half his time working on the ongoing development of Python, and the rest mentoring developers and getting the Dropbox code base in order. He announced his retirement just a few weeks ago.
Reflections & Parting Words
Upon his departure from Dropbox, Van Rossum was interviewed by Anthony Wing Kosner for a blog called The Mind at Work: Guido van Rossum on how Python makes thinking in code easier. It gives some great insights into the evolution of Python, and the thinking behind it.
We thoroughly recommend you read the full article, but if you don’t have time here are a few facts and thoughts that caught our attention.
- It’s easy now to take for granted the ubiquity and affordability of computing power, but it wasn’t always so. Early ‘mainframe’ computers were hugely expensive to purchase and operate. Processing time was a scarce and valuable resource, to the extent that ‘compute time’ was considered far more valuable than ‘programming time’.
- This was reflected in attitudes to programming. ‘Real' programmers wrote code in low-level machine language, where execution speed and efficiency outweighed readability. A culture of ‘cowboy coding’ developed, where it was almost a badge of honour to write complex code that worked, but which was virtually incomprehensible to anyone but the author.
- By the 1980's the cost of computers had started to drop dramatically, while the cost of programming increased, but attitudes to programming lagged behind. Van Rossum, amongst others, felt that a change in mindset was needed.
The conceptual shift to giving humans primacy over machines became one of Guido's guiding principles.
There are a multitude of ways this is reflected in the design of Python, including:
- The decision to make Python an interpreted rather than compiled language, common now but a brave move 30 years ago. This helps coders overcome the fear of making mistakes, instead providing an instant feedback loop that encourages prototyping and multiple, rapid iterations.
- The idea that “every symbol you type is essential”, eliminating what he calls “noise characters”. This resulted in a language that was easier to learn, quicker to write, and produced more readable, uncluttered code,
- The rules around indentation, which form an explicit part of the syntax rather then being used arbitrarily. Loved by some, loathed by others, this suits Van Rossum’s eye by making Python code appear 'two dimensional and visually coherent'. As he says:
Python makes structure mandatory
The Zen of Python
The drive to push back against ‘cowboy culture’ by not just encouraging readability, but in effect enforcing it, is encapsulated by the following rather counter-intuitive quote from Van Rossum:
You primarily write your code to communicate with other coders, and, to a lesser extent, to impose your will on the computer.
Van Rossum may not have explicitly articulated the guiding principles behind the language, but that didn’t stop others from trying. The best known of these attempts, by Tim Peters, is called The Zen of Python. He refers intriguingly to “20 aphorisms, only 19 of which have been written down”. Here are 5 examples to give you the idea:
- Explicit is better than implicit.
- Simple is better than complex.
- Special cases aren't special enough to break the rules.
- In the face of ambiguity, refuse the temptation to guess.
- If the implementation is hard to explain, it's a bad idea.
Let's wrap up with the the final quote from Van Rossum’s Dropbox 'exit interview' article. While the context is his 30 year journey with Python it is relevant to anyone who might be struggling to let go of control, learn humility, and embrace teamwork and collaboration.
I have learned that you can't do it alone, which is not an easy lesson for me.
I've learned that you don't always get the outcome that you went for, but maybe the outcome you get is just as good, or better.