logo
build-your-own.org
 |  BOOK BLOG
🔔 SUBSCRIBE
build-your-own.org

Build Your Own X From Scratch Books

Level up your coding skills. By building projects from scratch. With succinct & condensed books.

Redis Database Compiler Interpreter Web Server

The What & Why of “Build Your Own X From Scratch”

Pick a tool or software that you know, and try to recreate it by coding it from scratch. “From scratch” means not just glueing components together, but taking the time to understand how stuff works.

Why take on challenges like this? The benefits?

Build Your Own Redis with C/C++

Learn network programming and data structures by building a Redis-like server from scratch with C/C++.

  • Why build Redis? Redis exposes you to basic data structures and system programming (mainly network programming), both of which are overlooked by most developers. You can study 2 important subjects in 1 project.
  • Why start from scratch? A quote from Richard Feynman: “What I cannot create, I do not understand”. Reading about things often just gives you an illusion of knowledge. Learn deeper by doing!
  • Why C? C was, is, and will be widely used for system programming and infrastructure software. And C is unavoidable for learning low-level stuff. Learn C today and you'll appreciate in the future.
  • Why a book? The real Redis project is a large code base built with lots of effort. The book isolates the core concepts and guides you through small steps.
Read Now! Purchase. Subscribe

Build Your Own Database From Scratch

Understand databases from the bottom up by building your own, in small steps, and with simple Golang code (language agnostic).

Content included:

  • Making data durable. Why databases instead of files? Working with fsync.
  • Coding a B+tree — the data structure that enables efficient queries and incremental updates.
  • Achieving concurrent transactions via immutable (copy-on-write) data structures.
  • Relational DB on top of KV. How high-level features such as tables, primary keys, and secondary indexes are mapped to B+tree operations?
  • A small query language. How to parse the language and evaluate expressions (building an interpreter).
Read Now! Purchase. Subscribe

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 implementation. Compiles a static-typed language into x64 ELF executables.

Content included:

  1. Simple interpreter. Get your own programming language up and running.
  2. Bytecode compiler. A step closer to the machine.
  3. x64 assembly & instruction encoding. Understand how the machine works.
  4. Translate bytecode to x64 code. Bridging the virtual machine to the real machine.
  5. Generate binary executables. Putting it all together.
Read Now! Purchase. Subscribe

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.
    • HTTP semantics and syntax.
    • Recreate critical tech with your own code.
  • Beyond coding exercises.
    • Discusses the gap between toy and production.
    • Overlooked concepts, such as backpressure and resource ownership.
  • WebSocket extension.
    • Solidify learning with a message-based protocol.
    • Introduction to concurrent programming.
Read Now! Purchase. Subscribe
Reddit
Telegram