Level up your coding skills. By recreating tech from scratch. With step-by-step guides.
Build Your Own x From Scratch Books
The what & why of “build your own X”
Pick a tool or software and try to recreate it by coding it from scratch. “From scratch” means not just glueing components together, but taking the time to learn how stuff works.
Why take on such challenges? The benefits?
-
Project-based learning.
CS topics such as data structure and operating systems
are overlooked due to lack of practice.
And best practices are based on real-world projects.
- Students without experience can solidify their learning.
- Developers without CS education can discover the gap.
- Master fundamentals. Not all knowledge is equally valuable, and some is further devalued by AI, such as “how to do X in framework Y”. All “from scratch” projects are connected to CS fundamentals. Use them as a guide to take your skills to the next level.
- Advance your career. Prepare for more technical, system-y work! Not every job is about CRUD, and more options are nice. These projects are also nice things to put on a resume, especially if you have no experience.
- Computers are fun. Partly because you can study, understand, and recreate almost any software. Projects like this are flexible, you can always pick a topic and go deeper.
Build Your Own
Redis with C/C++
Network programming, data structures and low-level C/C++.
- Why build Redis? Data structures and systems programming are what application developers lack. Redis is a perfect medium to acquire the knowledge & experience.
-
Start from scratch?
A quote from Feynman: “What I cannot create, I do not understand”.
Learn by doing instead of
reading. - Why C? C was, is, and will be widely used for infrastructure or low-level software. Learn C today instead of chasing fads, and you'll appreciate it in the future.
- Why a book? The real Redis is a large code base with lots of details. We'll only touch on the essentials via small steps.
Build Your Own
Database From Scratch
Learn databases from the bottom up by coding your own, in small steps, and with simple Go code (language agnostic).
- Atomicity & durability.
A DB is more than files!
- Persist data with
fsync
. - Crash recovery.
- Persist data with
-
KV store based on B-tree.
- Disk-based data structures.
- Space management with a free list.
- Relational DB on top of KV.
- Learn how tables and indexes are related to B-trees.
- SQL-like query language; parser & interpreter.
- Concurrent transactions with copy-on-write data structures.
From Source Code
To Machine Code
Build a compiler to learn how programming languages work. Use low-level assembly to learn how computers work.
Walks through a minimal yet complete compiler. Compiles a static-typed language into x64 ELF executables.
Step by step Python code (language agnostic):
- Simple interpreter. Get your own language up and running.
- Bytecode compiler. Virtual computer within real computer.
- x64 assembly & instruction encoding. Learn the real machine.
- Translate bytecode to x64 code. Bridge virtual and real.
- Generate binary executables. Put it all together.
Build Your Own
Web Server
From Scratch In Node.JS
Learn network programming and HTTP by coding a web server.
- Network programming.
- Socket API and the event loop in Node.JS.
- Protocol design and implementation.
- Promises and
async/await
.
- HTTP in detail. Semantics and syntax.
- Beyond coding exercises.
- Discusses the gap between toys and production.
- Overlooked tech, backpressure, resource management, etc.
- WebSocket extension.
- Message-based protocol; another paradigm.
- Introduction to concurrent programming.
A Visual Guide
To CSS
Explaining the hard parts of CSS with illustrations & diagrams.
Build your own web pages.
- Time to relearn! Modern CSS (2024) is much easier and saner, especially with flexbox and grid. Tricks and hacks are the past.
- Show AND explain, not just list some recipes. You can easily Google any CSS task, but why is CSS still hard? Because you missed the basics.
- Visually explained. Densely packed with illustrations and diagrams. A picture is worth a thousand words.
- Tackle the hard parts because that’s what’s frustrating, but important. This is NOT a tutorial to make easy stuff easier.