Friday 9 September 2011 — This is 14 years old. Be careful.
I’ve been thinking about online Python learners. There have been some cool examples of online code exercises, like Nathan’s Javascript Lessons. These are great because they require absolutely no setup, and can run right on the web page that describes the concepts involved.
But of course, it’s easy to run Javascript in a browser. What are the options for doing something similar for Python?
CodingBat provides exercises for Java and Python. Your code is actually run on the server. Generally, this is risky, because Python’s dynamic nature makes it notoriously difficult to limit its powers. CodingBat does this aggressively, and manages it only because it limits the code it will run to very simple functions. For example, you cannot import anything.
Another server-side solution is the NCSS Challenge, which uses an elaborate sandboxing technique on the server to run arbitrary Python code. The sandbox is explained in this PyCon AU video by Tim Dawborn. It seems prohibitively complex, but makes it possible to run sophisticated Python code from the browser.
There are other server-side online Python execution pages:
Server-side execution solve the problem of executing Python, but introduces the new problem of keeping the server safe. Can we instead execute Python in the browser? There have been some interesting implementations of this also:
Reviewing all these possibilities, none are perfect, and some are far from it. And I started to wonder, are online exercises worth all this? After all, the point of learning a language is to eventually write your own code, and that won’t happen in a sandbox in a browser. The student will have to install a real Python environment at some point, so why not start with that, and get a better learning environment right off the bat?
Are there other possibilities? Is it important? What about an environment on the student’s computer that can communicate result back to the online environment automatically? Or an online environment that can use the student’s local resources so the server doesn’t need protection?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4