Another Blaugust post, another bit of inspiration comes my way… Juhis posted on their blog about Python’s philosophy of “batteries are included”. This is a design philosophy I can respect, and it takes me back to old school languages from my youth.
The basic philosophy of Batteries Included
Juhis’ post gives the main idea very well, but in summary: Python is designed to include a sufficiently rich set of standard functionality that you can begin performing useful work without immediately needing to incorporate additional libraries. This means that it is possible to create fairly sophisticated programs that can work out of the box.
Python also, of course, has a huge collection of packages that can be installed with pip (Pip installs packages) and associated tools for package management. And it would be a lie to suggest that most or even many Python programs of any size work purely with standard libraries, at least in my experience. But it is truthful to say that at least Python makes the attempt to deliver the ‘batteries included’ experience.
My recollections
I am not a Python coder. Most of my experience with the language comes from taking someone else’s code and adapting (butchering) it to my purposes. But I do like the concept of ‘batteries included’ as it reminds me of the way things once were.
Back in the days of BASIC, Pascal, or even Turbo Pascal the libraries you got in the standard package were pretty much what you had to work with. There wasn’t a massive collection of third party code to pull from to enhance the functionality of the language. This led to code that was consistent: printing formatted strings to the screen, writing to a file, or performing math calculations could only be accomplished with the included libraries unless you wrote your own, and most people didn’t.
I liked those days. There was a sense of the language being ‘knowable’ by a single person or a small team. The plethora of libraries available today means that for any given function there might be a dozen different libraries to accomplish it, each with their own strengths and weaknesses. The totality of the options available is essentially unknowable. Every project you go on to might be using a particular language (including Python), but the differences in libraries being used can render each code artifact so unique as to be entirely different from every other instance.
Conclusion
I’m not a Python coder, but I like the concept of “batteries included”. It gives me a warm, happy feeling based on old memories of coding in simpler times, even though Python has a huge library of optional “batteries” that nearly everyone choses to use instead. And it makes me want to find an excuse for learning Python properly, which is something I should really do some day.
