This qualifies as both useful and cool.
Last summer, Apple surprised almost everyone at WWDC with the announcement of Swift, a new programming language for iOS and Mac development.
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. For those beginning to work with Swift, the Swifty App provides an interactive set of tutorials that gradually guide you through the basics of Swift on your iOS device.
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, 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.
Swift is available for US$2.99 to unlock every lesson, albeit the first 13 tutorials are free. The app requires a device running iOS 7.0 or later to install and run.
If you’ve tried Swifty and have any feedback to offer, let us know in the comments.
Via TechCrunch and Swifty