Subscribe / Unsubscribe Enewsletters | Login | Register

Pencil Banner

Meet Swift Playgrounds, the learn-to-code iPad app that feels like a puzzle game

Susie Ochs | July 15, 2016
Apple's first foray into teaching kids how to code is a triumph.

swift playgrounds ios10 functions praise

The app is extremely encouraging, and constantly reminds you that you're learning a real skill. 

The whole experience is heavy on praise, which made me want to keep going lesson after lesson—it’s really motivating! And a progressive Hint button cuts down the frustration factor if you do hit a wall. At first, the Hint popup offers ways to think about the challenge. If you need more help, it will supply clues about how to break down the challenge into parts, and finally just shows you the correct code if you’re really stumped. But you can’t copy and paste from the Hint bubble into the code editor—you have to type it out manually, which will help you learn.

It’s a lot of fun to tinker Swift Playgrounds, learning the concepts behind making good code as well as the syntax, but your code isn’t trapped there. You can record and share movies of your code, even give them voiceovers bragging about your skills, or even share entire playgrounds via AirDrop, Messages, and Mail. The iPad isn’t a full development platform just yet (and naturally, Apple wouldn’t discuss its plans for the future), but you can also export code from your playgrounds back into Xcode on the Mac.

Why it’s so unique

Apple introduced Swift at WWDC in 2014, and made it open source this past December. It’s already being used in more than 100,000 apps in the App Store, including heavy-hitters like Lyft, Slack, and Strava. “We’ve gotten a great response,” said Hodges, adding that Swift is the fastest-growing programming language.

The benefits of Swift is that it’s fast and powerful like compiled languages like Objective-C, while also being more friendly and easy to read like a scriping language. Commands and functions are built with human-readable words. My first encounter with writing code was back in the ’80s, when I learned BASIC at a summer day camp for nerdy children, and I loved how I could tell what it was going to do before I actually ran it, just by reading the code. Swift reminds me of that, and Swift Playgrounds’ splitscreen view makes that visualization even easier, the code listed on the left, next to the virtual world where it’ll run.

In fact, Swift Playgrounds is (naturally) written in Swift, and the code you create in the code editor is inserted directly into the program running on the right side of the screen. Once I accidentally deleted a bracket and broke the code. It wasn’t a problem of the onscreen Byte character not reaching his goal because I’d given him the wrong commands and sent him in the wrong direction. He wouldn’t move at all until I fixed the syntax, an in-my-face reminder that every keystroke matters. The game world uses SceneKit, Metal, and 3D acceleration, the same technologies used all over iOS.


Previous Page  1  2  3  4  Next Page 

Sign up for MIS Asia eNewsletters.