Dalkey CoderDojo: Swift Programming at Fitzpatrick Castle

After all the coding sessions we ran in and around town this autumn, we decided that a one-off CoderDojo session for the Dalkey Dojo would be worth running to see if we couldn’t interest a few new mentors to join and help us run future sessions.

Setting up the iPads
Setting up the iPads

I managed to borrow 15 beautiful 12.9″ iPad Pros off the folks at Apple and we booked a two hour session at the Fitzpatrick Castle Hotel, where we normally hold our sessions. But instead of an Arduino focus, which is the usual subject matter at the dojo, we were going to let the kids explore Swift and Swift Playgrounds:

The ninjas will be able to explore coding with Swift to a variety of ends. They can learn the fundamentals of coding, they will be able to use code to master drawing with simple commands, they can program a robot in a variety of ways, or they can play with augmented reality and code.
As far as material went, we used some of the new challenge cards Michael O’Kane developed, like the Titanic Journey Challenge, the Traffic Lights Challenge, and his cool Roald Dahl Challenge.
Our Swift Stations
In addition to those exercises, we had the new, just released Hour of Code Swift Playground to play with, the previous one, the Rock, Paper, Scissors playground (all of which you can get yourself when you add a new Swift Playground and go to the Challenges tab). We also had a couple Sphero SPRK+s, which were a huge hit with the kids (I only have two and had to implement a queue for the kids waiting somewhat patiently for the chance to play around with them). And then we had two playgrounds of my own making, the ARKit one with Max the fox, and my new Fundamentals of Programming Swift Playground.
All in all, it was a fun, programming-packed two and and half hours, even, if, by the last fifteen minutes or so we wound up with some programming fatigue and started getting creative in… other ways:
iPads, All the Way Down
iPads, All the Way Down

European Code Week, Part Two

So in addition to the hour of code at Harold Boys’ National School in Dalkey, I also ran an hour of code event down at Loreto Primary School in Dalkey.

Loreto Primary School

This one happened after the excellent DojoCon2017 in Warrington, and was the capper on a pretty code-heavy month.

There was a ton of parental support – 10 parents! – which is always great to see, but we also covered 2nd class through 6th, a total of 10 classrooms full of students. Since we did Minecraft with them last year, I wanted to have them work on something a little different. The school is equipped with Microsoft and Samsung tablets, so I had them go back to the code.org well and we did the Anna and Elsa Hour of Code challenge for everybody except the second class (who got to do Minecraft).

Due to other commitments (like DojoCon and the other Hour of Code session in town), we didn’t do a presentation like last year, but instead I demo’d Max the fox, from my ARKit playground, and nearly got trampled each and every time as all the kids ran up to first see the fox and then stand in front of the camera so that their friends could see Max standing on top of them.

The girls were amazing, as were the parent volunteers, and I really appreciate the willingness and eagerness of all the teachers I’ve run into in these last two years to try something new out in the classroom and engage with the technology themselves, all in the name of exposing the students to new avenues of learning.

DojoCon 2017: App Development with Swift

I was very lucky to attend DojoCon 2017 over in Warrington, in the UK a few weekends ago (quite a few, now), where I ran a workshop called Intro to App Development with Swift.

DojoCon 2017

The idea was that Apple have these fantastic resources you can download and explore, either on your own or guided by a teacher (or guiding, if you’re the teacher) at their Everyone Can Code website.

The App Development books (available for free on the iBookstore) come with teacher and student guides, both of which have project ideas and implementations to download to help you through learning how to develop apps for iOS.

So they kind of work, whether you’re using the material in your classroom (or with your kids at home) or in a Dojo, where the focus is more on projects and giving the kids more loose guardrails to travel down.

    • QuestionBot — Develop a personal assistant who will answer all your questions 🤖
    •  MemeMaker — Dazzle your buddies, frighten the cat with the memes you cook up! 🕶💥💕
    • Rock, Paper, Scissors — Build your own rock, paper, scissors game to play with your friends! 👊✋✌️
    • FoodTracker — Build your own food rating app for remembering those stellar meals!

