Khan Academy released their Introduction to Programming modules today and they’re really great. Go play. Here are my favorite pieces:
Changes to the code affect the output dynamically. No rendering, no compiling, no reloading. Change the width parameter of a rectangle in the code and the rectangle changes without any extra effort on your part. You can hover your mouse over any parameter and a slider appears, letting you change that parameter smoothly over a range of values. (Bret Victor modeled this kind of programming environment in his Inventing on Principle talk. Try it out on the tree generator.)
Contrast this with Codeacademy where you have to click “Run” or press “Enter” to see the result of your work. Or just now, when I was working on my front-end web development final project, I would make a change to my code in one window, click over to my web browser in another, and then click “Reload” to see the result. That friction may not sound like much but it often makes programming feel less creative and more mechanical.
You can interrupt the lectures at any point and mess around with the lecturer’s code. You press play on the video and you watch the lecturer type code on the screen. You hear the lecturer talk about the code as she types it. This is how I’d predict “Khan Academy does introduction to programming” would look. But the student can press pause at any point, mess around with the current state of the lecturer’s code, and watch the result change in the output window. She presses play and her changes revert back to the lecturer’s code and the lecturer continues on.
Don’t underestimate this feature. This means that if an explanation is unclear, if the student doesn’t understand the effect of a given parameter in a function, she can pause the explanation and instantly generate a series of examples of the parameter’s effect. (eg. “Oh I thought that parameter was the top coordinate of the rectangle but now I see it’s the height.”)
The lecturer is
Vi Hart Khan Academy intern Jessica Liu. That’s (still) fun.
Students are doing and listening simultaneously. This isn’t the place to contrast Khan Academy’s treatment of math against its treatment of programming. Let’s just note that students play a very active role in these lectures. They’re going to love it.
2012 Aug 14: John Resig has an interesting write-up of the development process and explicitly namechecks Bret Victor’s talk as an inspiration.
If we can add in challenges (e.g. Angry Birds) where students have access to environments and tools that offer this type of instantaneous feedback so that students can solve those challenges through hypothesis that can quickly be validated or invalidated through the feedback loop then I think we will have a learning environment that completes the loop by providing intrinsic motivation to engage with the environment by solving the challenges.
I love that the lectures are from a woman, that she uses “her,” “his,” “he,” and “she” in roughly equal proportion and talks about “your mother, the programmer.”
Wouldn’t it be great if the math section were executed in a similar way? Imagine a video that poses a question with a scratch space to execute and test solutions. Obviously much more complicated, but I’d bet there are certain situations in which at least it’d be a great step in the right direction without too much effort.
I think most Computer Scientists would cringe at this being called “Computer Science.”