Feel Like a Kid Again — Play With Some Blocks

DZone 's Guide to

Feel Like a Kid Again — Play With Some Blocks

Anyone who has ever played with Legos knows the appeal of snapping together a few simple blocks to make something creative, artistic, and even functional. The Blockly language is like that.

· Web Dev Zone ·
Free Resource

Blockly is a visual language that has been in use since at least 2011. It is used by and is an integral part of a number of projects and systems:

I personally have used the MIT AppInventor to create android phone and tablet clients for speech applications. For me, the system was attractive because it allowed me to quickly assemble a speech based Android client as an input-output channel for the conversation management systems I develop. Without any Android development experience, I was able to learn and implement a working alpha prototype in less than two hours. All the complicated details and syntax for what needed to be done are elegantly hidden in the simplicity of the blocks. After experimenting a bit and investing several more hours refining my alpha prototype, I now have a solid working beta platform that I use regularly as a demonstration portal for the features our AI-based conversation management system. I don't want to sound like an evangelist, but if you want to have a lot of fun creating a multimodal Android application in minutes then check out AppInventor. Watch a couple of the five-minute tutorial videos and build something yourself.

Most of the applications listed above as examples have the look and feel of an introductory educational system for children. But, this simplicity and elegance are also part of its power. Much of the difficulty in programming involves getting the syntax correct. With Blockly, the blocks only snap together where they are supposed to, and their shapes are easy-to-understand indicators of what goes together with what. And, the cool and surprisingly rewarding part of the experience of programming with Blockly is that when components do fit together properly, the programmer gets a clear audible verification "click". Programming is truly multimodal with Blockly.

You might think that building an application with simple procedural (and colorful) building blocks that "click" together is enough of a reward. But, Blockly is more than just that. Blockly is a methodology that allows you to implement a language of your own using blocks that you create. You as the language developer define the inputs, outputs, modalities, colors, and resulting raw computer instructions that your blocks will generate. In fact, along with the Blockly download is a program called the Blockly Factory (which is... wait for it... written in the Blockly language) that assists you in the creation of your new Blockly language. And, all of this (including languages you develop) runs in an ordinary browser using standard JavaScript. 

In fact, I did create a Blockly version of the control language for our ejTalker conversation management server. It was featured in a SpeechTEK University tutorial in 2015:

STKU-8 – Advanced Dialogue Techniques for Intelligent Virtual Agents 1:00 p.m - 4:00 p.m

Emmett Coin, Speech Scientist - ejTalk

Intelligent virtual agents require advanced dialogue techniques. This workshop identifies and describes four interrelated dialogue techniques that enable virtual agents to act intelligently. This workshop goes over dynamically adjusting the dialogue context, based on recent user input; rephrasing the agent’s responses so they don’t sound repetitive; automatically generating conversational ellipsis (wording redundant with previous parts of the conversation) in the agent’s response for naturalness and efficiency; interpreting badly formed user utterances; and integrating information expressed by the user via multiple modalities. It presents examples illustrating each of these techniques using a simple graphic “blockly” notation. Emmett Coin also illustrates how to combine these techniques to form more powerful dialogue managers, using a layered approach to a dialogue design. This layering strategy is essential to manage dialogue design and implementation complexity as agent interactions become more open. Bring your laptop for a hands-on experience.

So, consider getting some real work done by playing with Blocks! Feel like a kid again, you deserve it.

blocks, programming language, visual application builder

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}