Get ready to go “Pythonic”!
As an educational tool, the Python programming language stands above the rest. It is designed to offer the fastest time between theory and practice. Intuitive yet powerful, it lets you see results of your learning right away. And it makes you see how easy it can be to see your programs implemented in your day-to-day tasks.
Furthermore, the adoption of Python is off the charts. Learners all over the world generate simple solutions for common operations. Through FOSS platforms, they improve and make their code available to everyone. It is an essential factor in the fast development of Machine Learning algorithms. A role in which it will only grow.
So if you are looking to expand your computational thinking skills, Python gives you a path hard to match. Wonderful and exciting things await Open Source educator and learning technologists!
It is the language for Machine Learning and Data Science
This makes Python pretty much the programming language of the Industrial Revolution 4.0.
If you are at all interested Machine Learning and Data Science, learning Python should be step 0.
Basics about the syntax and workflow of a program written in Python will allow you to interact with any existing or current tools. The most popular applications, libraries and methods for cutting-edge tasks such as Natural Language Processing, Computer Vision or Self-Driving Cars are built in Python.
Among these libraries, there is little contest against TensorFlow as the most popular and versatile. A quick glance at GitHub reveals uncountable wealth in applications and tools built in Python.
Important Data Science and Machine Learning tools written in Python include
- TensorFlow (Deep Learning)
- Scikit Learn (Supervised and Unsupervised Learning)
- PyTorch (Deep Learning for NLP, Computer Vision)
- Keras (Artificial Neural Network API)
- NumPy, SciPy, MatPlotLib (Basic mathematical and statistics, the basis for the other libraries)
But even if you are not interested in the future normal, Python is a comprehensive language with best-of-breed solutions in several places. Automation in particular is a thriving area. Give Python a try and speed up your workflow! Games, 3D animation, video editing and industrial operations in fields like aerospace, astrophysics and genomics are other common uses for Python. Admittedly, this is due in part because of its Machine Learning capabilities. To be fair, the trend of having “smart” algorithms in every personal, commercial and industrial scenario is only heightening.
The enviable popularity and salaries
Given that Python is the core of professional Data Science duties, which conduct median wages around the 6-figures for entry-level jobs.
It should not be surprising that more people are interested in Python than any other language. The StackOverflow Developer Survey reveals that Python was the only language whose popularity grew between 2018 and 2019. It is consistently one of the most loved and wanted languages.
The countless free learn Python choices
The offer for free and online learning for Python is broad and plentiful. Free online courses, reference sites, documentations, cheatsheets, interactive tutorials, apps and YouTubers, not to mention MOOCs and, you know, books, are sure to cater to every learning taste.
For Moodle-based LMS, the Virtual Programming Lab plugin, which lets you run code from within the platform, supports Python 2 and 3. As of writing it is compatible with Moodle 3.5 or earlier.
A free downloadable “Python for Beginners 1 – Python Language Basics” is available in the soon to be defunct MoodleNet to use as resource from any Moodle-based site.
However, there is a nascent debate on the format and pedagogy of programming courses, including those focused on more high-level concepts such as algorithms.
We are in the final moments of the “Python 2” versus “Python 3” debate. Given the radical changes between versions and lack of backwards compatibility (you cannot use Python 3 to run a program written in Python 2), both languages coexisted and the developer needed to make a choice. Nowadays, there is no real justification to use Python 2, whose support will end on 2020.
What you need to set up your Python development environment
Just like any other software development project in any other language, there are a serious of mandatory, recommended and convenient tools.
The Python programming language, libraries and frameworks
Installing Python is the obvious first step. Unfortunately, doing so offers more complications than it should. Recent operating systems based on Unix, like Ubuntu and other Linux versions (including Windows 10 Subsystem for Linux); as well as Mac, come with Python on the box.
On Windows, just grab the latest stable 32 or 64-bit release and install. It comes with a dedicated shell that makes it easier to type quick commands and run scripts. For bigger projects, of course, some tools would make things run more smoothly.
You can write Python in any kind of text editor. Productivity features are available in the most popular Integrated Development Environments, which add handy project management features. PyCharm is a Python-centric IDE but it’s not FOSS.
If Python is the lingua franca of machine learning, Git plays the same role for version control systems. It is a tool to keep track of the software development’s history with lots of benefits, such as collaboration, branching, synchronization and more. If there is a multiverse, its design would likely be similar to Git.
GitHub is the official online repository for project built through Git, and the de facto repo for many of the most important Open Source projects in EdTech (such as Moodle) and Python.
Onto the Production Environment
So you have an application ready to enter the world and tackle real people’s problems. Many would argue your job has just begun!
From a project management perspective, it’s worth mentioning the concept of “DevOps.” A modern and commonplace practice that keeps application development teams and duties close to the production operations, as opposed to separate and often disconnected areas in a company.
- Hosting. In-campus, managed, private or cloud, each one comes with pros and cons. Small startups and entrepreneurs increasingly opt for cloud services to outsource some of the complexities of setting up a physical computer that delivers your application, and to better manage usage spikes.
- Server, Platform, Container, Gateway, Network traffic manager. Depending on your selection or host, you may or may not need to set these up.
- APIs. They can extend your application functionality, or quickly solve common development issues such as authentication or payments, and of course connecting to an LMS.
- Security. This includes tools to encrypt passwords and other data under state-of-the-art standards, and to establish secure connections using HTTPS and SSL.
- Testing and performance monitoring. Python includes testing libraries such as Pytest or PyUnit, but they are useful for the core codebase. Testing your application for tasks involving server operations, APIs, network, security and so on demand more professional-level testing tools. A more robust tools in this case would be Ansible, which provides an Open licensed version.
pip, giving you access to all the cool libraries, will become your best Python friend ever
The second thing you do after installing or upgrading Python is
pip3 actually. Don’t ask me why.
pip is a simple application that gives you instant access to the official, non-profit and open source Python Package Index, or PyPI. It is an outstanding FOSS initiative run by the Python Software Foundation.
With pip all you have to do is use the
install command and the library you want to enjoy it on your environment, and then use
import on your project to use it.
A recommendation from experienced programmers is to build every new project in an isolated “virtual environment.” This protects the program from changes in both your system and the packages, and ensures libraries and other components remain in place and available for your Python project. For a simple script, however, using few or no libraries, it’s probably unnecessary.
You can get a test running online right now
Just visit python.org and try the classic command:
If you want to take things further (and anywhere), few resources are as convenient as the Jupyter environment on Google Colab. It provides free hosting, from where you can run scripts from a web browser. You can import libraries, collaborate and see results, all without having to download anything.
The secret to a great app and workflow (It’s Python, there’s no secrets)
It’s important to at least touch on the idea mentioned about algorithm and how they are presented. In the fiery space of educational technologies, there should be a greater debate and inquiry as to why algorithms are taught like a manufacturing concept, rather than an art. Most learners, that is to say most software professionals, conceive algorithms in terms of resource maximization. In reality, they are so much more related to what at some point was attributed to the “right side of the brain”: Creativity, imagination, art.
Virtually all the major apps and social media sites include a Python element. It should not be surprising that they usually focus on learning algorithms and programmatic processing of images and media.
- Perhaps the most intensive use for Python goes to Instagram, whose CMS is none other than Django.
- It is part of Google’s oral history an alleged quote from co-founder (either one): “Python where we can, C++ where we must.“
- Netflix uses Python extensively.
- And it’s Uber’s primary language.
- Dropbox loved Python so much it hired its creator.
LMS, Open EdTech are yet to catch the wave
Among the world’s top LMS, Python is seldom used. The glaring exception is Open Edx, the platform behind the EdX platform for MOOCs and Bootcamps.
The limited use of Python among LMS and other EdTech might hint at the possibility of limited advantage of Machine Learning and Data Science in the field. Of course, at this point we can only speculate.
Anything is possible in Python, including visual interfaces and websites. But most developers would not consider Python a “Front End” language. As a result, web and mobile apps use complementary languages to serve the end user. LMS are no exception.
Other examples of Python sneaking into LMS include:
- Sakai provides SakaiPy, an unofficial library to connect with Sakai’s API.
- Moodle’s Learning Analytics engine, available since Moodle 3.4, has two versions. The more complete one is on Python, based on TensorFlow. It uses the moodlemlbackend Python library.
- An interesting, if not terribly popular list of LMS ideas written on Python are available on GitHub, including an LMS adaptation for the Python-based Content Management System Django.
Our How To content is supported by: eCreators. Moodle for the enterprise, K12 and corporate. Australia and Singapore. To learn more about eCreators, click here.