Skip to content

Foundations

General Programming

The ideas every program is built from — sequence, variables, loops, decisions, and how to debug — taught language-neutrally and shown running in Sinclair BASIC. The universal first step, before any machine or language.

Begin — Unit 1 →

What this is

The very first step — before a machine, before even a language. General Programming teaches the ideas every program is built from: that a program is instructions in order, that a variable remembers, that a loop repeats, that a decision branches, and — most useful of all — how to find out why a program is wrong.

Each idea appears twice: once in plain pseudocode (the idea, with no language in the way), and once in real Sinclair BASIC, running on a ZX Spectrum (the idea, made to happen). The pseudocode is what travels; the BASIC is there so nothing stays abstract. You'll see the same idea wear different clothes, and learn to trust that it's the same idea underneath.

Who it's for

Anyone starting from nothing. If you've never written a line of code, start here. If you already think in variables and loops, you can move straight on — but the debugging thread that runs through every unit is worth a look even then.

You don't need a Spectrum: any Spectrum emulator runs the examples, and most of the time you only need to read them.

The shape

  • The basics — a program is instructions; order matters; showing things.
  • Memory and input — variables, and asking the person at the keyboard.
  • Working and choosing — arithmetic, and decisions that let a program react.
  • Repeating — counted loops, and the loop-until that is the heart of every game.
  • Structure and the safety net — naming a job to reuse it, and the one skill that separates getting it done from getting stuck: debugging by looking, not guessing.

By the end you'll have built a small guessing game from the ground up — and, more importantly, you'll hold the ideas every language is just a way of saying. From here you pick one to say them in: Meet BASIC, and the family that follows it, or the road down into the machine itself.

The units

  1. 01 A Program Is Instructions
  2. 02 One Thing After Another
  3. 03 Showing Your Work
  4. 04 A Place to Remember
  5. 05 Asking the Player
  6. 06 Working It Out
  7. 07 Making a Choice
  8. 08 Doing It Again
  9. 09 Until You Get It
  10. 10 A Job With a Name
  11. 11 When It's Wrong