Coding at Home: Part Two

In Part One, we looked at a relatively painless way to talk about and experience variables.

Swift Playgrounds from The Code Hub

One of the other little tweaks we’ve just shipped is an update to our Text Adventure Playground. But let’s start with a little (re)introduction of Playgrounds, for the uninitiated.

If you didn’t already know, The Code Hub has a suite of Swift Playgrounds for use in the iPad (and now Mac!) Playgrounds app. When you download Playgrounds, which is a free download, you’ll see a bar along the bottom of the screen with the headline “More Playgrounds.”

More Playgrounds!

Apple provides an excellent array of playgrounds authored to teach you how to code, to learn augmented reality development. Or some innovative uses of content and code like the Cipher playground. The app is free, as are playgrounds you can download from Apple and third parties (like The Code Hub).

But if you are on an iPad and go to https://thecodehub.ie/playgrounds/ you can click on the Subscribe button to add The Code Hub’s suite of playgrounds to the app. Alternatively, on the Mac version of Playgrounds you can scroll to the bottom of the additional playgrounds and you’ll see the option to enter a subscription URL:

Enter in www.thecodehub.ie/playgrounds/feed.json and you’ll be good to go. You’ll see a confirmation dialog like this:


And, once you hit Subscribe, you’ll see a list of our playgrounds.


Right now, the 18th of March, 2020, we have six. I’ll try and touch on each of them in the next few weeks. But for now, you can download any of them onto your device and play around with them. There is a bit of explanatory text for each of the playgrounds, so you won’t be left completely at sea.

It helps to have a bit of Swift knowledge, but that, too, I’ll be touching on in the coming weeks.

Stay tuned.

CESI Conference 2019: Using Swift Playgrounds for Creativity in Coding with the Code Hub

https://www.thecodehub.ie/cesi

I finally made it to CESI Conference, a gathering of educators across Ireland who are doing some inspiring stuff with and for their students. They’ve developed a supportive, engaged community of practice around the use of computers and technology and how they can be applied in teaching. This conference is a crown jewel (along with the CESI*CS meetups run by Dr. Millwood). Last year the beast from the east snowed out the conference and the makeup date fell on a date I just couldn’t make, and I had to back out of my planned talk on Turtle Graphics on the iPad.

Turtle Graphics on the iPad 2018

So I was delighted that this year’s conference theme was “Creativity, Collaboration, and Computers: Practitioner Perspectives” and that I had a good deal to talk about in that space. My talk on using cross-curricular Swift Playgrounds in your classroom is a way to introduce coding in a fun, creative way. Now, I was slightly less delighted when I had to shift my talk from the afternoon to the morning to try and make it back to Dublin for a poetry feis, especially as the shift happened after the schedules were printed, but the CESI staff were super accommodating. They even gave me an extra half an hour for my slot! And the attendees of the workshop were diligent in tracking me down from room to room. Some of them have careers as hunting dogs, should the teacher thing not work out.

Creative Coding

The talk part of the workshop went into my background and how the material for The Code Hub has grown over the years. The most compelling reason for me to start a new project isn’t coding for the sake of coding but it’s most often to solve a problem or scratch an itch I feel acutely, and the goal of the Swift Playgrounds I highlighted was to showcase a variety of problem-solving scenarios that might hook a student’s imagination.

We explored playgrounds related to the visual: turtle graphics, Apple’s Puzzle World and Learn to Code playgrounds.

We looked at a few playgrounds that are more text-based, like the Answers playground from Apple, the Shakespeare insult generator, my own Text Adventure playground, and a cool escape room-like playground from some educators in Spain.

The Cipher playground from Apple deserves a special call-out for its story-telling aspect and most approachable crypto content I think you’ll find anywhere.

We looked at playgrounds that use the iPad sensors like the Augmented Reality and the Sensor Create and Arcade playgrounds from Apple.

Because they’re adding things to or interacting things in the room in which they sit, these are great resources for paired (or more) use. I love the buzz in a classroom when we use these playgrounds as kids are up walking around, showing off the world they’ve superimposed on our own.

