~/talk

Code Factorization: How to Organize Boilerplate Code

Talkat JSConf Korea 2020 Home Edition · on Sunday, 2020-09-20· [developer-experience]
links:none on file
slides:none on file

Claim: extracting three parameters (collection, step function, initial) into a Loop higher-order function replaces repeated iteration in sum and evens and visibly reduces cognitive load. Implementation details include parameterizing case dispatch as tuples of predicate/action, composing small functions with pipe, using identity function as a default, and currying to produce lift/map variants. Demos show the refactors compile to simpler code and clarify intent; deeper mentions include Y combinator, functor, monad, and optics as next steps.

AI-written summary · about

  1. 0:00Code factorization intro
  2. 1:24Boilerplate code overview
  3. 3:36Cognitive load and readability
  4. 6:10Five paradigms to remove boilerplate
  5. 6:53Limitations of object-oriented programming
  6. 7:57FP as solution
  7. 9:01Higher-order functions in practice
  8. 10:50Abstracting case inspections
  9. 13:29Boilerplate in constant calculations
  10. 15:20Function composition with pipe
  11. 18:25Identity function power
  12. 21:29Identity for abstraction
  13. 23:24Currying and multi-angle views
  14. 26:47Lifting functions
  15. 27:11Advanced FP concepts
  16. 29:46FP benefits summary
  17. 30:56Choosing the right paradigm
~/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.