Press the button. Slide to unlock. Tap the icon. The app or game fills your screen — and your senses. But how does that happen? How does that icon get on the screen? How does that bird fly across it? How does that plant obliterate that zombie? How do all these apps and games work? The answer is "code". And Apple's free Hour of Code workshops were designed to introduce kids to just that.
Apple's been doing Hour of Code for a couple of years now. New this time is Swift Playgrounds, the revolutionary app that shipped alongside iOS 10 for iPad back in September. Updated to version 1.1 to coincide with the event, and with new and improved lessons to go with it, it makes the same kinds of code used to create next-generation iPhone, iPad, and Mac apps accessible to everyone.
I returned to the same Apple Store I went to last year to see how things were progressing. Once again, kids and adults alike began filing in a short time before the workshops began, their spaces reserved online over the course of the last week. Parents accompanied the younger children, helping them find stools around the large wooden tables. At one end, a TV set stood with the Hour of Code material displayed for the whole store to see.
At each stool were were iPads minis, loaded with the course material and ready to go. The kids took their places and were additionally given headsets so that they could hear sounds and videos above the din of the store. An Apple specialist led the group, supported by several other Apple Store staff members circling around and helping out.
The one hour workshop consisted of a series of code-based puzzles the kids needed to solve. The puzzles used characters and imagery from popular games like Angry Birds and Plants vs. Zombies. Instead of focusing on the nuts and bolts of coding and forcing kids to write brackets and if statements, however, the children were asked to build pre-created modules, much like an Automator or Workflow module. They simply dragged blocks of code from the Code.org sidebar to the main canvas — code that told their on-screen characters to move or turn, as well as how much or how often.
Between puzzles, the kids got to see short videos from the likes of Bill Gates and Mark Zuckerberg, who emphasized the empowerment behind learning to code.
By allowing the kids to directly manipulate coding blocks on the iPad mini, it let them build an app without necessarily getting into the nitty-gritty of code writing, and the success of problem-solving a difficult puzzle left the kids excited to move on to the next adventure. The large Apple presence in both the Montreal and New York City stores we visited also meant that the children received a lot of personalized attention; they had to work to progress, but never had to feel like they were being left behind.
The kids weren't the only ones learning and growing: Many parents became enthralled. The puzzle-based aspect to the coding lessons gave parents a way to help their children, even if they weren't already familiar with code theory. But, at the same time, it gave those untrained in the art of coding a window to potentially learn the fundamentals and encourage growth in their children in the future.
At the end of the hour, the kids were told that they could keep their headsets, and everyone lined up for a group picture. To a kid, they all wished it could have lasted longer. "Why couldn't it be two hours of code?!"
The workshop may not have been designed so that they could leave and go program the next Angry Birds or Plants vs. Zombies, but all of them wanted to. Whether or not any of them end up becoming developers, they all learned that — if they put in the work — they could.
It might have been an hour of code, but the spark it lit could last a lifetime. That's what makes programs like code.org and App Camp for Girls — and tools like Swift playgrounds — so important. They help inspire and enable the next generation of coders.
Furthermore, these programs open the doors for adult mentors to help guide kids on the path to programming, even if they don't necessarily have high-powered coding backgrounds themselves. In the preface to Carl Sagan's book The Demon-Haunted World, Sagan talks about his parents being his most important teachers in helping him pursuing astronomy: They may not have had backgrounds in astrophysics, but they encouraged him to question the world, and that gave him the drive to push forward, to discover, to explore.
If programs like Code.org's can help parents translate the importance of coding to their children, they don't need to know how to formulate for loops or understand what variables are useful for. It all comes down to curiosity and problem-solving.
If you couldn't get to Hour of Code at your local Apple Store on Thursday, here's a sample of what the workshops covered. There's also lots more to explore on code.org, so you can keep coding for hours and hours to come.
Photos by Serenity Caldwell.