Chapter 2. Unstructured sandbox

An unstructured sandbox provides an open ended, terminal-like model for entering and executing code. These terminals can be embedded inline in the page, opened with a click of a button, or iframed into the structure of the overall documents.

Examples include: is a tool that uses various compiled languages (python, ruby, and lua, among others). The site offers a code runner, an output pane, a surprisingly wide selection on languages, and a nice selection of samples for each type.

iPython Notebook

iPython Notebook is a tool for viewing python in the browser. The author writes in an integrated environment (the native format is JSON) that allows text, equations, and live code. (The code executes on a remote server.) The output of the code is presented in a terminal style format. One of the other really nice features is that it is simple to embed images, like those generated from numerical or scientific tools like numpy or scipy.

Khan Academy

Khan Academy provides a vast array of learning classes around basic computer science. There are typically a video or animation for each step, after which the student is able to experiment with the code in the sandbox. The coding environment is divided into a pane for listing and a pane for the output, where the student can see the result. (Currently, only Javascript-based languages seem to be supported.) The code environment also supports a "Save as a spin off" button where the user can save the code listing to his or her own private account for modification.


Scratch is an interactive learning environment geared towards kids. The user edits code in an IDE-like window. Tips, instructions, and tutorials can be appear in a sidepanel called "Tips" that can be turned on or off. The user can also save their programs (which are often like small animations or movies) so that they can be shared.


jqfundamentalsis a site for teaching javascript. It walks through a rich set of concepts that are illustrated with specific code examples. You can click on a small icon on the example to open a live code editor where you can run the example.


O’Reilly Chimera is a new beta site for experimenting with how books can become more interactive. At it’s current start of development, the site has embedded JSBins that allow the reader to try out the code. (Javascript only.)


Opal is a ruby to javascript compiler. It is source-to-source, making it fast as a runtime. Opal includes a compiler (which can be run in any browser), a corelib and runtime implementation. The corelib/runtime is also very small (10.8kb gzipped).

try clojure

Try Clojure is an online sandbox for using Clojure, a dynamic programming language that targets the Java Virtual Machine (and the CLR, and JavaScript). It is designed to be a general-purpose language, combining the approachability and interactive development of a scripting language with an efficient and robust infrastructure for multithreaded programming.