GatheredEdition
← All books
Cover of A Weekend With Elixir — Sampler

A Gathered Edition book

A Weekend With Elixir — Sampler

by Allan MacGregor

Five self-contained chapters to taste the Gathered Edition model.

  • Chapters 5
  • Reading ≈ 80 min
  • Skill
  • Level Beginner → Advanced
  • Formats PDF · EPUB
  • Updated Jul 2026
elixirfundamentalsotpectonetworkingfintech

What you'll learn

  • Read and destructure any Elixir data shape with confidence.
  • Design a supervision tree that isolates failure and restarts cleanly.
  • Spot and kill N+1 query patterns in Ecto with preloads and joins.
  • Build a concurrent TCP chat server from scratch with processes.
  • Process money safely so retries never double-charge.

Before you start

Elixir 1.15+ · a terminal · one free weekend

Inside the book

Tap a chapter to add it →
  • 01

    Pattern Matching, Deeply

    $4.00

    beginner · 14 min read

    You'll be able to · Read and destructure any Elixir data shape with confidence.

    Pattern matching is not assignment — it's a claim about shape. Once it clicks, half of Elixir falls into place.

  • 02

    Supervisors That Self-Heal

    $5.00

    intermediate · 18 min read

    You'll be able to · Design a supervision tree that isolates failure and restarts cleanly.

    "Let it crash" only works because something is watching. That something is a supervisor.

  • 03

    Queries Without the N+1

    $4.00

    intermediate · 12 min read

    You'll be able to · Spot and kill N+1 query patterns in Ecto with preloads and joins.

    The slowest page you'll ever ship is usually one innocent loop over an association.

  • 04

    A TCP Chat in 100 Lines

    $3.00

    intermediate · 16 min read

    You'll be able to · Build a concurrent TCP chat server from scratch with processes.

    Sockets, processes, and message passing — a tiny chat server is the perfect way to feel them work together.

  • 05

    Idempotent Payments

    $6.00

    advanced · 20 min read

    You'll be able to · Process money safely so retries never double-charge.

    On the internet, every request happens zero, one, or many times. Money demands you handle 'many'.

About the author

Allan MacGregor

Allan MacGregor is a hands-on engineering leader and CTO with a decade of experience across eCommerce, FinTech, and HRTech. He's the author of the Magento PHP Developer's Guide and writes prolifically about Elixir, OTP, and building reliable systems on the BEAM.

More from the bookshelf