Making the Transition from Blocks to Text with Snap!

The latest features in Snap!
Jens Mönig

This demo shows a hot-off-the-presses feature in Snap! which lets you map visual blocks and graphical syntax elements to their textual counterparts in traditional programming languages and then actually generate and export text code from blocks scripts. An example will be shown in which a simple algorithm is created, tested and debugged in Snap! and then compiled into Python, Smalltalk, C and JavaScript code, to be run immediately in these other environments.

Code mapping opens up new ways to simulate robotics in a blocks IDE before generating native embeddable executables. Possible uses also include generating remote database queries on the fly, distributing parallelizable bits of code across a computing cloud at runtime, and supporting autogradable problems for MOOCs.