Developing Swift Playgrounds Course Material

Developing Swift Playgrounds Course Material

Since the release of Swift Playgrounds at WWDC in June 2016 I have been madly learning how to develop playgrounds so that I can utilise them in the courses I teach.  This has meant not only learning the markup, but also converting my resources over to Swift 3 with very limited documentation.  In this article I would like to share some of what I have learnt from developing these playgrounds and the surrounding course material.

First Movements

At first sight I was very impressed with the Swift Playgrounds.  I have done lots of development work in Python and I have tried to find iPad compatible apps which I could do all that I wanted to.  Pythonista was the closest to an a decent Python IDE, but we were always limited with the libraries which were made available due to executable permissions or sandbox limitations on the iOS platform.  So far I have not found this to be the case for Swift Playgrounds. I have been able to utilise all of the main core libraries that allow students to make interactive applications (i.e. SpriteKit, Physics & UIKit).

I also found that the "Learn to Code" fundamental courses which are featured and made available in the app cover the basics of the syntax in a detailed and interactive manner.  For this reason I didn't find it necessary to develop any materials at this level.  Instead, I developed courses which would teach students about some of the core libraries that will allow them to extend their programming knowledge and bridge the game into developing on a desktop machines.

Change of Approach

When I first started developing Swift Playground course material I was hell bent on trying to replicate the glossiness of the featured Playgrounds.  I spent a long time on markup to hide and reveal code so that students could progress in the course even if they hadn't met the requirements completely right, however, when testing the Playgrounds with students I found that they were just writing snippets of code and had no understanding about the Model-View-Controller (MVC) which is important for when they take the next leap into developing apps for publishing.  They also had no understanding of where the current function was sitting within the grand scheme of the project.

You can see in the image below I have hidden a lot of the code which would give the students a "solution" for the previous task, but I have included the ViewController class so that they can see where this code is sitting relative to the project.  I have found this to give the students greater understanding without over complicating the process.

Later on I would like to develop courses for more senior students which would give them even more control over the playground, making the entire code "editable" so they develop their project over time.  This is more in-line with the way they learn as they build a project in Xcode and will prepare them for the inevitable step of developing apps for publishing to the app store.

Distributing Playgrounds

Swift Playgrounds has a lot of really neat features which will allow teachers to access student learning.  From the app students are able to; Record a Movie, Broadcast Live and Take a Picture of their work.  They can even share the entire Playground file over AirDrop or upload it to an LMS.  In a recent update Apple has also included iCloud support for Playgrounds which means that a students progress is saved and backed-up which will mean we won't have to hear about any "digital dogs" eating homework.

Those solutions are great for students submitting, but how do we get these Playgrounds into the students hands along with any support materials? 

I have decided that the best distribution method for me was to develop an iTunes U course for each of the projects.  This allows me to distribute the Swift Playground file to my students easily, but I can also add the resources along the way.  Within iTunesU the courses aren't static, so I can post additional help videos, documentation and links to websites without embedding them into the Playground itself and re-distributing to the students. iTunesU also had discussions which will allow students to ask questions and answer each other questions.

One of the main frustrations in this process has been the Playground file itself.  At the time of writing this post (before iOS10 was released) Apple does not currently support the uploading of Playground files to iTunesU. This has meant that I need to upload it to dropbox and share the file ... not ideal... but it works. 

Feedback

I have made my courses and these materials public and I invite all constructive criticism and feedback so I can make improvements for the benefit of my students. 

The courses will eventually be available on the public catalogue, but in the meantime you can access the course materials and the playgrounds from the iTunesU courses listed below.

Blackjack with Swift Playgrounds

Blackjack with Swift Playgrounds

Web 2.0 Tools to enhance student learning

Web 2.0 Tools to enhance student learning