~/talk

Conquering complexity: refactoring JavaScript projects

Talkat NDC Sydney 2024 · 2024-02-12..02-16· [javascript, frontend-architecture]
slides:none on file

Claims that cognitive complexity (introduced 2016) predicts how hard code is to hold in the head better than cyclomatic metrics, and shows real results: open‑source scans find functions up to ~100–120, a demo reveal-confetti function is ~90 lines and scores 16. Recommends tooling (SonarCloud and SonarLint, eslint-plugin-sonarjs), strict tests before refactoring, and concrete refactor moves — invert conditions/early return, collapse adjacent conditionals, extract helpers, use optional chaining and nullish assignment — applied without changing behavior.

AI-written summary · about

  1. 0:00Introduction
  2. 1:06Code complexity explained
  3. 3:56Measuring complexity metrics
  4. 11:15Finding complex functions
  5. 15:28Refactoring effectively
  6. 20:43Reducing cognitive complexity
  7. 33:14Summary and tools
  8. 38:06Q&A
~/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.