No more pyramids -- Tools to keep callbacks neat
summary
Claims that deep nested callbacks (examples with five levels deep) make code untestable and hard to reason about and shows incremental fixes: name callbacks and use Function.bind for partial application to make handlers testable; adopt async.js for common flow patterns (waterfall, parallel, map) and switch to promises to treat pending results as immediate IOUs (examples with three queries / three files and the tweedart project); demos glue code that uses ES6 generators plus yield to await async results in Node 0.11 (harmony) and Chrome Canary.
AI-written summary · about
chapters (7)
- 0:00Introduction
- 6:45HTHJS
- 9:13Root problem
- 10:14Promises
- 16:43Weight
- 24:08Parallel processes
- 25:51Summary








