Over the years, I've tried all sorts of ways to get my kids into programming: from the watered down artificial environments with loads of pedagogical pedigree to over-hyped tiger mom summer camps. And until this past week they've all resulted in blank looks from the kids who wonder why I think it is so important for them to learn to master giving instructions to a machine. Even when the programming exercise involves their beloved Minecraft (I will have a blog post on that adventure coming).
This week I found a project that seemed to work though, at least for this pair of 11 and 8 year old boys: a programmable Christmas tree. As of becoming semi sentient, it knows when to turn on an off based on the time of day but also warns us of impending snow by blinking rapidly for 30 seconds every 30 minutes. The project, implemented with a Raspberry Pi, a relay, a small amount of Python and two little boys has been a smashing success in the sheer amount of delight elicited. I've been thinking about it, especially in the context of our last attempt to write a LOVE-based video game earlier this year, and I think its success has to do with the following reasons: - it is physical in nature. Programming the world is a lot more interesting than building software that ends up looking crappier than what they can get on the AppStore for free - it feels like magic to see something in the real world react to inputs without human intervention. The tree has only blinked one for impending snow but one would have thought Santa came shooting out our fireplace with his ass on fire based on their reaction - it provided just the right level of abstraction for an 11-year old. Web scraping on one side and calling a REST interface on the other. And to boot, having permissions to stick wires in outlets is an 8 year old's fantasy!
Finally, I've done hardware projects with them before but it turns out that the key was doing one which could become a permanent part of the house infrastructure as crappy robots tend to suffer the same fate in the face of real toys that beginner games do with AppStore high gloss alternatives.
This was also my first foray into the Raspberry Pi which is a wonderful device (admittedly still suffering from production/yield problems) due to the fact that it is a full computer in a small little box with just enough input/output to control the physical world. Am looking forward to more of these.
Go check it out— the RPi infused programmable Christmas tree.
Postscript: I owe Avi Flombaum a big thanks for being the inspiration for this project. He not only gave me the idea of making webscraping a core part of the curriculum but opened my eyes to how much of what gets put in front of kids in the name of programming pedagogy is abstractly condescending at counterproductive when it comes to sparking the flame for this stuff.