cadence_learn
cadence_learn / the c++ track 15 levels · ~4h 15m

c++, step by step.

A first computer science course in the order it is actually taught — starting with the twenty minutes of setup that derails more people in week one than any concept does.

this track assumes
  • You have a Mac, and have never used Terminal
  • You have done Think Like a Programmer, or already think that way
  • Nobody has told you what a compiler is, and that is fine
what this is

the language, after the thinking

the one sentence

This track teaches C++ in the order a first computer science course actually covers it — and it assumes you have already done the thinking, so the language can be what it really is: a notation, with strict punctuation.

If you have not done Think Like a Programmer, do that first. It is twelve levels, no code, and it is the part that decides whether this feels hard or obvious. Everything here refers back to it.

start with level one even if you are impatient

Level 1 is not programming — it is getting your Mac able to compile at all, and making sure what runs on your laptop also runs on the machines in your closed lab. That single mismatch derails more people in week one than any concept in the course, and it is entirely avoidable if you spend twenty minutes on it now rather than at 11pm before an assignment is due.

the track

all fifteen

The whole course, built and working. Do them in order — each one leans on the ones before it.

▢ your progress0 of 0 done
start →
01

get your mac ready

Terminal, the compiler, VS Code, and the one command to always compile with — plus how to stop writing code that only works at home.

20 min · the setup
02

six lines, taken apart

Click every piece of hello world and find out what it is for. Then the compile-and-run loop, and the two-file trap.

16 min · hello world
03

the wall of red, decoded

The seven compiler messages you will actually meet, with real output — including three that never complain at all.

16 min · the decoder
04

five types, and a way to listen

What really ends up in each kind of box, and cin — so your programs can ask a question instead of only talking.

18 min · types and input
05

the order changes the answer

The remainder operator drawn as squares, and two expressions with the same numbers that give 0 and 1.

16 min · arithmetic
06

your money prints as 5

A total of five pounds shows as “5”, and setprecision(2) can put scientific notation in a receipt. Three lines fix it.

15 min · formatting
07

the first true rung wins

Drag a score down a grading ladder, then reorder four correct lines and watch every A quietly become a C.

15 min · decisions
08

four parts, going round

Step a for loop one part at a time, then take the i++ away and watch the check never change its mind.

15 min · loops
09

in, one job, out

Watch the copy being made — and find out why “my function does nothing” is the most common complaint in the course.

17 min · functions
10

numbered from zero

Slide an index past the end and watch a real program hand you memory that was never yours, with no error at all.

16 min · arrays
11

text is a numbered list

Take a string apart character by character, and meet the getline trap that eats an assignment.

15 min · strings
12

make it survive

Write a file, read it back, then delete it and watch the program confidently report a total of zero.

15 min · files
13

invent a type

Three arrays that drift out of step versus one struct that cannot. The first time you design a type yourself.

15 min · structs
14

a box holding a box number

The part everyone warns you about, as one idea: memory is numbered, and two symbols are opposites.

18 min · pointers
15

down, then back up

Watch the call stack pile up and unwind — then remove the base case and see it fall over.

17 min · recursion

start with the setup

how it maps to your course

this is the standard shape of a first c++ course

Your catalog says the course covers “several standard data types… the use, design and implementation of each type in C++” and puts its emphasis on problem analysis and top-down software design.

Levels 4, 5, 10, 11 and 13 are those data types. Level 9 is top-down design in actual code. Level 13 is the design part — the first time you decide what a type is. The problem analysis is the other track, which is why it comes first.

If your syllabus orders things differently, follow your syllabus — the material is the same and the levels stand alone well enough to be taken out of order once the first three are done.

how to use it

two things that make this work far better

☶ do it with someone

Every level ends with an exercise for two people. In this track they are mostly about breaking things on purpose — deleting one character and predicting what the compiler will say. Meeting an error calmly, by choice, is completely different from meeting it at midnight.

◈ ask an ai at any point

Every section has a button that writes the question for you, already explaining that you are a beginner, which course you are taking, and what you are stuck on. Copy it into ChatGPT or Claude and you get an answer pitched at you rather than at a graduate.

one honest warning about asking an AI for C++

It will happily write the whole assignment for you, and that is the fastest way to reach week eight unable to do any of it. Ask it to explain, not to write. The questions on these pages are deliberately worded that way — they ask for an explanation with a small example, and explicitly ask it not to hand you code.

Stuck? Peter reads these personally and replies to your email.
Ask Peter →