tain consistency, many kinds of textual
edits must be prevented, and other
edits may require special tree-editing
commands. These constraints raise
editing viscosity, and they may present additional cognitive barriers. Interfaces that effectively bridge the gap
between blocks and text are an active
area of research.
Applying Blocks: Two Examples
Let us take a look at experimental
blocks languages in two specific domains that are unfamiliar to most programmers.
Programming 3D printers. Traditionally, 3D printing models are drawn
interactively by direct manipulation
using CAD software. Writing custom
code to create a model is a powerful alternative approach, but coding for 3D
fabrication has traditionally been the
province of a few expert programmers.
Now, the falling cost and rising availability of 3D printers has made it possible for non-specialists to write their
own custom 3D modeling code.
Two recently developed languages
bring programming for 3D printing to
novice users: BeetleBlocks17 and Madeup.
14 Although the two systems have
different languages, there are several
commonalities: both are Web-based interfaces with a live 3D rendering of the
shape being created, and both provide
a blocks language to simplify learning.
Beetle-Blocks follows the principles of
turtle graphics: a beetle moves a “pen”
that can be turned on and off, and 3D
shapes can be created out of iterated
strokes. MadeUp (Figure 8) takes a
more abstract approach, allowing users
to trace out both paths and parametric
surfaces. Special functions can rotate
or extrude the paths to create solids.
The two languages offer different levels of power and abstraction.
Which language is the right one to
use? This domain is an excellent example of the advantage of the learnability of blocks. Both blocks languages have a very shallow learning curve,
and it is easy to try both.
Querying the Semantic Web. The fre-
quent need to query large datasets is
another domain where learnability
is essential. Consider the problem of
querying Resource Description Frame-
work (RDF) data from the Semantic
Web. SPARQL is the standard language
for querying RDF; it includes sev-
eral constructs for working with RDF
triples that distinguish it from other
query languages such as SQL. How-
ever, potential users of SPARQL face
two hurdles: First, programmers must
learn the vocabulary and syntax of
SPARQL, with its specialized operators
and constructs. Second, querying RDF
requires not just knowledge of the lan-
guage, but also knowledge of instance
and schema data.
To address both problems, Paolo
Bottoni and Miguel Ceriani have created a blocks language they call the
4 Rather than helping users learn about sequential programs, their blocks language helps
users select, filter, and join data using
The SPARQL Playground is interesting for a second reason: all query results
in the playground are also returned as
draggable blocks (Figure 9). This feature allows users to save instance data
on the programming workspace to be
incorporated into new queries. With
the SPARQL Playground, it is easy to
begin with general queries to explore
the types of data available, and then use
these discoveries to make refinements.
Making New Blocks Languages
It is now possible to create your own
domain-specific blocks environment
using a blocks-based language toolkit. Blocks language authors should
be aware of at least three toolkits:
3 and OpenBlocks.
The original blocks metalanguage is
MIT OpenBlocks. Created in 2007 by
Ricarose Roque as the basis of StarLogo TNG, it allows a large degree of geometric customization. OpenBlocks
has also been used in App Inventor
Classic and BlockEditor. One drawback of OpenBlocks is that it requires
users to download and install the Java
JDK. The challenge of installation is
addressed by Blockly, an HTML-based
block language toolkit by Neil Fraser
of Google. Blockly is currently the most
popular blocks language toolkit: it is the
tool behind App Inventor, the SPARQL
playground, and MadeUp, as well as the
Code.org Hour of Code puzzles. Future
versions of Scratch will also use Blockly.
Droplet is the newest of the blocks lan-
On the Web:
˲ Scratch ( https://scratch.mit.edu):
In-browser animation and game
creation, with support for extensions
Code.org ( http://code.org): A
variety of tools including puzzle
programming exercises with tutorial
˲ Snap! ( http://snap.berkeley.
edu): Enhanced language inspired
by Scratch that includes first class
˲ App Inventor (http://appinventor.
mit.edu): Creation of Android apps
using in-browser blocks IDE
˲ Pencil Code (https://pencilcode.
net): Creates Coffee- Script Web
apps, transforming between text and
˲ StarLogo Nova ( http://www.slnova.
org): Multi-agent simulations and
games in a 3D rendered world
˲ Blockly Games (https://blockly-
games.appspot.com/): A set of
puzzles to solve with programming
˲ GameBlox ( https://gameblox.org):
Game creation that includes clonable
agents, physics, and more
˲ AgentSheets / AgentCubes (http://
blocks environments for creating
rule-based games and simulations
˲ Alice ( http://www.alice.org):
Pioneering blocks environment for
creating 3D virtual worlds; support
for exporting to Java
˲ Looking Glass (https://
animated story creation; supports
˲ Kodu (http://www.kodugamelab.
com): Rule-based programming of
games for xBox and PC
˲ Scratch Jr ( http://www.scratchjr.
org): Programming of animated
scenes aimed at preliterate children
˲ Pocket Code ( http://www.catrobat.
org): Blocks programming for small
form factor of mobile devices
˲ Tynker ( https://www.tynker.com):
Polished commercial platform for
game and animation creation
˲ Hopscotch (https://www.
gethopscotch.com): Creating games
and animations on iPhone and iPad