October 27, 2016

Apple Swift Programming Language Becomes Child’s Play


                                                             



When I first learnt coding in the late 1960s it was a long, tedious process. I was at a school which luckily had an “in” with the Victorian Education Department and Monash University to use Minitran, a cutdown version of the widely used Fortran programming language used for general scientific applications.
We’d start by breaking down the overall task into a series of steps, use a plastic flowchart template to create a logic diagram, translate it into code and then write the code across the top of pre-perforated cards. We’d then get paperclips and, in much the way you use them to open a SIM card tray, punch out the program statements, letter by letter.

We’d wrap the punched-out cards with rubber bands and they’d be sent in for processing. We’d get the results a week later. If you made mistakes and the program didn’t run, you’d resubmit it and wait another week. Needless to say we’d soon have several programs under development at the same time so when one was in error, others would come back working.

                                                            
 
Why this trip down memory lane? Because 47 years later, there are tools for kids learning to code that we could only dream about in 1969. And one of the most ingenious — called Swift Playgrounds for the iPad — is now available from the App Store in Australia.

I’ve been using Swift Playgrounds, and it’s like a game. It’s designed for the young but if you’ve never tried coding as an adult, it’s worth a shot. It features a penguin character called Byte and in “Learn to Code 1” you get to move Byte forward and left, collect gems and port instantly between locations by stringing together lines of code.

The code takes the form of instructions such moveForward(), turnLeft(), and collectGem() and when you run the code the little Byte character acts them out to the letter in a cartoon. If you fluff your code, you can fix it up and run it again — instantly.

“Learn to Code 2” introduces more demanding coding ideas and there’s several challenges you can try to hone your skills. It’s all completed on an iPad using a touch screen. Later on you build interactive text and graphics.

All along you are learning the basics of Apple’s Swift programming language used for building apps. In the end, you have the basics to go on and build your own apps for the iPhone, iPad and MacBook.

If you’re keen to use Apple’s code, there’s also the Code Swift app that gives examples of structuring Swift code and a Swift Compiler that compiles and runs Swift language programs on an iPad. It’s a case of searching the App Store. Being able to use code to create a cartoon movement sequence should appeal to kids.

Swift Playgrounds doesn’t have a monopoly on apps that use animation and games to help kids learn coding.

Tynker is a cross-platform app for iOS and Android that helps kids build apps for games, puzzles, interactive stories and animations. IOS has the Hopscotch app, which again sets out to explain to kids that coding starts with breaking an event into a sequence of commands. There’s Cargo-Bot and others. Apart from Tynker, Android has Run Marco, Hakitzu Elite, where coding is linked to gaming, and Lightbot.

With governments pushing for more science, technology, engineering and maths taught in classrooms, playing games that demystify coding will greatly help students. We live in a society increasingly dominated by technology and, while we’re savvy users, not so many of us are savvy at understanding the coding building blocks.

By Chris Griffith
With many thanks to The Australian