~/talk

Immutable Ruby

Talkat RubyConf AU 2013 · 2013-02-20..02-22· [ruby]
links:none on file
slides:none on file

Shows concrete Ruby/ Rails bugs caused by mutable state (memoized fullname, verified email changes, AR errors, hash keys breaking), then builds workable alternatives: values gem value objects for fast, DB‑free tests; ice_nine deep freeze and an immutable ActiveRecord mixin for write‑once tables; event sourcing with Postgres as the canonical event store and Neo4j replayed back into Postgres; and Hamster persistent vectors for immutable collections, with tradeoffs: more allocations and occasional performance workarounds.

AI-written summary · about

  1. 0:00Start
  2. 0:05Immutable Ruby Michael Fairley @michaelfairley
  3. 0:17Braintree
  4. 1:16Mutation causes problems
  5. 4:28Date & Time January 8, 2011
  6. 5:00Text Michael "In the beginning..."
  7. 7:33Values helps define your boundaries
  8. 7:48Testing value objects is simple and fast
  9. 10:29Values don't need methods
  10. 12:41Capture all changes to application state as a sequence of events
  11. 13:40Events Debits and credits (12/6/2012 16:30,"35.00", 110, 7)
  12. 13:52Derived state Balance
  13. 18:55Immutability lets you break the rules
  14. 19:47Normalization
  15. 24:00Boundaries Function Core/Imperative Shell
  16. 26:05PDSs are (somewhat) efficient
~/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.