Skip to content

Instantly share code, notes, and snippets.

@pepasibble
Last active June 21, 2021 16:13
Show Gist options
  • Save pepasibble/4ae4223d7948c20affc487e2ca64755a to your computer and use it in GitHub Desktop.
Save pepasibble/4ae4223d7948c20affc487e2ca64755a to your computer and use it in GitHub Desktop.
Notes on Gary Bernhardt's "Boundaries" talk

Notes on Gary Bernhardt's "Boundaries" talk

https://www.destroyallsoftware.com/talks/boundaries

  • test doubles
  • test isolation example: Sweeper
    • win: enables test-driven design
    • win: outside-in tdd (top-down)
    • win: fast tests
    • lose: mocks and stubs may diverge from reality
  • how can we fix the problems with isolated unit testing?
    • contract & collaboration tests
    • use tools (rspec-fire)
    • static typing / static mocks
    • use integration tests (don't isolate)
      • but integration tests are a scam
        • don't scale (too many paths)
        • superlinear test suite runtime
  • values
    • pure functions are naturally isolated
    • let values be the boundaries
  • paradigms
    • procedural
    • OOP
    • functional
    • fauxO
  • functional core / imperative shell
    • core:
      • many paths
      • no dependencies
      • isolated
      • naturally suited to unit testing
    • shell
      • few paths
      • many dependencies
      • integrated
      • naturally suited to integration testing
  • concurrency
    • actor model
      • processes with inboxes (queues)
      • the value is the boundary

terminology to follow up on:

  • test doubles vs mocks vs stubs

let simple values be the boundaries between systems.

Screen Shot 2021-04-06 at 2 37 22 PM

Screen Shot 2021-04-06 at 2 38 03 PM

Screen Shot 2021-04-06 at 2 38 44 PM

Screen Shot 2021-04-06 at 2 38 52 PM

Screen Shot 2021-04-06 at 2 39 40 PM

Screen Shot 2021-04-06 at 2 39 53 PM

Screen Shot 2021-04-06 at 2 56 26 PM

Screen Shot 2021-04-06 at 2 57 00 PM

Screen Shot 2021-04-06 at 2 57 18 PM

Screen Shot 2021-04-06 at 2 57 56 PM

Screen Shot 2021-04-06 at 2 58 12 PM

Screen Shot 2021-04-06 at 2 58 43 PM

Screen Shot 2021-04-06 at 2 59 16 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment