Who's Afraid of the Playground Page?
Steven Lipton
Author, consultant and Speaker on technology, creativity, iOS Development, and SAP Business One
If you spend time in the Apple world for some time, you invariably get used to the number of pundits who use the worst logic to malign Apple. Indeed, the Macalope column of Mac World makes quite a lot of money ridiculing such articles. Generally these articles don't get under my skin or irritate me. Then one did.
After Apple's Lane Tech keynote for education, The Verge had an article about Swift playgrounds. Of course disparaging it, with the usually illogical way of contradicting oneself several times. Paul Miller's Article The Xcode Cliff: Is Apple Teaching Kids to Code or About Coding? contends that iPad playgrounds is the wrong place to teach about programming. You can never make applications in Swift playgrounds and you can't distribute them. You can only distribute them through Xcode which is too complicated to learn.
I'm the author and instructor of the three hour-long course for LinkedIn Learning called Learning Swift Playgrounds Application Development. If Miller is right, then what could I possibly do in three hours of video? It turns out, there's a lot. Even when I'm not authoring a course on Swift playgrounds, My iPad and Playgrounds iCloud folder is full of playgrounds I've made exploring many different aspects of UIKit and other Frameworks. More than taking this personally, I find this puzzling that the author came to such a different conclusion than me, a Swift Playgrounds Junkie.
I read Miller's article several times. The contradictory logic that appeals to emotion than to reason bothered me. He attacks Xcode as too complicated, then cries that iPad Playgrounds should be Xcode, then waxes nostalgically about the good old days when we didn't have all that fancy SDK stuff and programmed on Commodore-64's. I was puzzled about this, and getting subject to logical whiplash I missed what was truly bothering me until my third reading. A good chunk of the article is on the latest version of the ARKit Demo template in Playgrounds. It was here that I finally got what was going on. He writes:
Writing software with Apple’s APIs is a powerful but difficult practice, and Swift Playgrounds’ penchant for hiding true complexity makes it hard to recommend for someone who doesn’t want to just “learn how to code” but instead wants to build something.
The idea you can't build something just isn't my experience given my Playgrounds folder is always full of new ideas, demos and prototypes I've made up over coffee or lunch. Many of those end up in iOS Development Tips Weekly or the next editions of my books.
Miller only looked at the completed templates from Apple. Actually, Swift Playgrounds for iPad is hiding its complexity the same way BASIC was hiding it on a Commodore 64. But you'd never know that if you didn't hit one button, ironically located right underneath that ARKit demo.
The blank page button. Miller goes an entire article without hitting the blank page button. When you hit that button, a whole new world opens up, one you can't even get in Xcode. Anything you write on that page will run directly on a real device, with all the advantages of a real device. With a few lines of code, you are not only coding but programming, dealing with the real-world issues that don't show up in simulators. Where you go is up to you, just like any other page. In Microsoft Word or Apple's Pages, you might find templates to help you organize the great American novel, but none that will write it for you. Miller's article may be a lament on Apple using templates as starters to a bigger world. Yet for some reason, he never saw or took the next step to hit the blank button, where it all really happens.
For me at least there's a thrill in the blank page in any media. I work with many blank pages. I write on blank pages on blogs, books or video courses. I look at a blank page in a painting app, in a paper sketchbook or some 300lb Arches watercolor paper and am ready to fill it. In the Bluefish text editor I use for web or SQL development, XCode project or Swift playground that blank page is a cool place to start my next major project. I never have a problem on a blank playground page. Miller's experience is alien to me. I look for the New button first.
I know for some there is the terror of the blank page, a fear of putting down something incredible on that page. More accurately, it's the fear that what a person puts on that page is crap and not incredible. Each blank page is neither a success or a failure, but many who look at the blank page have no idea where to go. The idea of infinite possibility is scary, and the idea of failing is scary.
As a creative individual, my head is filled with ideas. Some are good ones, and a lot are real stinkers. A page for me is an empty container waiting for me to drop my latest idea, code or image out of my head and onto the page. I have to make that idea more real. The page is where I test it somewhere outside my own head. While playgrounds may seem like a place only for small children, a blank page is my playground: A place I can feel safe to test my idea. From there I can accept it, refine it or reject it.
As Miller laments in his article, he likes the good old days of typing code, of struggling to learn a language, something he sees missing in iPad Playgrounds. I remember my TRS-80 with all 4K or RAM and Apple ][+ fondly and back in those days I did the same. I do like that kind of coding, and I like to do it anywhere I have an idea or want to try something new to me. I do exactly that with Swift Playgrounds on my iPads. On a flight from Phoenix to Santa Barbara recently, I wondered what the attitude of the plane was. Using the Core Motion framework and my iPad's Mini's gyroscope, I wrote a playground to tell me the change in pitch, yaw, and roll. Many of my tips in the iOS Development Tips Weekly video series started as Swift playgrounds because I was curious about something. The good old days of coding Miller is looking for is one button away, with plenty of libraries, live sensors, camera, microphone, speakers, Bluetooth, and GPU to play with. Beats a simulator any day.
I am in the business of educating, primarily about iOS and watchOS. My iPad Pro and my iPad Mini and my foundation for my teaching -- in Swift Playgrounds. Others may have other platforms, and indeed I would love a Raspberry Pi device as compact and portable as my iPad Mini for Python. I'd love to find the time to mess with Kotlin on a device I can carry around with me. Right now my answer to a lot of development and prototyping and demo apps is Swift playgrounds. I like the blank page and plan to continue to fill it out -- a lot.
Steven Lipton is the mind behind makeapppie.com for learning iOS app development. Steve is the author of several books on iOS programming and development. He has authored many courses for LinkedIn Learning and Lynda.com and is one of the featured developers in the Career Clinic: Developer Insights. He is the host and author of iOS Development Tips Weekly and his latest courses is Apple watchOS 4 App Development Essential Training and Apple watchOS4 App Development: Advanced API's