~/talk

Strong Duck Type Driven Development

Talkat RubyConf 2014 · 2014-11-17..11-19· [ruby]
slides:none on file

Claim: adding enforceable inter-object contracts to Ruby catches interface breaks earlier and guides fixes. Demonstration shows renaming quack to loud_quack breaks Ruby tests silently but Go compiler surfaces missing methods; a Ruby gem lawyer gem plus RSpec helper contract double enforces contracts at load and in tests, failing immediately with a useful missing-method message. Built examples include duck/brain/visual_cortex code, contract-driven specs, and successful refactors swapping implementations without runtime surprises.

AI-written summary · about

  1. 0:00Intro
  2. 0:11Strong Duck Type Driven Development John Cinnamond
  3. 1:25How do you build a duck?
  4. 1:41What is a duck?
  5. 2:06Let's deconstruct a duck
  6. 5:13I was required to change the Floaty bit too
  7. 7:09Let's build a duck
  8. 9:29How would we write it in Go?
  9. 12:57DuckBrain knows nothing about Beak
  10. 13:09Interfaces are no longer intangible
  11. 18:23The toolchain helps enforce the types
  12. 18:39We check the type before runtime
  13. 19:24in 8 years of writing ruby code
  14. 20:04The compiler hints about how to fix it
  15. 20:16The object don't know about each other
  16. 28:21Writing new code is easy
  17. 28:42We use TDD to make refactoring
  18. 28:57Contracts make refactoring messages easier
  19. 29:31Change the messages between objects
  20. 30:34Replace implementations
  21. 31:32The tests tell us what to write next
  22. 31:42We focus on isolated parts of the system
  23. 32:03messages between parts of the system
  24. 32:53Noticed accidental coupling...
  25. 33:09duck typing...
  26. 33:24Use errors to drive our development
  27. 33:35Avoids ball-of-mud code
~/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.