Swift Playgrounds

It’s about time Apple joined the Coding Revolution – with Raspberry Pi, code.org and Google running projects for years, it was only a matter of time before something was released. And boy is it a good one… with glossy graphics and slick tutorials, Swift Playgrounds has certainly hit the ground running as a way to teach coding concepts to pupils on an iPad. However, it’s not without faults, but then nothing is, so let’s take a look.

A few weeks ago, I visited Apple HQ in London along with a few CAS Master Teachers and various CAS reps and teachers. As it turned out, the majority of attendees were primary school teachers, which brings us to the first flaw in the Swift Playgrounds roll-out. The first thing we were told about it was that it was primarily made for Year 7 pupils and older and this becomes clear when you work through activities as the vocabulary is very dense and would certainly lose many younger pupils. However, the look and feel of the app is very primary-friendly which is why most of the secondary school teachers hadn’t shown an interest, assuming it was ‘not for them’. Indeed, a primary ex-colleague of mine was recently shown Swift Playgrounds and after about ten minutes, decided it would be the perfect way to teach KS2 coding, unaware of its secondary-school target audience. When you spend some time playing through and looking at it, however, you begin to realise that it is indeed best suited to KS3, particularly because of the skills it is highlighting and teaching.

So, you can see very easily just how much effort Apple have put into Swift Playgrounds and how determined they are to make it a useful classroom tool. Not only is there a wealth of content that is easy to download, there are accompanying iBooks full of Keynote presentations, information, progress charts and comparisons to the CSTA standards. Information is made as clear as possible and it is quite fun to play the games. You can explore the current playground challenge by rotating, zooming, changing angle etc. Code is presented in text boxes with lines and phrases of Swift pre-written in them, and it is still drag and drop so that pupils become familiar with the language without having to write it by themselves. This makes coding and debugging easier when they are ready to move on to independent coding. You are also able to select a different character and alter the speed at which your code is run, which adds an element of personalisation.

img_0003   img_0004You can see here the interface for downloading lessons and a selection of the different types of lesson, including one for Hour of Code. There are some interesting resources that are worth exploring as all of them are slick and well made.

 

The first tutorial is called ‘Learn to Code 1’ and it talks you through using the interface from the beginning. img_0005img_0006

At the start of the game, you are limited to a few commands, but as you move through you are offered more commands and, in the second section, you are shown how to create your own commands, or functions.

img_0007

Now, one thing that was picked up on the training that I attended was that the US curriculum for Computer Science places more emphasis on explaining functions than on the word algorithm, which is different to the UK curriculum, where algorithm is considered a core word for coding and function is a later skill to learn. It is worth bearing this in mind as Swift Playground is geared towards the US curriculum. However, this isn’t necessarily a bad thing.

Let’s take a look at the code needed for ‘Four Stash Sweep’, which is approximately halfway through Learn to Code 1, with my solution to the problem included.

My solution is certainly not the most elegant, but it does demonstrate the complexity of some of the easy tasks, I can’t imagine doing this with primary-age pupils without a lot of support – I’ve had to write three functions to make my code more efficient as well as understanding ‘for i in range’ as a loop. Don’t get me wrong, I’m not complaining about the content, but it does make it clear that Apple are right to pitch this as a KS3 resource in spite of it looking like something for the juniors. It is definitely teaching text-based coding concepts, even if you are dragging the blocks of code into place.

A bigger problem lies in its running speed. When I tested it at Apple, it worked really smoothly, everything was simple and easy to use, but of course we were using brand new iPads. In contrast, when I used it at home on an iPad mini 2, it was slow and frustrating at times. The iPad mini 2 is the minimum specification device required to use Swift Playgrounds, along with the iPad Air, meaning that some early-adopting schools are already feeling excluded unless they upgrade their iPads. Perhaps those schools should consider upgrading them, but it is upsetting when there’s no budget to do so.

So, what next?

Apple are marketing Swift Playgrounds as a way to get to grips with Swift, their open-source language which allows users to create apps and content for iOS and macOS. This is very appealing to schools and young people because, let’s face it, who doesn’t want to be the next app-store millionaire. Making learning goal-orientated makes it instantly more fun and so to present to pupils that they could eventually make a real-life app will certainly inspire them to get more interested in learning to code. The fact that when you use Xcode to write Swift, you can use a playground to test your code, is deliberate to draw a link between Swift Playgrounds and the more ‘real’ Xcode environment and is a clever move by Apple, albeit one that confused existing users as to which playground was which. Swift works across multiple systems, including Linux and therefore Raspbian and I look forward to hearing about some Apple/Raspberry Pi crossovers in the future – perhaps we’ll finally see a RPi physical computing project which is controlled from an iPad!

Where does it fit?

My gut instinct is that Swift Playgrounds would be a great tool for a flipped learning environment. Pupils could work through the game in their own time and come to school armed with questions. Teachers could discuss concepts and offer their class challenges based on the skills they’ve practised at home while using the app. I think it is a great tool for KS3 programming and a lovely way to introduce pupils to the world of programming. I would worry about a whole class just sitting and plodding through in the classroom without the teacher bothering to be involved and it would far too tempting to just sit back and let them get on with it which is why I think it would be better suited to independent work outside of the classroom so that the teacher could focus on discussing the skills and developing them in the classroom.

My initial concern that it was a little too restrictive, like Discovery Coding, have been dispelled and I think there is plenty of opportunity for pupils to explore and create once they have learnt the most basic skills. There are some lovely, interesting resources already available (I recommend taking a look at ‘Drawing Sounds’ in the Swift Playgrounds ‘featured’ tab which you can download and play with) and I look forward to exploring and creating my own playgrounds once I’m more confident and perhaps after I’ve worked through all of the ‘Learn to Code’ modules.

 

 

 

 

Published by Cat Lamin

Please note, all views expressed in this blog are entirely my own and in no way reflect the opinions of my workplace nor any other agency.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: