I'm beginning my fourth year teaching Swift at one of the largest high schools in the United States. I'm documenting some of my experiences with the hope that others may benefit with the possibility of further collaboration.
A Very Short Brief About Me (and Some Nostalgia)
My interest in computer science began at a very young age building small "computers" using relays before moving on to Olivetti's A5, Texas Instrument's TI-99/4A, and the great Apple IIe. I earned my degree in Computer Science and then spent many years in the San Francisco Bay Area working initially as a software engineer and then working my way up through management in a Fortune 500 company. Several years ago I decided to focus my efforts on education with the following guiding principles in mind:
- Everyone deserves and is entitled to study Computer Science
- The skills acquired in the study of Computer Science are valuable, regardless of a student's ultimate field of study
- Studying Computer Science can help bring equity to the disadvantaged
- The best learning is fun
- There's no substitute for real experience
While learning multiple languages is no doubt beneficial, I wanted to focus a three year curriculum on only one language which would serve as a great starting point yet not be a limiting factor in later years. I wanted a practical language that could be used in the "real world". I wanted a language which could be compiled. I wanted a language which would work on a variety of platforms, including Linux, with support for a robust REPL. Finally, I wanted a language with an enthusiastic group of supporters. I chose Swift.
While I absolutely adore Apple's products, owning an Apple product in order to learn, study, and practice Swift was a non-starter. While I think Apple is doing a great job developing a learning environment using iPads and Playgrounds, too many students and their families (as well as their school districts) aren't able to afford adequate equipment. I needed a solution which could easily be run on a low-priced Chromebook.
Solution: Linux + Screen + Emacs + LSP + Flycheck + Magit + Igis + Scenes …
The solution was to build out infrastructure enabling students to study (in a realistic environment) using nothing more than a browser and a shell. (The Chrome browser provides a very good "Secure Shell Extension".) Students learn about computer theory, hardware and software using a wiki and then practice their skills in the shell. Their toolset includes:
- screen - launch and use multiple shell sessions (for example to edit, view output, and compile simultaneously). No less important, is the ability of teachers and other students to log on remotely and assist others.
- emacs (along with LSP and Flycheck) - edit in a syntax-highlighted environment with completion
- Magit - provides a UI from within emacs for Git interaction
- Igis + Scenes - provides the ability to develop complex, browser-based graphic applications using only server-side Swift
- Mission Manager - provides students with the ability to perform exercises and gain instant feedback regarding correctness. Also servers as a platform for quizzes, exams, and competitions.
- Other - A wide variety of tools, mostly bash scripts, that enable students to deal with dynamically linked libraries and their versions.
Feedback from Students and Parents
The feedback from students and parents has, overall, been overwhelmingly positive. The program has doubled in size and demand is high. On occasion, a few students (and/or parents) will complain that Swift is a "proprietary" language belonging to Apple and that Java should be taught instead. Also, some students have some initial difficulties working their way around a CLI. Graduates of the program who have begun their studies in college inform me that working only in a CLI has greatly boosted their confidence. Likewise, the program has received praise from student's professors.
Of course, many challenges remain. Some material on the wiki is still quite sparse. Learning emacs and git are significant hurdles for some. Differences in behavior between the REPL and compiled programs are sometimes a source of confusion for students. Alternatives to the lldb CLI would be helpful.
I hope that this post will serve as a starting point for discussion; questions and comments are welcome.