~/talk

Refactoring Techniques for Elixir, Ecto, and Phoenix

Talkat ElixirConf 2016 · 2016-09-01..09-02· [developer-experience]
links:none on file
slides:none on file

Shows concrete refactorings applied to a working tic‑tac‑toe app (called Pokemon go 2.0 / knots and crosses) so code before/after is visible and tests still pass; uses Elixir pattern matching and multiple function heads to replace nested if/case, moves GenServer logic into a Game struct module, uses with/else for readable pipelines, switches maps to structs, applies Ecto.Multi and Repo.aggregate for transactional DB work, and uses Phoenix plugs and overridden action to surface friendly errors.

AI-written summary · about

  1. 0:00Intro
  2. 0:30WHAT IS REFACTORING?
  3. 6:13WINNING CRITERIA
  4. 9:54APPLICATION STRUCTURE
  5. 13:55WHY REFACTOR?
  6. 14:24CASE TO FUNCTION
  7. 15:17MOVE CALLBACK CODE TO FUNCTIONS
  8. 19:21CASE TO PIPELINE
  9. 22:23USE STRUCTS
  10. 23:34MOVE CODE TO STRUCT MODULE
  11. 24:44COUNTING
  12. 28:17ECTO.MULTI
  13. 31:43OVERRIDING ACTION
  14. 32:01FIND WITH PLUG
  15. 34:36SUMMARY
~/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.