~/talk

Conquering Complexity: Refactoring JavaScript Projects

slides:none on file

Shows how to find and shrink real complexity using cognitive complexity scores (example: a function rated 34 flagged to cut to 15), using SonarLint and its ESLint plugin to pinpoint the worst nesting. Demonstrates concrete refactors: invert conditions and early return, structural collapse, extract helper methods, add unit tests before refactoring, and use language features like optional chaining and the nullish coalescing assignment (??=). The result is smaller scores, clearer functions, and safer changes.

AI-written summary · about

  1. 0:00Introduction and speaker background
  2. 3:13Understanding complexity in code
  3. 8:55Measuring cognitive complexity
  4. 13:12Identifying complexity in projects
  5. 18:30When to refactor complex code
  6. 22:20Reducing nesting in JavaScript
  7. 34:24Writing code for others
  8. 35:06Recap and tools for complexity
~/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.