~/talk

Push your side effects to the edge

Talkat Dutch PHP Conference 2024 · 2024-03-12..03-15· [serverless]
slides:none on file

A Laravel script that syncs supplier stock and pricing starts as a cursor over Product models, calling a remote client and saving each product; tests are slow and full of DB mocks. The refactor extracts single‑product logic into pure functions, keeps HTTP and DB calls at the integration layer, and turns most specs into fast unit tests while retaining a few integration tests. The tradeoff is more small files and tests, but faster feedback and clearer rules for price updates versus product deactivation using the client response.

AI-written summary · about

  1. 0:00Quest for better software
  2. 1:07Legacy code dilemma
  3. 9:57Typical code consequences
  4. 13:04Dependency injection
  5. 20:12Functions context and side effects
  6. 24:46Car analogy for optimization
  7. 28:06Side effects to the edge
  8. 33:25Pure functions benefits
  9. 36:14When to use approach
  10. 38:03Design tradeoffs
  11. 41:35Q&A
  12. 41:56Tradeoffs with managers
  13. 44:47Office background theme
  14. 45:33Combining architectures
  15. 47:22Purifying codebases
  16. 50:17Mixed architecture worries
~/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.