← docs.speechwave.live

The Old Sock introduction to Elixir & Speechwave

For Ruby developers who need to read and modify the codebase

Why "Old Sock"?

Like a well-worn sock, this guide may have a few holes in it. It was built lesson-by-lesson to get a Ruby developer productive in the Speechwave codebase as fast as possible, not to be a comprehensive Elixir textbook. Where coverage is thin, you'll find links to authoritative external resources. Following those links and filling in the gaps yourself is part of the learning.

Who this is for

You're an experienced programmer with Ruby background. You've probably used Rails. You may have never touched a functional language. You need to read, understand, and modify a Phoenix LiveView application, specifically Speechwave.

This guide won't teach you what a variable is or how a for-loop works. It will teach you how Elixir thinks differently from Ruby, and how those differences show up in every file of this project.

How it's organized

Eight lessons, each grounded in real Speechwave code. Every example is pulled from the actual codebase, with no toy examples and no abstract exercises. Ruby comparisons are used where they clarify, but the goal is to think in Elixir, not to translate.

  1. Pattern Matching: the = operator isn't assignment, and that changes everything
  2. The Pipe Operator: how |> replaces method chaining with something more flexible
  3. Modules & Structs: how Elixir organizes code without classes
  4. The LiveView Lifecycle: mount, handle_event, assigns, and real-time updates
  5. Ecto Queries: reading and writing database code (Ecto vs ActiveRecord)
  6. Testing with ExUnit: test structure, assertions, LiveView testing, PubSub testing
  7. GenServer: stateful processes, supervision, and "let it crash"
  8. Debugging: IO.inspect, dbg, IEx.pry, and the runtime console

Each lesson includes interactive quizzes or hands-on exercises, and ends with a suggested next step, usually reading a specific Speechwave file with fresh eyes.

How to get the most out of it

The underlying premise: You don't need to master Elixir to be productive in this codebase. You need to recognize about a dozen patterns that appear everywhere, understand how Phoenix wires things together, and know where to look when something is unfamiliar. That's what these lessons deliver.

Prerequisites

Ready? Start with Lesson 1: Pattern Matching.