A Quick look at Playground and Xcode 6

June 18, 2014 | Stefan Mischook

If you are going to write Swift code, you are going to use Apple's development environment: xCode. In Xcode 6 you will find an interactive tool called Playground. Basically, this is a 3 panel window that allows you to see your code in action as you write it.

Let's take a closer look at Playground:

You can see Playground in the screenshot on the right.

1. The Swift code can be seen in the far left panel. 

2. The middle panel (with the gray background color) displays real-time responses from your code ... this is very useful for debugging and it's also great for learning to code because you can see how your code is actually working.

3. Finally, in the far right panel, you see the result of all your code as it would appear on a device - either an iPhone, iPad or iPod Touch.

As you change your code, the results of those changes will be instantly reflected in the middle and far right panels. Because of Playground (and Swift's easy to understand nature) I believe that Swift might be an ideal language to use to teach kids how to code.

Cool stuff.

Stefan Mischook
swiftplayground.org

 

comments powered by Disqus