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
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.00beginner · 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.
Read sample + add -
02
Supervisors That Self-Heal
$5.00intermediate · 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.
Read sample + add -
03
Queries Without the N+1
$4.00intermediate · 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.
Read sample + add -
04
A TCP Chat in 100 Lines
$3.00intermediate · 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.
Read sample + add -
05
Idempotent Payments
$6.00advanced · 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'.
Read sample + add
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.