Swift Playgrounds Makes Programming More Approachable
December 30, 2014
Judging from all the articles and Github repos related to Swift, I would say adoption rates of Swift are going pretty well. Almost as if the Apple developer community was ready for something new. Things have been going so well that only 3 months after Swift’s announcement, Apple mentioned that many universities have incorporated it into their programming classes. This fact is especially interesting, considering so many schools still primarily teach C++ and Java, which are well aged languages at this point. If you are curious what schools have taken the plunge with Swift, check out this list, taken directly from apple’s website:
While I am glad to see so many early adopters in University education, I know at least some of these schools made the decision to teach Swift while Swift was still in beta! It may not be a big deal, but that seems very unlike the academic world, but nevertheless, I’m sure I would have appreciated their decision.
One article I found on the Full Sail blog, from October 17, 2014, said this:
Some of our iOS classes worked in a few days of Swift basics for our students as early as the end of June.
Full Sail University now offers a full class devoted to learning the Swift programming language.
Why Universities Like Swift
The big reason I believe Swift has gotten so popular with these universities is because of Swift playgrounds in Xcode. It is a unique feature I haven’t seen anywhere else and it makes learning programming more satisfying and less frustrating. Not long ago I was taking a C++ course where I had to make changes to my .cpp file, save it, compile it in a terminal, and then run it. With Swift playgrounds you can write your code and see it rendered in real-time. This is huge for developers! Here is why:
- The time you save not having to compile manually is great. You don’t even have to move your fingers from the keyboard giving you a great, time-to-understanding ratio.
- The visual aspect of Swift playgrounds is great because it lets you see what your code is doing in a visual way. There is no need to overthink what is actually happening when your code runs, you can visually see the results and make smart conclusions from that.
- Quick testing: Swift playgrounds are also useful if you just want to test a small snippet of code. This is great if you are already working in a big iOS project and you want to test if your logic is right in a tricky piece of code before implementing it into your primary project.
The visualizations you get with Swift playgrounds is not just for logic code with for loops and math operations, for example. Swift playgrounds also work for testing the look of a UI element. Here is a screenshot displaying an example of both use cases.
Download the playground above and just play around with it, since they are called playgrounds for a reason. Also, if you are in love with Objective-C or have pre-existing project written in Objective-C, I would check out KZPlaygrounds, which seems to be a pretty sweet alternative for those not using Swift.
Education Can Change
In many people’s minds, education continuously lags behind as far as innovation goes. So it is always nice to see so many universities adopting something new and hopefully it will lead to more early, yet smart, adoptions. Because there are many products and tools out there, that will enhance learning and keep students relevant. In my experience, I had to learn all my iOS development skills on my own and at internships I had accepted. I look forward to see what happens when all of these students graduate with a skill they can turn into software right away. I believe education can stay up to date with the rest of the world and I believe Swift Playgrounds are a small piece in that.
Update: Playgrounds have continued to progress and they now have interactive playgrounds to essentially see a simulator/live view update as you write code. Check that content here
Tweet