By Jochen L. Leidner
I am very blessed because I have always been permitted to pursue the career of my choice, and I am very grateful for that. Time to give something back! So in February 2012, I'm going to be teaching computer science to Scottish 11-year-olds for a day. I'm excited about this opportunity presented to me by the Royal Society of Edinburgh, because I love teaching, and I haven't done any in a while. Also, I've never taught to such a young age group, which coincides with the age that I personally started to develop software.
I will have 110 minutes available per class, and I will teach my little curriculum to three batches of pupils on that day. I'm thinking about splitting up the time into three parts, a presentation (50 minutes), group work exercises (50 minutes), and a questions and answers session (10 minutes).
My objective and challenge will be to ignite a passion in some of the students in order to make them pick a computing-related career.
Great Ideas of Computer Science
I have decided to pick my material from among the following Great Ideas of computer science, which are at the very core of the discipline:
- information
- algorithms
- abstraction
- automata
- grammars
- recursion
- divide and conquer
- computers
Now if you think these are boring, theoretical concepts, then you've probably had teachers who did not get the cosmic beauty of these ideas across (no pun intended). Also note that the computer ends the list, not because it isn't a fascinating device, but because it is usually over-emphasized compared to the other ideas, certainly by being in the very name of computer science the discipline. Perhaps "Abstractics" (hat tip to Günther Görz), "Informatics" (certainly spreading as a term), "Automatics" might be more appropriate, but even less suited to attracting tomorrow's students.
Choosing a Language
One interesting question is which programming language to choose for code snippets and exercises. No introduction to the fascinating field of computing could be complete without showing some code, explaining what it does, and encouraging modifying it in order to see what might happen.
The question which language is suitable for this purpose is far from obvious. The language should be easy and fast to understand (self-explanatory is ideal), and compact to write down. It should be portable and there should be free implementations widely available (in source code form and also on the major platforms, GNU/Linux, Apple Macintosh OS X, and Microsoft Windows). It should be interpreted, or at least there should be an interactive Read-Eval-Print-Loop (REPL) available to support exploratory learning. Graphics would be a plus for creating fun instead of pupil fatigue.
A few candidates come to mind: Python, Java, LOGO, LISP, Pascal, and BASIC. Python is nowadays often used at universities in undergraduate courses, and it is widely available (sometimes pre-installed. Java is the mainstream server-side application language used in industry, and one of the main languages used in research as well, however it is not very easy to set up (beware the stony CLASSPATH, kids!) and pretty verbose (even short methods don't fit on slides well). Logo has the turtle for interactive graphics and is particularly easy to learn. However, it is now very powerful. LISP is the oldest, yet most beautiful and orthogonal language. Wirth's Pascal supports structured programming, static typing and complex data structures much better than e.g. Python, and - while designed with education in mind - has been used widely in industry in the 1980s (remember Borland's Turbo Pascal and its offspring Delphi?). Basic has proven its worth in education over several decades, even if it is not particularly aesthetically pleasing. There are tons of Scheme/LISP implementations and there are some free Pascal ones, but they are not necessarily easy (enough) to install (e.g. Petit Chez Scheme didn't work immediately after a successful installation on Mac OS X, and pcom is available in source code, but you have to compile it with itself [sic] first).
Python would be a wonderful choice, if it wasn't so non-obvious how to set up an interactive graphics shell (I can do it, but an eleven-year-old might just get to the text prompt). Also, Python uses tabs to indicate block scope, which is pedagogically bad and leads to errors when students want to type in some code from a slide and key it in using spaces, which looks the same but won't work.
Chipmunk Basic is a free implementation of BASIC that is available on all major platforms, and it has LOGO-like graphics primitives. Free documentation as well as published books are available, which makes it a hot contender - much to my own surprise!
| Language |
Ease of Adoption |
Graphics |
Implementations |
Orthogonality |
Interactive IDEs |
| LISP |
- (prefix, parentheses) |
- (complicated to use) |
+ (DrScheme, Gambit-C, MIT Scheme) |
++++ (Scheme) |
+ |
| Java |
- (verbose, OO) |
- (not concise) |
++ |
- (basic types v. classes) |
--- (no REPL) |
| Python |
++ (tab) |
++ |
+++ |
- |
+ |
| BASIC |
+++ |
+++ (Chipmunk Basic) |
+++ (Chipmunk Basic) |
--- |
+++ (Chipmunk Basic) |
| LOGO |
+++ |
+++ |
+ |
--- |
+++ |
| Pascal |
++ |
--- |
-- |
++ |
--- |