Blockly is the engine running underneath many of the online tutorials used today to introduce people of all ages to programming. In this article we interviewed Neil Fraser, from the Blockly developers team, and learned about the team’s perspective and vision.
Where have we seen Blockly?
In recent months we have seen a great number of activities directed at engaging people of all ages into computer programming. For example, The Hour of Code has organized more than 70 thousand events worldwide, and has been tried by over 95 million people, from elementary students to heads of state.
Code.org provides free online tutorials that anyone can try in a few minutes. Those who have tried any of them, for example Flappy Bird is my favorite, would have seen the canvas with little blocks of code that we can snap together just like LEGO pieces.
The platform that creates these visual blocks of code is Blockly, an open source library, mostly developed by Google engineers, with contributions from many others in the community, and hosted in this Github repository.
[caption: screenshot from Blockly home page]
Neil, tell us a bit about yourself, how Blockly got started, and how you got involved in the project.
A few months into the project, App Inventor was cancelled and the project's code transferred to MIT. I believed in my new UI's potential and refused to let it drop. So I took the only available option and expended all my accrued vacation. Every day I'd come into the office and work on it. After two months I was able to give a demo. My managers were impressed, launched the Blockly project, and retroactively gave me back my vacation. Yet another example of why I love Google.
The result of this history is that Blockly is not just a UI for one project; it is a library that may be dropped into any project. There are now hundreds of educational, corporate, and hobby projects that use Blockly.
It is very impressive to see the enormous impact that Blockly is having in computer programming informal education. Blockly is truly a Tutorial builder toolkit, and has made a lot easier for sites to create their own programming tutorials. Can you tell us more about the interplay between the Blockly community, and the organizations that use it to build their tutorials?
Blockly has a very active community on our developer newsgroup. There is a continuous stream of pull requests being offered and lots of people helping each other. Occasionally we catch glimpses of the unexpected directions that developers are taking Blockly. When we get bug reports regarding performance issues in programs with over 10,000 blocks, we can only scratch our heads and wonder what they are up to.
For the most part though, we rarely get to see what other developers are actually building. I normally find out about the release of new Blockly applications or that the US president used it when I read about it in the press.
New programmers are fighting two battles at once: the syntax battle and the logic battle. Blockly eliminates the syntax battle, it is impossible to make a syntax error in Blockly. Students can focus entirely on the logic behind conditionals, loops, variables and other core concepts without worrying about unbalanced parenthesis or missing semicolons.
However, it is our belief that once the basics of logic are understood, students should migrate to a conventional text-based language. An example is Blockly Games, which at the end of each level shows the generated code that the student created. Blockly Games also gently transitions students away from blocks and towards text-based programming towards the end of the course. We don't want students to use block-based programming longer than necessary. Nobody ever got a job because they have three years of experience in Blockly.
You are targeting a wide international audience. Can you tell us more about the efforts for translating Blockly to more than 40 languages, and how people in the community could help with these efforts?
The 94% of the world that does not speak English natively struggles to memorize that the letters 'R', 'E', 'P', 'E', 'A', 'T' in that order will cause something to happen more than once. Imagine learning to code and having to memorize 'كرر' or 'عودة' at the same time. Granted, there are only a few dozen words to memorize, but being forced to do so on top of the battle to understand the logic is an extra barrier.
Translating Blockly into native languages allows one to postpone the language barrier until after the programming concepts have been mastered. We are enormously appreciative of the help people have provided by submitting translations. It is amazing to watch grade five students in Vietnam jump into Blockly and start figuring it out without needing the teacher's guidance.
Most new students have no particular interest in programming. We have about 20 seconds to engage them before they get bored and wander off to play video games. Every barrier to entry (installing Java, or a slow download, or learning English, or a messy UI) represents a significant loss of audience. We rely on metrics, user studies, and feedback from the developer community to identify and remove these barriers.
Blockly has been described as a gateway drug. It is easy to try out, it gets one hooked, and it pushes its users onto harder things. Possibly not the most flattering analogy, but somewhat accurate.
What is your vision for the future of Blockly, and how can the open source community help?
Google will continue to enhance the Blockly environment, adding new features such as realtime collaboration for multi-user projects, or Google Maps-style zooming for large projects, or keyboard controls for blind users. But Google's contributions are now secondary in importance. The future of Blockly has been taken over by outside developers. They are the ones who fork it, extend it, and use it in education, home automation, robotics, and data visualization. They are the ones who translate it into more than 40 languages (including Klingon). They are the ones who put Blockly-based applications into the hands of students around the world. I'm incredibly proud of the work that the developer community is engaged in.
A collection of articles about how to get started in open source.