~/talk

Acceptable Upgrades

Talkat Code BEAM America 2025 · 2025-03-06..03-07· [legacy-modernisation, testing]
slides:none on file

Legacy DB forces tests to use a full production dump so initial tests require at least 18 records and run painfully slow. The remedy is concrete: draw the schema, enforce module boundaries with Boundary library (Sashi Yurika) so code forms a DAG, move Ecto schemas into their own namespace, prefer functional composition for fixtures, and mock only external services while calling prod code in tests. Tools used include Phoenix, Ecto, ExMachina and LiveView test helpers; result is rapid, incremental tests and safer refactors without changing the legacy schema.

AI-written summary · about

  1. 0:00Introduction
  2. 2:18Schema dependencies
  3. 5:49Clean code boundaries
  4. 8:56Namespaces and buckets
  5. 12:05Minimal test dependencies
  6. 14:51Syntactic sugar in testing
  7. 16:36Functional core contexts
  8. 18:45Ecto schemas vs mutations
  9. 20:33Functional query composition
  10. 23:24Ecto.Query rules and tests
  11. 25:10Test data with relationships
  12. 27:41Closing thoughts and further exploration
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.