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 Regex Engine 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? The knowledge required is broader and deeper than usual application-level development. It's a good way to level up your skills (mainly network programming and data structures).
  • Why start from scratch? A quote from Richard Feynman: “What I cannot create, I do not understand”. Human understanding is full of holes aka “things I don't know that I don't know”. Building from scratch is one way to ensure that your understanding is complete.
  • Why C? C is widely used in system programming and infrastructure software. Learn how C is used in real projects, with simple C code. No prior C/C++ experience is required.
  • Why a book? The Redis project is a complex software system built with a lot of effort, which can be hard to grasp for beginners. The book breaks down the core concepts into easily digestible steps.
Read Now! Purchase. Subscribe

Build Your Own Database From Scratch

Databases are not black boxes. Understand them by building your own from scratch!

From B-tree to KV store, then relational DB, in small steps and straightforward Golang code.

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

Ever wondered how computers turn source code into working software? You can learn the art by building your own mini-compiler.

A succinct book walks through a minimal yet complete compiler implementation. Compiles a static-typed language into x64 ELF executables.

Content included:

  • Simple interpreter. Get your own programming language up and running.
  • Bytecode compiler. The next step after the interpreter.
  • x64 assembly & instruction encoding. Understand how the machine works.
  • Translating bytecode into x64 code. Run your language natively on the machine.
  • Generating binary executables. The final step to a working compiler.
Read Now! Purchase. Subscribe

Build Your Own Web Server From Scratch In JavaScript

Understand the basis of the Web by coding a web server from scratch.

Learn network programming, HTTP protocol and their applications in one book.

Part I: Make A Basic HTTP Server

  1. Introduction
  2. HTTP Overview
  3. Code A TCP Server
  4. Promises and Events
  5. Protocol Parser
  6. HTTP Semantics & Message Format
  7. Code Your First HTTP Server

Part II: Applications & Extensions

  1. Serving Dynamic Contents
  2. Static Files and Caching
  3. Proxies and Load Balancers
  4. Timeouts
  5. WebSocket and Messaging
Read Now! Subscribe
Reddit
Telegram