Why C: The Machine You're Programming
You've been writing code in a language that lies to you — kindly, deliberately. When you write array.push(x) in Ruby or list.append(x) in Python, something is allocating memory, c…
Systems Programming (C and Zig) covers: Part A: C Fundamentals, Part A: C Fundamentals (continued), Part B: Zig — A Modern Systems Language, Part B: Zig — A Modern Systems Language (continued). Year 1, Quarter 1. Includes 14 exercises and 2 projects.
This course unlocks once you've finished its prerequisite. Open prerequisite →
You've been writing code in a language that lies to you — kindly, deliberately. When you write array.push(x) in Ruby or list.append(x) in Python, something is allocating memory, c…
Every variable lives somewhere in memory. In most languages, you never need to know where — the language manages addresses for you. C exposes the address as a first-class value: a…
So far the variables you've declared in C have lived in places the compiler chose for you — local variables on the stack, globals in a fixed region. Both have fixed lifetimes (loc…
You can now do real C: declare variables, use pointers, allocate memory, free it. What you can't yet do is organise that work the way real C codebases do. Real codebases group rel…
You've just spent four lessons learning C — pointers, manual memory, structs, the preprocessor, the four-stage build. Some of it felt clean (pointers, structs). Some of it felt li…
- [ ] Implement strlen, strcpy, strcmp in C from scratch — Beej's Guide exercises - [ ] Write a C program that reads a file and counts lines, words, characters (mini wc) — File I/…
- [ ] Implement a dynamic array (vector) in C with push, pop, get, automatic resizing — Manual memory management - [ ] Implement a linked list in C with insert, delete, reverse, f…
- [ ] Write a memory allocator in C (mymalloc, myfree) using sbrk — Systems programming deep dive - [ ] Implement a concurrent-safe queue in Zig using atomics — Modern systems con…
- [ ] Build a grep clone in C — read files, match patterns (fixed strings first, then basic regex), print matching lines with line numbers, support -i, -c, -r flags
Write a program that allocates variables on stack and heap, prints their addresses, and visualizes the memory layout. Show how arrays decay to pointers, demonstrate buffer overflo…
Implement a safe string library: mystrlen, myconcat, mysplit, mycontains. Use Zig's slice types and error unions instead of C's null-terminated strings. Compare the Zig and C appr…
- [ ] What is the difference between stack and heap memory? When is each used? - [ ] What is a pointer in C? What is pointer arithmetic and why is it dangerous? - [ ] What is a bu…
12 lessons. Read in order; spiral back when you need to. By the end you'll have used the core ideas twice — once on the abstract, once on something you'll meet at work next week.