A Swift Playgrounds Evening
10 Nov 2017
Tonight, I finally sat down with my oldest daughter Cornelia, to play with Swift Playgrounds and try to teach her a bit about programming.
I have been meaning to do this for quite some time, but have never really 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 continous 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. Checkout L33tSpeak for more info! Watching these kids thrive, gave me a dash of bad conscience, but more than that an urge 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 did stumble into a bug of its own, and started to execute our correct instructions in a very strange way.
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 be able to open Xcode and show her a piece of code that was responsible for handling a task she often uses in the app, and show her that the code I write in that app is not much different from the code we just had created in Swift Playgrounds.
If you’re into coding, I can recommend spending some time with your kids in this nice app. And if you’re not into coding…why not use it to learn yourself?