Neil's News

Live Coding

3 June 2015

Bret Victor gave an inspiring demo back in 2012 that showed the benefits of what became known as "live coding". The idea is that instead of writing code, running it, then looking at the output, one should instead have the program continuously running as one types code. By tightening the development cycle to zero, programming can become more creative and allows for more experimentation.

The educational community has seized on this concept and learning tools are increasingly using live coding. Bret has since posted that this a misapplication of his ideas, but this message failed to gain the same traction as his earlier video.

Now, finally, people are starting to take a more critical look (e.g. An Empirical Study of Iterative Improvement in Programming Assignments) and are finding that rapid feedback actually hurts learning and slows down programming. So what's going on here? Why does making programming easier make it harder?

It is the difference between intelligent design and evolution. Conventional programming involves mentally figuring out how something should be done, coding it, testing it, then shaking the bugs out. This is intelligent design (and thus requires an intelligent designer). By contrast live coding gives instant feedback so one sees whether one is getting closer to the solution. This leads to programmers not needing to think as much, they can just take a random guess and see how the output changes. If it gets better then they keep that change and make another. If it gets worse then they revert the change and make another. Watching programmers code in this manner is like watching a new species evolve; it works, but it is painfully slow and by the end the 'programmer' has no idea how the program works.

Granted, one educational benefit of live coding is that it puts students on a more level playing field. Solving problems in this way involves nearly mindless grinding -- eventually the problem will solve itself. Even the student with minimal programming aptitude can complete the problem. This is clearly a benefit in our No Child Left Behind classrooms. The downside is that the students don't know how their program works, nor have they learned much.

I'm writing this because I'm tired of people calling on Blockly Games to give instant feedback as programs are written. I've done the comparisons and it makes programming slower while also removing any educational value. Instead, Blockly Games actually slows down tests if they fail, and speeds up tests if they pass.

Programming is about thinking. Not guessing.

< Previous | Next >

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