Home / Mac / Swift Playgrounds: Not just for kids anymore …

Swift Playgrounds: Not just for kids anymore …



Dr. Mac’s Rants & Raves
Episode # 399

When I went to college (a long, long time ago), computer science was in its infancy. My only exposure to computers was a single mandatory course, programming in Fortran. I remember it involved stacks of fussy hole cards and logical thinking. I hated it and barely passed, but it left me with a lifelong fear of coding.

We present Swift Playgrounds

I recently started playing with Apple’s free Swift Playgrounds for Mac and iPads, a free app that makes it (gasp) fun to learn Swift programming.

What is Swift? Apple describes it as “a robust and intuitive programming language created by Apple to build apps for Mac, iOS / iPad OS, Apple TV and Apple Watch.”

; And Swift Playgrounds is an app (for Mac or iPads) that makes it fun and easy to learn to program in Swift by teaching you to code with interactive puzzles on the screen. You solve them by arranging the correct commands in the correct order and then click on the Run My Code button and watch your code run in a beautiful interactive 3D route, you can rotate and zoom while the code is running.

Swift Playgrounds makes it fun and easy to learn Swift coding.

Swift Playgrounds makes it fun and easy to learn Swift coding.

When you make a mistake and you want to, it’s easy to find out what went wrong, add or change the order of commands, and try again. And if you get stuck, Playgrounds has plenty of built-in help and tips.

Autocomplete that works

Something I really love is that I do not have to keep typing the same finger-twisting command names over and over again. Instead, I type the first few letters, and Swift automatically completes the command or provides a list of clickable options.

I also like that Swift is free and open source. And while it’s still relatively new, I’m glad that many developers (LinkedIn, Lift, Eventbrite, Kickstarter and more), and that colleges and universities around the world (including the Houston Community College System) have embraced Swift.

The lessons

There are nearly 100 lessons in the two Learn to Code Playgrounds – Fundamentals of Swift and Beyond the Basics, plus many additional playgrounds to download and explore for free.

A handful of the many playgrounds that are free to download and explore.

A handful of the many playgrounds that are free to download and explore.

I’m fascinated by the one called Battleship, where you develop an algorithm to hunt and target your opponent’s ships most effectively. It’s beyond my current skill set, but I think it will make sense once I have completed the two Learn to Code playgrounds.

I’ve only completed a handful of lessons so far, but I’ve had a lot more than I expected. It’s really fun and I keep coming back for more.

I do not know if I will ever develop the skills to create my own Mac, iPad, iPhone, Apple Watch or AppleTV app, but now that I have overcome my fear of coding, I plan to continue learning fast programming with Swift Playgrounds .


Source link