A few words in defence of visual programming
Visual programming environments, such as MIT's Scratch, are often regarded as a good way to learn programming for young children, to be discarded once the child reaches his/her teens. In this post, I intend to say a few words on why I believe that these environments are more than child's play!
The goal of coding instruction
In an article entitled "Learn to code, code to learn", Mitchell Resnick, the creator of Scratch, contrasts two concepts:
- Learning the mechanics of writing code
- Learning to create and solve problems with code
The strength of block-based visual programming is that, by making the mechanics simpler, it enables the second type of learning. Rather than worrying about spelling commands correctly, observing indentation rules or remembering to type a semicolon at the end of a line, the learner concentrates on the goal of their project.
The Koch Snowflake implemented in Scribble
Developing fluency in a text-based language is important for many students and courses should be available for them in secondary schools. However, what all students need is the exposure to the idea of "debugging" as a way of learning. This is best fleshed out in Seymour Papert's book "Mindstorms". To Papert, programming teaches students that learning is not about getting things "right" or "wrong". Learning happens as you progressively improve your code so that it is more "right" than your first attempt.
You can teach a child of 8 years to build a multi-level game in Scratch. It can even be their first exposure to programming. It takes a considerable amount of instruction to do the same in a text-based language such as Python.
Snap! A leap from Scratch
There is no question that Scratch and other such visual environments are limited in many ways. You cannot teach important concepts such as recursion and you cannot extend the language at hand with new definitions.
This was the motivation for the creation of Snap! at UC Berkeley, where "CS10:The Joy and Beauty of Computing" has become one of the most popular first year elective subjects. Snap! is an extension of Scratch that enables university staff to teach computer science without the compromises they would otherwise have to make.
More locally, Monash University's first year IT students take FIT1040: Programming Fundamentals, which uses Scribble, an extension of Snap!
A case in point: Edgy and VCE Algorithmics
The Victorian Certificate of Education now has a meaty computer science subject, "VCE Algorithmics (HESS)". The concepts taught in it, such as divide and conquer and dynamic programming algorithms, are usually reserved for second-year computer science at university. In order to make teaching this course possible without taking students through the first year's programming instruction, the University of Melbourne built Edgy, a block-based programming environment designed specifically for implementing network algorithms. Edgy makes it possible to teach computer science in a way that was previously inaccessible to most people.
Minimal Spanning Tree (Prim's algorithm) in Edgy
In conclusion, far from being the poor alternative to "proper programming languages", some visual languages hold a great advantage: They enable us to teach substance over form. The discipline of computer science can now be taught without taking students through a long process of learning to code as a prerequisite.
If you are a computing teacher or learner, I would love your comments on this post.