Home / Mac / A quick coding lesson on Apple’s playgrounds

A quick coding lesson on Apple’s playgrounds



When I went to college (a long, long time ago), computer science was in the beginning. 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.

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. To solve them, arrange the correct commands in the correct order and then click the Run My Code button, and watch the code run in a beautiful interactive 3D route, you can rotate and zoom while the code is running.


At HoustonChronicle.com:
Read more from Dr. Mac, Bob Levitus

When you make a mistake and you want to, it̵

7;s easy to find out what went wrong, add or reorganize commands, and try again. And if you get stuck, Playgrounds has plenty of built-in help and hints.

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

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

Release Notes: Get Dwight Silverman’s weekly technical newsletter in your inbox every Monday

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. 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’s going to make sense once I’ve completed the two Learn to Code playgrounds.

I’ve 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 app, but now that I have overcome my fear of coding, I plan to continue learning Swift programming with Swift Playgrounds.

Resources:

Swift Playgrounds. Free. Apple, Inc. Mac: https://apps.apple.com/app/id1496833156 | iPad: https://apps.apple.com/app/id908519492

Swift (programming language) Free and open source. www.swift.org.

boblevitus@mac.com


Source link