Which Programming Language Should I Teach First: the least productive question

2 matt_d 1 8/25/2025, 4:20:14 AM parentheticallyspeaking.org ↗

Comments (1)

sema4hacker · 5h ago
I agree with the article that this is the wrong question to ask. I think the best way to teach programming is to start with the most basic concepts, independent of any language, such as the idea that computer memory consists of cells that can store data like text or numbers, and that we label these cells with names so we can tell the cells apart, just like mailboxes on a street.

Then there's the idea that we can move data between cells and input and output that data.

Then that we can do simple operations between cells, such as arithmetic and comparing and swapping.

At that point we know enough to write a simple program, such as inputting two numbers from the keyboard and outputting the largest on the display, using some trivial made-up language.

Then introduce looping, and solve the problem of inputting numbers until zero is input, and reporting the largest number found.

Then maybe simple structures such as arrays or lists or strings, then more complicated flow control such as nested loops and callable procedures or functions, persistent storage, and so on. At each stage, require solving simple "real world" problems such as a trivial billing program, or sales tax calculation, or a toy text editor, or simple histogram output.

Turns out most programs need and use very few programming concepts. A good introductory language would be as simple as possible, just sufficient enough to demonstrate and allow the writing of programs covering all the desired concepts in a 101 course. If the language being used can allow more than what's being taught in the 101 course, then it will have features and syntactic sugar that will invariably confuse and misdirect the student. Let a more powerful language wait until the next course, because the most important thing to teach initially are CONCEPTS such as named memory, operators, if-then-else, simple I/O, simple structures, looping, and so on, NOT the arcane syntax of some particular language.

The written material should include as many small but "useful" program examples as possible, first with each concept individually demonstrated, then combining concepts into more sophisticated less-toy-like examples. I've also found that a particularly powerful instruction method is to present a very short piece of code along with five supposed outputs by that code but for which only one output is correct, and make the student determine which output is the answer.