Learn how to code with swift playground


Have you ever tried to code? Of course not - you’re not a super-geek software developer, right? Those days of assuming that code is for programmers really are over. For a few years now, a lot of attention has been focused on coding programmes like Swift and Objective C; and now there is a new coding language that may just be everyone’s beginners course in programming. Learning to code teaches you how to solve problems and work together in creative ways. And it helps you build apps that bring your ideas to life. Welcome Swift Playgrounds.

Swift Playgrounds is An iPad-only app, compatible with the following models: iPad Mini 2, 3 and 4; iPad Air and Air 2; and both the 9.7-inch and 12.9-inch iPad Pro. It's inspiring to think that the iPad you purchased from iStore has now become an exceptional learning tool for you and your kids to experience and potentially master code, the language of technology.

When you launch the app, you'll see a Featured tab with a gallery of highlighted lessons. Each set of lessons is called a “Playground." The app has two basic modules, 'Learn to Code 1" and "Learn to Code 2." If you’re helping a youngster or you’re newbie to coding yourself, we suggest “Learn to Code 1”.

Within this Playground, you'll learn basic Swift commands by guiding Byte, an interesting little character, around to solve puzzles. The screen is split in two; one side shows the code, while the other is a live view of Byte and his 3D world. Swift Playgrounds takes full advantage of the power of Multi-Touch capabilities; just tap, drag, or type text and numbers and then interact with what you’ve created. You can also bring up the QuickType keyboard at the bottom of the screen to enter in custom text. The first few lessons are pretty easy. To get started, all you do is compile a few simple commands like moveForward(), turnLeft() and collectGem() to get Byte moving the way you want. Once you're happy with your list of commands, you can simply tap "Run My Code" to see if it works.

The best part about Swift Playgrounds is, there is no right or wrong. You can create the most simple or the most complex code that your heart desires, as long as you complete the task, whether its collecting gems or toggling switches. But if you do get stuck and need a little assistance, you can look up the answer. No harm, no foul.

An important thing to note is that the language you're learning on Swift Playgrounds is real code. So, even seasoned programmers can use it to create a prototype of an app. From there, you can transfer that code via iCloud to Xcode. "When we first created Swift Playgrounds, we wanted to really inspire the next generation to want to learn to code," said Cheryl Thomas, Apple's Vice President of Software Engineering Operations. "It reflects an Apple engineer's viewpoint and perspective on the best practices on how to do so."

You can also share your achievements. Send your code to a friend’s iPad using Mail, Messages, or AirDrop. They can then view it in Swift Playgrounds and even build on it by adding their own quirks. You can also post a video of your running programme online for the world to see.

The possibilities are practically limitless when it comes to Swift Playground, so download the app and get coding. All the cool kids are doing it.

Share this story