All of these projects, bar the FoodTracker, are part and parcel of the App Development with Swift curriculum, and Food Tracker can be built according to the guided tour here: https://developer.apple.com/library/content/referencelibrary/GettingStarted/DevelopiOSAppsSwift

If you want to follow along with the stuff I walked the mentors through, now you can, with this handy sushi card at CoderDojo’s Kata website.

In fact, if you want more than just Xcode development, you can bring Swift into your Dojo with Michael O’Kane’s excellent challenge cards, as well, joint announced on the CoderDojo news page just a few days ago.

Musical Lights

I really like the demo Michael O’Kane highlighted  where someone has programmed two Sphero SPRK+s to flash their lights to U2’s “Pride (In the Name of Love)” with Swift Playgrounds.

I think it’s a great exercise.

But I was thinking, what if you could listen to the song with an AVAudioPlayer and react to the average power on each channel of the audio?

It’s a work-in-progress, but here’s what I have so far:

Musical Lights from Matthew Hanlon on Vimeo.

European Code “Week”

European Code Week is this 7th of October through the 22nd (this is a week by European standards? In binary? I blame ex-Hurricane Ophelia for sending us time traveling so that we only actually got 7 days during that span of the calendar).

Ready to go at Harold Boys'
Ready to go at Harold Boys’

The boys at Harold Boys’ National School in Dalkey have already written up this event, but they ran through an Hour of Code with the basketball-building game at Codersters.com. I like Codesters Python editor because the boys were led down a path to writing Python code, with all of its idiosyncrasies, in a pretty gentle manner; the kids can drag and drop methods and variables from the library on the left before they’re ready to start typing, and Python’s indentation-based structure can be tough to pick up in the span of an hour. Last spring we had run an hour of code with the same boys with a block-based Pong-building game, so I was really hoping to get them thinking more about the text and able to affect things like the forces at work on the ball when they used the left and down arrow keys and the placement of objects on the 2D grid.

The session was a big step up from last year’s, though I was happy to hear quite a few “yes!”‘s and see a couple eureka moments for a couple kids.

If you’re looking to run your own Hour of Code with kids who’ve touched on the coordinate plane, a little tiny bit of physics (just to understand the terminology and why the ball might behave in a certain way), and a tiny bit of algebra, maybe, this is a good coding session to run. And even without that knowledge a quick sketch on the whiteboard of a grid with x and y coordinates (0,0 in the center for this lesson), another quick sketch to explain force in different directions and what that might do to an object, and then a last talk about variables being a bit like a box that can hold different things, an easy way to refer to something that might change will help the boys realize how some of the stuff they’re learning (or will learn) can help them write their own games or programs.

Next up for code week is a session with the girls down at Loreto in Dalkey!

ARKit in Swift Playgrounds @ 404 – The Recap

As mentioned, I spoke at 404 at the Royal Hospital Kilmainham on Saturday, October 7th.

I was demoing a little Swift Playground I had thrown together just after WWDC, when ARKit was announced.


The original demo, a flat little SpriteKit-based playground, was not terribly exciting, so I spent a bit of time throwing together a few passes at more engaging content (because, frankly, I was a little panicked this was going to be the most boring demo ever).

ARKit in Action
ARKit in Action

Continue reading “ARKit in Swift Playgrounds @ 404 – The Recap”

ARKit in Swift Playgrounds @ 404

If you’re in and around the Dublin area, are into technology in some fashion or another, you could pay some money (~€25) to attend 404, a conference/meetup at the Royal Kilmainham in Dublin 8. There’ll be some good speakers there, a few cool installations, and then me.

At the Royal Kilmainham Hospital
At the Royal Kilmainham Hospital

I’ll be showing off ARKit in Swift Playgrounds and showing off a couple cool things you can do with an iPad and a couple hours on your hands.

