Fri Mar 27 15:39:44 2026
I am not a professional programmer, but a teacher. I enjoy writing code not because I like solving puzzles, and not because I like to think about code particularly, but because I enjoy solving problems that I personally have, and because I like learning how computing works. I like thinking about paradigms of computing, and am more interested with how computers work than how coding works. I teach Computer and IT in a German high school. My students are in the age range of 13-18, and partially are taking part in a mandatory course.
Having taught programming for about 5 years now and having read lots of articles on choices of languages for teaching programming, I am starting to develop an opinion, and I would like to share it with you. The way I see it, my personal choice of programming language for the purposes of teaching boils down to (in no particular order):
My choices are based on a couple of criteria. It is important for me that the choice is conform to the education program in Germany (of course) and that it is not a convoluted or overloaded language, that has good tooling, relatively simple syntax, good books/literature/exercises (perhaps the most important aspect for me personally) and is easily installable in our lab environment. Other than that, a teacher also needs reference material, and the better a language is documented and has books/exercises, the easier it is to adapt these into a classroom situation. Lastly and perhaps most importantly, I have to personally like the language. If I don’t get excited about a language, then I also can’t get students to get excited about it, and I think that’s important.
So why these languages?
Just as Mr. Tortoise in GEB mentioned that drinking the popping tonic is said to be satisfying and refreshing, there is a deep satisfaction whenever I close the last parentheses of an expression. Yes, I know that there are some people whose main reason not to teach/work with Scheme is because of the parentheses (😊), but one can’t deny that it is a good and very readable language to teach concepts of CompSci.
Figure 1: xkcd 297 — Lisp Cycles
It is after all the language of choice in SICP, and has been taught in MIT for years until recently where apparently Python has taken its place. I enjoy working with Little Schemer first, and getting the students to understand the concepts of working with lists and then recursion directly. I think the prefix notation is interesting and forces one to think differently, and for me thinking differently about coding is important.
I believe that coding is a different paradigm of thinking, and having the same symbols from math suddenly mean different things is counterproductive. Other than that, Scheme belongs to a vast family of LISP dialects, under which ELISP also falls. For those who are still interested after graduation, configuring Emacs would be the next logical step and they have a solid background in how the syntax works. Scheme is also one of the languages that has the advantage of being interpreted and having a REPL, which is an excellent educational tool.
Now I think my opinion is getting spicy. C, for school? What kind of mad man would do that in 2026?
I think C is the perfect language, if you want to understand how computers work, and not only understand how coding works. C being a low level language is quite close to bare metal, and there are lots of concepts regarding memory and having a bare-bone language that make it especially appealing for me to teach an older, stronger group. Concepts such as integer overflow, exit codes, compilation, architecture, flags, macros and binaries can be explained much easier in C than comparative languages.
/* Easy and understandable example of integer overflow */
#include <stdio.h>
int main(void) {
printf("%d", 200 * 300 * 400 * 500);
/* -884901888 */
printf("%ld", 200 * 300 * 400 * 500);
/* 3410065408 */
}
I like to work with C Programming: A Modern Approach by K. N. King, because I very much enjoy his spiralcase pedagogical approach (Wikipedia: The spiral approach is a technique often used in education where the initial focus of instruction is the basic facts of a subject, with further details being introduced as learning progresses), and I adore the exercises he provides. The objectives are clear, the exercises are creative, and the students can have a bit of fun with seeings instant results. Other than that, there is this excellent book I am reading right now: Computer Systems: Programmer’s Perspective which goes over almost all of aspects of a modern computer, and uses C to explain the inner workings of a computer. One can then expand on this work and work with embedded systems, for instance on Arduinos which most schools have plenty of/can buy cheaply which also has a very C-like syntax. Nothing cooler than making LEDs blink!
Oh Haskell, how I have hated you for no reason whatsoever for so long. Haskell has a reputation that precedes its actual implementation. Haskell is known by the general, non-CompSci people as being an obtuse and difficult language. That is until you try to implement a recursive function, and realize that it is a language that allows you to practically type out mathematical equations as they come and they will work. The Fibonacci sequence is mathematically defined as:
\[ Fib(0) = 0, \quad Fib(1) = 1 \] \[ Fib(n) = Fib(n-1) + Fib(n-2) \]
and in Haskell looks like this:
fib 0 = 0
fib 1 = 1
fib n = fib (n - 1) + fib (n - 2)
Easy! Dare I say: elegant!
Compare it to this Python code, the ’simple’ language:
def fib (n):
if n == 0:
return 0
if n == 1:
return 1
else:
return fib(n - 1) + fib(n - 2)
Haskell also has great and clear type definitions, and is in my opinion very well suited for teaching recursion:
-- example of caesar encryption
import Data.Char (isLower, isUpper, ord, chr)
shift :: Int -> Char -> Char
shift n c
| isLower c = chr $ (ord c - ord 'a' + n) `mod` 26 + ord 'a'
| isUpper c = chr $ (ord c - ord 'A' + n) `mod` 26 + ord 'A'
| otherwise = c
-- recursively
caesarRec :: Int -> String -> String
caesarRec _ [] = []
caesarRec n (c:cs) = shift n c : caesarRec n cs
-- iteratively
caesar :: Int -> String -> String
caesar n = map (shift n)
Haskell is a language that lets the educator convey certain aspects of programming and algorithms very well. Much better than most other languages. There are great exercises and lessons in my favorite Haskell book, Haskell Programming from first principles by C. Allen and J. Moronuki. I love books that have lots of practical examples and exercises, and this book does not disappoint. Other than that, another great source of information is of course, learnyouahaskell. The fact that GHCi also exists helps students to learn how working in an interactive environment works, eg. loading their code into a REPL and experimenting with it interactively.
Ah Python. How deceiving you can be. On one hand, I think Python is a great language for introduction in programming, and on the other hand I think that it is a language that lacks any defining features, educationally speaking, besides having a english-like syntax. The joke goes that you can write pseudocode and english and it just works in Python. I have often had students come up with in by themselves, for instance if i in list. On one hand this is good, on the other hand it disappoints when it doesn’t work.
# example of Python code that reads like english and looks like pseudocode
list_of_numbers = list(range(21))
for each_number in list_of_numbers:
print(each_number * 2)
The main power feature for our school, and an idea that I had two years ago and we have since implemented, was using Jupyter Notebooks. This enables us to share exercises and text with the students using scripts, and the students can just use Python and it’s kernel using Jupyter Notebooks even if they are at home, or on a tablet, or on anything. We have digitalized Eric Matthes’ Python Crash Course, and we teach using it as a source and its exercises. We can share exercises via bash scripts, collect them, grade them and send them back. This saves time and allocates it from typing (also important, but time consuming for young students) to coding, learning and thinking. This book’s exercises are interesting and creative; that makes learning more fun than just working with arbitrary numbers. The fact that Python has a REPL is also of great help, but I use it only in the beginning hours of my lessons, as I mostly teach Python to younger students, and little differences between working in REPL and working in files cause unnecessary friction for the learning proces.
Python however also has its issues. It takes a lot away from the students, and does much of the work in the background. This is good if all we are interested in is making code work, or understanding how formal writing works, but I often have the feeling that the underlying concepts are not understood as well as they could be in the other languages mentioned so far.
Yes, HTML/CSS are not programming languages. Yes, HTML is Turing complete, but that’s besides the point. The inspiration for this comes from an article by I. Merdith that I read on lobsters a while ago, which suggested using HTML and CSS for teaching programming. The reasoning was simple: HTML teaches typing and form, it teaches to use weird symbols, it teaches that every character matters, and in the end you have something to show for. A website in which you can be as creative as you like.
Styling the website teaches its own useful set of skills. Attaching classes and ids to elements and attaching styles to them teaches the elements of how variables work and can be referenced. Importing stylesheets teaches the idea of an import or a module: the idea of linking code files from different places together. ~I. Meredith
It’s a great approach in my opinion, and one that is not in the education plan/curriculum. I think this approach should be explored more, and it’s perhaps besides Python the one approach that can potentially make you money down the line. That’s always good, isn’t it?
Each language has its pros and cons. I prefer HTML/CSS for complete beginners, and then go into Python if the goal is just to teach programming. I like teaching C for groups that have graduated from Python, and I like teaching Haskell for those who are doing the german Abitur in contrast to Scheme (it’s either/or in Abitur). Where does Scheme fall here? I don’t know. I haven’t had an opportunity to test using Scheme a lot so far, other than breakout groups/singular sessions. It is definitely something that I want to explore later.
Theme: Dracula / Fonts: Mononoki Nerd Font, Inter / Der CSS dieser Website wurde mit Unterstützung von KI erstellt.
Meine Haltung zu LLMs und KI / Impressum / RSS