Upgrade to Pro — share decks privately, control downloads, hide ads and more …

node.js: the smallprint

node.js: the smallprint


Dominykas Blyžė

May 30, 2013


  1. node.js: the smallprint By ( ), 2013-05-30 Dominykas Blyžė @dymonaz

  2. If you're ever in Vilnius... Try to visit the Soviet

    Bunker (survival drama) http://sovietbunker.com/en/
  3. Node is street food. , And now you have diarrhea

    @tomdale https://twitter.com/tomdale/status/291788972961701888
  4. node.js sucks

  5. node.js sucks node.js is awesome, but terms and conditions apply

    - prepare to have major headaches, also make sure to refresh your vocabulary of curse words. The marketing lies.
  6. Questions? Slides: ; http://dominykas.net/14 @dymonaz

  7. Does node suck, because JS sucks? WAT: [ ] +

    [ ] > " " [ ] + { } > " [ o b j e c t O b j e c t ] " { } + [ ] > 0 { } + { } > N a N https://www.destroyallsoftware.com/talks/wat http://stackoverflow.com/questions/9032856/what-is-the-explanation-for-these-bizarre- javascript-behaviours-mentioned-in-the
  8. HA HA! © Nathan Smith, http://www.flickr.com/photos/nathansmith/4704268314/

  9. You could be using PHP, you know... F a t

    a l e r r o r : E x c e p t i o n t h r o w n w i t h o u t a s t a c k f r a m e i n U n k n o w n o n l i n e 0 http://phpsadness.com/sad/16
  10. How often is JS the problem? Anyone ever WAT in

  11. Does node suck, because it uses a single thread?

  12. Don't do Fibonacci-as-a- Service You don't take an airplane to

    go to work... All our pages have onload of <1s on one core.
  13. Does node suck because it's not stable? The core is

    only growing better!
  14. One API to rule them all m y F u

    n c ( . . . , c a l l b a c k ) { . . . } c a l l b a c k ( e r r o r , . . . ) { . . . }
  15. Callback hell? Use promises. Just do.

  16. What does NOT suck in node.js?

  17. Speed V8 and non-blocking I/O

  18. Speed Loads fast Executes fast Reads/writes fast Dies fast

  19. socket.io Very stable Just works

  20. Shared* server/client code * unless you share what you shouldn't

  21. So why does node.js actually suck?

  22. 29k+ 31k+ modules

  23. Unix philosophy? , I think I'll go write a new

    g r e p . “ Write modules that do one thing well. Write a new module rather than complicate an old one. ” @izs http://blog.izs.me/post/48281998870/unix-philosophy-and-node-js
  24. Number of modules is NOT a good indicator Growth in

    number of modules is NOT an indicator of a healthy ecosystem.
  25. Sturgeon's Law “ninety percent of everything is crap”

  26. None
  27. memcache https://npmjs.org/package/memcache https://npmjs.org/package/memcached #22: Incorrect detection of the record "END"

    #45: data that contains "\r\nEND\r\n" gets uncorrect result
  28. Annoying bugs Should not have happened: " s ø m

    ė š † ® į ñ g " . l e n g t h vs B u f f e r . l e n g t h ( " s ø m ė š † ® į ñ g " ) M a t h . r o u n d ( M a t h . r a n d ( ) * x ) / s o m e u r l ? q
  29. Don't "this is OSS" me Don't publish modules for "fame".

    Must have a system for negative feedback. Users need to be able to tag modules. "We're awesome - fuck off" <- people will. No more #KumbaYo.
  30. Small modules and small applications Life is not small. Business

    problems are not small.
  31. Lots of small problems <-> Several medium sized problems <->

    One big problem
  32. How often do you n p m u p d

    a t e ? Every morning? Then spend the rest of the day fixing bugs after the update.
  33. Versioning problem solved? node-internal-combustion-engine @ v1 car-factory-daemon @ v1 node-internal-combustion-engine

    @ v2 node-truck-factory @ v3 car-factory-daemon @ v2 node-internal-combustion-engine @ v666
  34. Also sucks*: express handlebars n o d e _ m

    o d u l e s as a folder name Native (compiled) modules * not always, obviously. "it depends", obviously. Let's talk afterwards.
  35. One language to rule them all

  36. Different patterns What is absolutely bad is that if node.js

    won't be minimally aligned with the rest of the code in the browsers out there our life as "one language everywhere" will become harder than ever. , @WebReflection http://webreflection.blogspot.de/2012/01/on-eventemitter-in-nodejs.html
  37. OCD in coding is a good thing.

  38. "Async" Having a callback does not your code "async" make.

    Promises/A+ are always async
  39. "Single-thread" @horse_js, “ single-threaded, but you still get race conditions,

    how is this possible ” https://twitter.com/horse_js/status/325982187772071937
  40. Unagi

  41. Culture

  42. Via , @domenic https://twitter.com/domenic/status/338863854392057856

  43. How do I contribute? “battle-tested with billions of requests”

  44. Who needs documentation? Code speaks for itself. Except that it's

    Klingon. If you're lucky and also like Star Trek.
  45. Poor leadership Bad influence Incomplete evangelism Callbacks vs promises AMD

  46. Throwing away the history Futures - since 1970s Promises -

    not just for control flow AMD - the only way in the browser Phantom - not node, not a browser!
  47. The following applies to ALL Java scripts https://github.com/rwldrn/idiomatic.js/ http://www.youtube.com/watch?v=_EANG8ZZbRs -

    Douglas Crockford: Programming Style & Your Brain http://www.nczonline.net/blog/2013/05/28/on-the- politics-cargo-culting-and-maintainability-of- javascript/
  48. JIFASNIF JavaScript is fun so node.js is fun If only

    we were already at the stage where we can only play...
  49. Lack of commitment v0.0.1 - it's SO unstable that I

    don't even.
  50. Leaders Influencers saying "do whatever you want" Can you recommend

    Bitcoin kind of volatility to your customers mom? Collective responsibility does not work. Self organization and evolution is too painful and too slow.
  51. "What trade-offs?" Advocating without explaing trade-offs is more like religion

    than programming. There never is THE right way. Not even in node.js land. Comma first means it's hard to insert items at the top.
  52. Is node.js ready for production? (v2013.05) eBay ( ) LinkedIn

    ( , dust.js) Microsoft ( ) Yahoo! ( , ) ql.io API for mobile Azure YUI Mojito Trello Walmart
  53. The pains of growing up? These are not "teething" problems.

    This is teenage immaturity. LinkedIn dropped HTML5. Will they keep node.js?
  54. Don't let node.js become the IE of ecosystems You can't

    build stable software if you have to rely on buggy behavior.
  55. My bet?

  56. </grumpyCat> JIFASNIF. Slides: ; http://dominykas.net/14 @dymonaz