The educational implications of Swift

Apple announced a new programming language today, one that has massive implications for iOS developers around the world. 

Overlooked so far (I know, it hasn't been that long) are the educational implications of Swift. Swift playgrounds are an amazing innovation in introducing new developers to concepts of programming that are often overlooked, and not well understood by new developers.

Take for instance, the instant feedback, in-line feature of playgrounds. Knowing what a string interprets to is a big deal. Visualizing how code executes is a skill that new developers often have trouble developing. The idea that they should even attempt to visualize the execution of code given input is a new, difficult concept. Having something do that for you as part of the normal course of development is incredibly important, it reinforces habits that are ultimately the difference between someone who continues to code, or someone who looks on from the sidelines.

Knowing what a variable's value is at an arbitrary point in the code is huge- debuggers have been with us for some time, but are often too cumbersome to drop on a junior developer who is just learning how to do something as simple as file I/O. They're important, and developers learn to use them eventually, but having them right there with you at the start is an immense head start. 

Playgrounds reframe the notion of debuggers and interpreters, from "engineering tool" to "experimentation sandbox". Something new developers often have trouble with is the idea that they should absolutely play with the interpreter all day. Too many new developers try writing a line of code, running the entire program to see if it works. Why have interpreted languages at all? Reinforcing that the computer can think as fast, or faster than you, is a huge idea. Similarly, isolating small parts of the program you'd like to test becomes very apparent in the sandbox, and from that flows functional programming, unit tests, and general architecture. Being able to see the next step in the design of your program comes from understanding these ideas, and Playground puts them right there alongside the program you're writing.

Similarly, math and programming for developers who aren't computer science graduates seem hardly connected. Later, the math becomes apparent, but in the beginnings of your career you can get stuck where you don't understand the math and it becomes a barrier for you. Mathematics involved in programming are highly visual and intuitive, but stripped of their programming context they are dry to some, and do not seem useful. Being able to bring that into the context of seeing what happens to a variable's value over time, and seeing a graph of that information is incredible. Since programs result in something visual, why isn't the math that is crucial to understanding higher level concepts more closely interwoven into the development process? 


Swift is also amazing because iOS development, and Objective-C are Hard. Hard with a capital H. There is so much going on, that most developers can't get something usable up without several weeks of instruction. Because Swift can be written alongside Obj-C, junior developers can contribute to large-scale projects without needing months of bootstrapping, and new developers can get their projects out faster. This has ramifications that will echo down the line for some number of years, affecting new developers and the structure of teams alike. More iOS engineers means more coverage of apps that are needed by those not necessarily in the middle class. Apps will have shorter development timelines, meaning less apparent commercial viability is required to get your app to market. Diversification will thrive, and I think we'll see more children able to start making apps. 

Currently we'll have to wait all summer for this to come out to the general public. This sucks, because kids have ample time to get started on things in the summer. However, adults will have some time over this next year to develop some expertise in the language, and some curricula that is targeted at Swift. My advice is to get started now on developing these programs, have them ready by next summer. Similarly, programs for adults should target a Fall date to begin classes in Swift. Creating a developer community that is suffuse with programmers at all levels will help the community surrounding Swift to be as accessible as Python and Ruby. 

Python has playgrounds at the moment, they're similar but not quite as intuitive as an apple product. Check them out here: http://ipython.org/notebook.html