~/talk

Test Doubles Are A Scam

Talkat Functional Swift Conference 2017 · on Saturday, 2017-04-15· [testing]
links:none on file
slides:none on file

Claim: test doubles are a scam because they encourage mixing logic and effects and hide poor architecture. Demonstrations use Elm-style commands and a Swift Request struct that returns a value describing network effects, a pure Handler for a Slack-style ++ bot, and a Twitter activity view model that emits Request value describing effect so tests verify values not network calls. Result: unit tests become simple value-in/value-out and snapshot tests replace mocks, enabling reuse and a single imperative shell that, according to reported experience, reduces brittle tests and follows functional core, imperative shell.

AI-written summary · about

  1. 0:00Intro
  2. 1:00Bad tests exist
  3. 1:44The best code is easy to test
  4. 2:28Unit tests vs. integration tests
  5. 4:54Test doubles verify effects
  6. 5:41Programs combine logic and effects
  7. 14:51Functional core, imperative shell
  8. 15:56Impure functional programming
  9. 16:44Value types for side effects
  10. 22:00The system executes values
  11. 23:54Functional UIkit?
  12. 27:57class Root Controller: UIViewController
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.