Neil's News

Graphical Languages

24 January 2012

Last week MIT hosted a meeting with the developers of several different graphical programming languages. The discussion was extremely interesting and raised some great questions about these languages.

[Sample graphical code.] Graphical programming languages have been at the fringe of computer science for a couple of decades. They mostly inhabit a niche in the educational community, teaching CS concepts to new programmers. Routine syntax errors are incredibly frustrating to new programmers. Don't forget that semicolon. Don't forget to close the quotes. Balance the parentheses. Graphical programming languages can be designed to have no syntax errors. This removes the initial mechanical frustration and lets new programmers explore if statements and loops without the aggravation.

Education is not the only use case. As computers become woven ever deeper into our lives, more and more non-CS people need to be able to write scripts. Such as secretaries using macros in spreadsheets. Or managers writing email filters and auto responders. Or sales people controlling ad campaigns. Even expert programmers benefit from graphical programming languages in new environments since they don't need to study the API. Instead they can just start dragging the available blocks from the toolbar. In a way, graphical languages are the opposite of auto-complete: they help you get started rather than helping you get finished.

Here are some of the questions raised at the meeting which particularly interested me:

Are graphical programming languages taking advantage of the new format?
The blocks that make up most graphical programming languages have an almost 1:1 correspondence with the statements, operators and structures of conventional text-based programming languages. Are we completely missing the power of this medium? What would a natively graphical language look like, one that's unencumbered by the background requirement to cross-compile the language to code? Even if a better graphical language were possible, is it even desirable given the prominent use case of teaching CS?
Can graphical programs scale up beyond a screenful of blocks?
Current graphical programming languages are less dense than text-based ones. With less on the screen at any given time, and code spread around in two dimensions, one quickly reaches a point where it becomes difficult to keep track of the program's structure. What's needed is some form of zooming out, grouping, and other visual cues. Most graphical programming languages don't have a search feature, something even Notepad has.
How does one debug deployed code?
Graphical programming languages seem ideally suited for debugging since the currently executing block can be highlighted and the flow can be watched. However many graphical programming languages cross compile their code to a different language, then it may even get executed on a remote platform (such as a server, phone or Lego robot). This makes debugging in an editor extremely difficult to implement. The best solution would seem to be for the executing code to generate a detailed log of every step, then send this postmortem back to the editor for replaying in debug mode.
How do disabled people use graphical programming languages?
I'm not too worried about blind users; the whole point of a graphical language is to be visual, so blind users are better off using text-based languages. But what about users with motor difficulties who can't use a mouse? How does one manipulate the blocks using only the keyboard? Nobody seems to have addressed this yet.

My feeling is that graphical programming languages have the potential to be far more useful than they currently are. The field is wide-open for innovation. What's needed is a tremendous amount of diversity and experimentation. You can bet that this won't be my last post on the subject.

In other news, I hope you enjoyed last week's SOPA protest. As the Washington Post brilliantly summarized, "This is what happens when you make the Internet mad." It was often reported that this was the first major online protest. Ah, how quickly memories fade.

< Previous | Next >

Legal yada yada: My views do not necessarily represent those of my employer or my goldfish.