~/talk

How Programming in Other Languages Made my Ruby Code Better

Talkat RubyConf Philippines 2017 · 2017-03-16..03-18· [ruby]
slides:none on file

Shows concrete refactorings: converting ActiveRecord models into structs-as-data to stop in-object state and save an HTTP request by making renew a class method, moving business logic into functional-like services that return new data objects (tests become simpler), and adopting explicit dependency injection so tests swap coffee-machine implementations. Cites Go and Elixir influences, a real 140-line experiment service, and static-analysis metrics that drop severity from E to A after changes, proving measurable improvements in maintainability and testability.

AI-written summary · about

  1. 0:00Start
  2. 6:51Structs to the rescue
  3. 10:30Stateless business logic
  4. 16:05Reduce side effects caused by states, improving test effectiveness and code maintainability Simplify tests by reducing context setup Slim down model objects removing third-party interactions Expose the business logic in a centralized place, with clear and easy to test methods
  5. 19:32Simplify tests by being able to better isolate dependencies Improved unit testing (use integration tests for comprehensive coverage) Speed up tests by not having to test unnecessary code due to internal state changes
  6. 20:04Dependency injection
~/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.