Blog

A Swift Playgrounds Evening


Tonight, I finally sat down with my oldest daughter Cornelia, to play with Swift Playgrounds and try to teach her a bit about programming.

iPad Pro with Swift Playgrounds

I’ve been meaning to do this for quite some time, but have never gotten around to it. I did involve both daughters in iOS development some years ago, to create two kids apps for iPhone and iPad. We had a really fun time doing so, but after that, we haven’t had a continuous habit of playing with code together.

A couple of weeks ago, I attended a conference, where several earlier colleagues had brought their kids to an all day hands-on coding event. There, children were encouraged to play around with code and deploy their creations to real, physical devices. Watching these kids thrive, inspired me to show my own daughters what programming is all about.

So Cornelia and I sat down this Friday evening, downloaded Swift Playgrounds and got going. Starting from the very beginning, with very little previous knowledge, it was amazing to see her brain in action, intuitively breaking down the initial problems into smaller parts, solving problem by problem, as we together ventured into more difficult territory. When Cornelia shouted “this is FUN” for the first time, I knew that we had something good going.

Swift Playgrounds was a fun way to start giving Cornelia an idea about what it’s like to solve problems with code. How can we detect repetitive tasks, and make a function that simplifies solving these tasks? Why doesn’t a program work the way we expect it to? What is the easiest way to solve a problem with many solutions? Swift Playgrounds walks you through these issues in a fun manner.

However, the most fun we had all evening, was when Swift Playgrounds ran into a bug and started to execute our correct instructions in a very strange way.

Play Video

After spending some time in Swift Playgrounds, we then had a look at the app I’m working on on a daily basis - BookBeat. It was nice to open Xcode and show her code that is responsible for handling a task she often uses in the app, and show her that the code in that app is not much different from the code we just created together in Swift Playgrounds.

If you have kids and enjoy coding, I can recommend spending some time with your kids in this nice app. And if you’re not into coding, why not use the app to learn?