Clarity
summary
Compares two Elixir solutions for counting monotonic "password" integers: an obscure 20-line version vs a clarified rewrite that becomes a linear-time algorithm (counts 100-digit monotonic integers in ~100 steps instead of ~350 billion), using Elixir with Phoenix/Ecto idioms, schema-based normalization and conn tests. Recommends separation of concerns (interface/core), typeful specs, small linearized PRs and collaborative code reviews focused on clarity, plus tests that exercise behavior not implementation details and frequent refactoring to keep the codebase maintainable.
AI-written summary · about
chapters (23)
- 0:00Start
- 5:39What Are Valid Passwords of the Given Length
- 5:53What Are Monotonic Integers
- 11:41Practice of Code Reviews
- 14:43Pull Requests
- 18:35Separation of Concerns
- 20:21Concrete Examples
- 22:01Phoenix Namespace
- 22:49Type Specification
- 28:01Implementation of the Core Function
- 32:11Purpose of Tests
- 32:33Tests for the Purpose of Testing
- 37:59Test Code Is Code
- 39:14Register Helper
- 40:28Public Api
- 42:21Summary
- 48:35Practices of Code Review
- 51:02Questions
- 55:52How To Separate Interface from the Core
- 59:04Testing
- 1:01:50Code Reviews
- 1:03:51Second System Effect
- 1:07:15Internal Dsls
related talks
01h 06mKeynote: What's Ahead for Elixir?
22mRefactoring Elixir for maintainability
01h 52mPurple Carpet
37mTaking Elixir Live at a Bank
40mExecutable Contracts for Elixir
47mElixir for curing product development pains
39mPilgrim's Progress to the Promised Land
44mElixir & Phoenix - Fast, Concurrent and Explicit