I’ll post the slides at some point in the near future, but in the meantime I’ve posted the links to the resources I used at https://www.thecodehub.ie/cesi.

So stop by, grab an iPad and subscribe to a few of the playground feeds listed there and try them out!

Get Creative with Code @ Dalkey Creates!

It’s been a busy October already at The Code Hub with our October Learn to Code session in full swing and a visit to Harold Boys National School for EU Code Week on Wednesday. Now we have our eyes set on Saturday, the 13th of October, for our sessions at Dalkey Creates, at Harold Boys National School in Dalkey.

Dalkey Creates
Dalkey Creates

We’re running three hour-long sessions at Dalkey Creates from 2-5pm on Saturday.

I’m particularly excited about working during the festival because I think using technology to express ourselves creatively opens up wonderful possibilities. That the festival have allowed us to run coding workshops alongside some amazing writing folks is a real treat and shows a real open mind.

Our box of goodies
Our box of goodies

We’re going to cater our work to all levels of programmers, from novices who have never coded a line or even heard of coding before to experts who are coding their own games and apps. We’ll explore some of the sensors and functionality of our iPads to place 3D characters (like our beloved Max the Fox, from Apple’s sample code). We’ll play with Sphero’s SPRK+, a little ball of a robot that lights up a room and can make slow shutter art. For all of it we’ll use Swift, which is the same programming language you can use to make apps for your iPhone, iPad, Mac, AppleTV, or Apple Watch.

Coding doesn’t have to just be about STEM, and we’re going to show you its Artsy side on Saturday. Our hope is that we introduce a new generation or two to the creative possibilities where they might have previously just seen a device for consumption.

Max the Fox
Max the Fox

Come Visit!

If you’re in Dalkey this weekend, be sure to check out any of the events on around town and then stop on by the Harold Boys school hall, where we’ll be getting creative with code!

And if you aren’t, it’s well worth a trip out on the DART, Dalkey is a gorgeous little village in South Dublin County. You might get a little bit wet with the weather, but then you can always pop by and get dry with an iPad and Swift Playgrounds…

Up Next

Up next for The Code Hub is another EU Code Week event at Loreto National School in Dalkey on Wednesday, and then we’ll be presenting two sessions at the Berlin Swift Educator Summit, put on by Apple on the Friday and Saturday. So if we don’t see you in Dalkey, maybe we’ll run into you in Berlin!

Authoring Swift Playgrounds Subscription Feeds

WARNING: Technical content ahead. This one is for those people monkeying around with their own Swift Playgrounds for teaching or just for fun. 

If you, like me, author Swift Playgrounds, you might want to use Apple’s new subscription format to distribute your playgrounds to people. You can visit https://thecodehub.ie/playgrounds/ on an iPad and our first three playgrounds will show up on your device.

Subscribing to Playgrounds
Subscribing to Playgrounds

There are some great tutorials and tips for writing playgrounds out there (Andy Shep has some excellent advice on the subject). In the future I’ll go into how I made the Code Hub Swift Playgrounds, but for now, I have a tip for debugging the feed format.

Creating (and Debugging) a Swift Playground Subscription

With the latest version of Swift Playgrounds, you can create a feed so that your content shows up in the list of playgrounds available to run. That link will give you a bit of insight into the nitty gritty of how you need to format your feed, but for a really clear walk-through it’s worth watching the “Creating Your Own Swift Playground Subscription” session from WWDC this year.

All of which I did, but I really struggled with a feed that just wouldn’t work and presented me with a very generic failure message. So I filed a bug with bugreport.apple.com and waited. In the latest version of Swift Playgrounds you can now go to the preferences for the app (through the System Preferences app) and toggle this little switch:

Authoring Debug Mode
Authoring Debug Mode!

Suddenly I was getting far more useful error messages like this:

Ah ha!
Ah ha!

And that was it! Now, you want to make sure you read through all the keys and acceptable values in the feed format closely. There are quite specific sizes for your thumbnail, preview, and banner images. The content identifier, version, and name in your Manifest.plist must match the values you put in the feed.

The Manifest.plist
The Manifest.plist

But once you’ve taken care of the details, it’ll be a piece of cake for people to install your playgrounds.