Friday, January 10, 2014

Learning How to Code by Not Coding

I recently had the delightful opportunity to lead my daughter's 6th grade STEM class through a Technovation "Hack Day". This was not an advanced / accelerated / honors class...just an assorted group 24 sixth graders, ages 11-12 from the western suburbs of Minneapolis.

And all girls.

We spent the entire school day (9am - 4pm) developing apps with AppInventor (more on that below), and it was a rousing success. The kids stayed focussed, on task, engaged, and excited about coding. They went from knowing nothing about the platform (not even having a user account) to having apps on their (emulated) phones that displayed images and playing sounds downloaded from the web, accepted input from the accelerometer, took pictures, and even spoke to them.

Now, there was no actual coding per se. There was very little in the way of actual typing: mostly dragging and dropping UI elements and programmatic "puzzle piece" code blocks. But there was also no frustration due to typos or syntax or compilation errors. They got a great introduction to object-oriented programming -- including such core concepts as objects, events, procedures, encapsulation, and separation of concerns.

AppInventor is an offspring of Scratch, developed by MIT to allow users to create programs without programming. Previous iterations of AppInventor were unstable and a bit buggy, but I found the new 2.0 version (released this month) to be stable, polished, and (mostly) user friendly.

The special sauce that makes AppInventor extra cool include the following:
  1. It's totally web based. Kids can start a project at school, finish at home, and present it at school the next day.
  2. It's totally free!
  3. You can run your apps right on your Android device via USB or wifi, or on your computer in the Android phone emulator (which was slow and a bit tweaky).
  4. It creates Android apps that you can share with friends that will run on any Android device - phone or tablet.
  5. You have access to a most of the device's hardware capabilities:
    • Camera (still and video)
    • Audio Player / Recorder
    • Speech Recognition / Text to Speech
    • Accelerometer / Orientation
    • Barcode Scanner
    • Location Awareness
    • NFC
    • Contacts
    • Communication via Phone, Email, Texting
    • Social Sharing with Twitter
    • Local and Cloud DB Storage
    • Bluetooth (Client and Server)
  6. It integrates with LEGO Mindstorms for cool robotic projects (although I haven't gotten to try this yet).
  7. Did I mention it's totally free?
While it's reported that any Android device can be used with AppInventor (e.g. Kindle Fire, Samsung Galaxy phones), you may end up having to either sideload your apps (not too hard) or root your device (if you're ambitious and don't mind voiding your warranty). I think you'll have the most success if you use a Google Nexus device, which will sport the "pure" Android experience with the latest updates and patches (and no extra software from the manufacturer or carrier which might cause problems). I have a Nexus 4 (that I purchased to use for my Google Glass R&D), and it has worked flawlessly. The Nexus 7 tablet is currently going for $229, and the Nexus 5 phone goes for $349 (both 16Gb) on the Google Play store.

So for a couple hundred bucks, you can be up and running with some great tools for rapid prototyping or experimenting on mobile apps. I recommend you check out AppInventor, and walk through the Hack Day curriculum with your Geekling.

NOTE: Being a bit of an Apple fanboy, I’m disappointed that there’s nothing similar (that I’m aware of) for the iPad and iOS. The closest thing I've found so far is an app called Codea that utilizes Lua script. Watch this space for a review of this app sometime soon.