C/C++

38 tutorials in 2 subcategories

This is the deepest section of the list, and most of it is systems programming in C. Good first projects are short and self-contained: Stephen Brennan's Write a Shell in C, Write a hash table in C, and Build Your Own Text Editor, which walks through about a thousand lines of C to recreate antirez's kilo editor step by step. Building a CHIP-8 Emulator and Write Your Own Virtual Machine (an LC-3 VM) are small enough to finish in a weekend and teach how a fetch-decode-execute loop works.

For language implementation, Build Your Own Lisp by Daniel Holden builds a small Lisp in C, and Crafting Interpreters by Robert Nystrom is a free online book whose second half (chapter 14 onward) builds a bytecode virtual machine in C. Nora Sandler's Write a C compiler is a 10-part series that compiles a growing subset of C to x86 assembly, and Brian Callahan's Let's write a compiler runs 8 parts. The LLVM Kaleidoscope tutorial and the two-part minimal x86-64 JIT compiler in C++ cover code generation from the other direction.

Operating systems and storage projects come next: How to create an OS from scratch (cfenollosa/os-tutorial), Let's Write a Kernel, Write a Bootloader in C, Linux Container in 500 Lines of Code, and Let's Build a Simple Database, which builds a SQLite clone. Sy Brand's Writing a Linux Debugger (10 parts) and Build Your Own Redis are good capstones. For games and graphics, try Lazy Foo's SDL tutorials, Space Invaders from Scratch (5 parts) and Dmitry Sokolov's tiny 3D graphics projects, which include tinyrenderer and tinyraytracer.

Subcategories

More C/C++

Esc

Type to search every entry. ↑↓ to move, Enter to open.