Swift – do you learn to program by solving logic puzzles?

I spent some time working through the first bunch of “coding” tutorials in Swift Playground from Apple. It’s slow, wordy, and arbitrary about how it introduces concepts. Just one example – the tutorial lets you turn left, but not right, because it wants you to make a “right turn” function out of three left turns. That’s weird and bossy. It’s immediately annoying that it takes 3 times as long to turn right as to turn left. What if I didn’t want to do it that way? Do they think I can’t handle a right? Oh, they just want to force me to realize that you can group multiple commands. And if I don’t get it, they over-explain it with lots of words. LOTS. OF. WORDS. Thanks Swift – coding is all about doing what you are told instead of figuring things out with flexible tools!

There are a lot of quirks in how you add and edit the commands–clunky is a kind description.

It reminded me of Lightbot, a cute puzzle app. Except Lightbot is more fun and is at least 10 years old. They couldn’t do better than that? LightBot says it’s “a puzzle game based on coding” and “teaches you programming logic.” At least they are honest!

We don’t pretend that solving crossword puzzles teaches writing. (Well hopefully not.) The same applies to coding.

The way to learn to code is by coding, not doing logic puzzles.

Also published on Medium.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.