The language feels like something Apple would invent. Like several of the languages currently popular in web development, it has a concise, readable syntax that’s easier to pick up than Apple’s older language, Objective-C. It was engineered by Apple’s compiler experts, so in addition to being compatible with existing code and Cocoa libraries, it’s also faster by some metrics.
But even though Apple’s tagline for the language is that it “lets everyone build amazing apps,” no novice is going to pick up Swift and get to coding full-on iOS or Mac apps without some guidance.
To that end, Apple and its developer community have done a heck of a job getting lessons out there. The same week Swift was announced, Apple released a version of Xcode with support for the language, released a free book detailing the syntax and launched a blog with posts detailing updates and best practices. Even the beloved Stanford iOS course shifted from Objective-C to Swift.
For those just starting their journey into the world of coding, however, those resources are still intimidating to jump into. Enter Swifty, an app that provides an interactive set of tutorials that gradually guide you through the basics of Swift on your iPhone or iPad.
There are more than 200 tutorials in Swifty, starting with the very basics of variables and data types and progressing to the essentials of object-oriented programming. Obviously the iPhone keyboard isn’t the best tool for cranking out lines of code (especially if you’re just starting out), so creator Johannes Berger came up with an interesting interface that looks and feels like coding while actually acting more like an interactive quiz.
Each tutorial in Swifty starts with a one-to-three-sentence explanation of a new concept or an important aspect of a concept previously covered. Below, you’re shown a few lines of pre-written code, with a blank field where some vital name, type or value is missing. When you tap it, it lets you choose from several options. If you choose one of the correct options (sometimes it gives you several that work to demonstrate different output), it “runs” the code and shows the result.
Now, the output from the “console” at the bottom of the screen is pre-written — you’re not actually writing working code in the app. But the format quickly gets you comfortable with the look of Swift code and things like naming and accepted styles for creating blocks of code in functions or classes. While it might be a bit difficult for me to judge given my prior experience with the language and coding in general, I think most novices could jump into Xcode’s “Playgrounds” and muck around with simple text-based projects after an hour or two of using Swifty.
It’s clear that a lot of work went into making Swifty as accessible as possible, and that the app is worth the $2.99 to unlock every lesson if you spend some time on public transit that you’d like to use to become more familiar with Swift. If you’re not sure about the app (or even learning the language itself), you can make your way through the app’s first 13 tutorials for free.Featured Image: Swifty