The first lesson usually fails for a boring reason: the student spends it watching someone else install software. Before any teaching happens, get a compiler building and running a program on the learner’s own machine, with them typing. Everything after that is a loop of small edits, immediate feedback, and one idea at a time.
Set up on their machine, not yours
Resist doing the setup for them. Sit beside the learner while they install the toolchain, create a folder, write a three-line program, and compile it from a terminal. It is slow and it is the whole foundation: they need to know where the source lives, what the compile command is, and what a successful run looks like.
Make them type the command rather than watch you type it. Then have them break the program deliberately — delete a semicolon — so the first error message arrives while you are still there to read it together.
Teach by breaking working code
Starting from a blank file asks a beginner to hold syntax, logic, and intent at once. Starting from a small program that already works asks only one question: what happens if I change this? Change a loop bound, swap a + for a *, move a printf outside a loop, and predict the result before running.
Prediction is the part that matters. A learner who guesses wrong and then sees why learns more than one who copies a correct answer, because the mismatch is memorable.
One idea per session, with something visible at the end
A session should end with output on the screen. Pick one concept — functions, arrays, structs — and build the smallest program that shows it. If the session is about functions, the win is calling one function twice with different arguments and seeing two different results.
Write down what was covered, in the learner’s words, at the end. A sentence like “arrays do not carry their length, so I pass the size too” is a better record than a chapter reference, because it is the thought they will need again.
Make error messages a normal part of the conversation
Beginners often stop at the first red message and wait for rescue. Change that by reading the message aloud together, pointing at the file and line, and asking what the compiler thinks is wrong. Then look up one unfamiliar word. Ten minutes of this turns errors from an emergency into a step.
Keep a shared note of recurring messages with a one-line explanation each. After a few weeks the learner stops needing you for the familiar ones, which is the point of teaching.
Notice when the pace is wrong
Two signals say slow down: the learner starts copying without asking why, and sessions end without a working program. One signal says speed up: they are predicting the output correctly before running. Adjust the next session, not the whole curriculum.
Above all, do not rescue too quickly. A short silence while someone reads their own code is worth more than a correct answer given in three seconds.
Teach the loop, not the language. A beginner who knows how to build, run, read an error, and change one thing will teach themselves the rest.