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 01 →

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, if you’re heading down to the machine, take Numbers & Bits next: the short primer that turns binary, hex and bit logic from noise into a language, ready for the assembly that follows.

The units

  1. 01A Program Is InstructionsStart →
  2. 02One Thing After AnotherStart →
  3. 03Showing Your WorkStart →
  4. 04A Place to RememberStart →
  5. 05Asking the PlayerStart →
  6. 06Working It OutStart →
  7. 07Making a ChoiceStart →
  8. 08Doing It AgainStart →
  9. 09Until You Get ItStart →
  10. 10A Job With a NameStart →
  11. 11When It's WrongStart →