~/talk

Don't write spaghetti code in server side JavaScript

Talkat JSConf.eu 2010 · 2010-09-25..09-26· [nodejs, javascript]
slides:none on file

Core claim is simple and actionable: don't block the event loop or a long callback prevents any other events from running so timers and network callbacks never fire. Examples use Node's EventEmitter, setTimeout and a busy while loop to demonstrate the failure mode, and note Node handles thousands of concurrent connections only if callbacks are short. Recommended pattern is concrete: create request objects with named functions and factory methods to encapsulate state and free memory. A proof of concept is a DNS server in node that runs but feels "scary" to implement.

AI-written summary · about

  1. 0:00Start
  2. 3:58The Event Loop Postman
  3. 7:19Event Emitter
  4. 11:12Cli Pipes
  5. 16:10Streams
  6. 18:13Encapsulate
  7. 19:18Document Your Flow Callbacks
~/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.