So I’ll see you at 11:45 in the Ante Room on the first floor!

How We Approach Coding in our Schools: What is Coding?

It’s an interesting exercise siphoning up all the articles and opinions on coding in the classroom, especially in a country like Ireland where it’s been thrust, front and center, into the spotlight (and curriculum plans).

A little bit of coding
A little bit of coding


Of course, I’m in favor of it, especially if it’s done in a way that mirrors the curriculum I developed, which emphasizes learning how to think like a computer over a specific toolset. I tend to favor programming languages like Logo that let you teach a concept first, then optimize, and repeat the lesson with follow languages like Python, Java, Swift. A bit like Simon Lewis mentions in his opinion piece in The Journal.ie, “Opinion: ‘We don’t need to teach computer science and coding in our schools’.” I think the title is geared to get a bit more traffic, but his general idea is about right:

The most important thing pupils need to learn about problems is how to break them down into smaller pieces and then tackle them in different ways.

He urges us not to add computer science to the curriculum as a separate subject based on his experience in the UK and with the worry that computer science will become divested of its true power: allowing students to solve problems in a creative fashion. And I tend to agree, to a point. I think that a well-designed curriculum, and maybe mine is not 100% there yet, it needs more meat, but Apple’s Intro to App Development with Swift is an excellent candidate. I’m a little biased — I spent 13 years with Apple, after all — but I think their course has an excellent balance of teaching concepts and problem solving techniques. It’s like an apprenticeship for the 21st century; teaching them real-life, hands-on skills they could use to get a tech job. It may be done in one of Apple’s programming languages and on Apple’s platform, but the skills would transfer to any other software platform.

But overall, I agree with Simon: not every kid is going to become a programmer, but I think the point is to introduce them (even at primary age) to coding as a problem solving tool, and show them that it could be an option, either in their personal lives or as a professional route.


On the other side of the coin are odd, straw men kind of articles like

Coding is not “fun,” it’s technically and ethically complex

I’m guessing the author ran across a program that thought it needed to dress up coding as more than it is, as he takes issue with classes “insisting on the glamor and fun of coding” that make coding a frivolous pursuit. And while I agree with him that learning how to code, as with just about anything, carries with it ethical considerations, but that’s no reason that it can’t also be enjoyable. There is certainly a mindset that’s required when coding, but the author sets up a false dichotomy that programming must either be taught as a deadly serious topic that requires “superhuman focus” or as a “fun and interactive” activity that anyone can do.

Now, again, I don’t know what courses the author has run up against, but I don’t know that I’ve seen any that pitch programming as a subject in which you don’t need discipline to progress. In that it’s like any other skill: it requires practice and usually more learning outside of the classroom if you expect to progress and become really good at it.

We have plenty of hobbyists in all sorts of fields, I don’t think it’s that harmful to introduce a student to a skill that might lend them the ability to throw together a little app for themselves that would fulfill a very personal need, the way someone might build a shoddy bookshelf for themselves, with just a little knowledge of carpentry.

Sure, programming is hard at a certain level, but that doesn’t mean it can’t be fun and broken down in a way that more people can grok the concepts…


ARKit Demo as a Playground

If any of that title makes sense to you, you might want to check out a little Swift playground I threw together just now to exercise Apple’s new ARKit framework inside of a Swift playground.

Spot the fake object in the picture...
Spot the fake object in the picture…

It’s nothing super special, but it’s something to get you started on your iPad (with the iOS 11 Beta and the new Swift Playgrounds Beta).

Fraser Speirs – Teaching Swift

Great write-up (as usual) by Fraser Speirs on his experience teaching Apple’s Learn to Code Swift courses.

I particularly like this insight:

I took the approach of simply being far more active in the classroom.

Instead of relying on Seesaw for grading and inspecting students’ work during class, Fraser was up and about the classroom helping out.

I know I’ve found that being active in the classroom seems to work out better for the kids’ understanding.