Pro Yearly is on sale from $80 to $50! »

Modernizing Winston for node@4

Modernizing Winston for node@4

An Exercise in Open Source, streams, ES6, and keeping code alive. Presented at Node.js Interactive 2015 in Portland, OR.

D43e8ea63b61e7669ded5b9d3c2e980f?s=128

Charlie Robbins

December 08, 2015
Tweet

Transcript

  1. WINSTON FOR NODE@4 MODERNIZING An EXercise in Open source, STREAMS,

    ES6, And KEEPING CODE ALIVE.
  2. WHY, HELLO THERE

  3. @INDEXZERO WELCOME TO OPEN SOURCE. I WILL BE YOUR GUIDE

  4. @INDEXZERO GITHUB TWITTER WELCOME TO OPEN SOURCE. I WILL BE

    YOUR GUIDE DIR. UX PLATFORM @ GODADDY
  5. None
  6. Now. LET ME TELL YOU A STORY...

  7. None
  8.  A Long Time AGo In A GalaXy Far Far

    Away...
  9.  A Long Time AGo In A GalaXy Far Far

    Away...
  10.  A Long Time AGo In A GalaXy Far Far

    Away... OPEN SOURCE IT’S A STORY Actually ABOUT
  11. None
  12. MID 2010 NODEJITSU STARTED In NODE.JS WAS LIKE AND BACK

    THEN
  13. None
  14. THE WILD WEST

  15. THE WILD WEST  BUT REALLY...

  16. THE MODULES WE NEEDED Were like...

  17.  404 not found

  18.  404 not found  SO, like many others WE

    WROTE THEM  OURSELVES
  19. THE BEST FEELINGS Ever. For Serious. CERTAINLY ONE OF

  20. None
  21. BUT BACK TO OUR STORY...  REMEMBER THAT

  22. THIS IS 2010

  23. THIS IS 2010 ACTUALLY JANUARY, 17 2011

  24. BEFORE THE FIRST ONE OF THESE

  25. NO STREAMS API

  26. ES5 IS STILL NEW

  27. LIMITED CODE COVERAGE

  28. BUT IT WAS STILL A PRETTY GOOD API

  29. None
  30. ABOUT 2.6 MILLION MONTHLY DOWNLOADS BUNYAN: ~0.56M

  31. WINSTON ECOSYSTEM 700 PACKAGES OVER IN THE

  32. None
  33. THERE WERE SOME DARK TIMES

  34. OVER 200+ Open ISSUES

  35. OVER 200+ Open ISSUES USER NEGATIVITY

  36. OVER 200+ Open ISSUES USER NEGATIVITY  IS THIS PROJECT

    ABANDONDED?
  37. None
  38. FROM YOUR USERS TOTALLY SUCKS TAKING ABUSE “ ” It

    turns out JUST
  39.  YOUR MODULE'S BAD AND YOU SHOULD FEEL BAD

  40.  YOUR MODULE'S BAD AND YOU SHOULD FEEL BAD 

    TRUST ME ....  … I DID
  41. 40#&'6$,*/(/*$& Please: BE #$%@ing NICE

  42. CULTIVATE PERSONAL INTERACTION

  43. CULTIVATE PERSONAL INTERACTION WHEN IN DOUBT, FOLLow-up Privately  THINK

    OF IT AS DISCRETION. ... Or Having some Class.
  44. None
  45. ONCE AGAIN BACK TO OUR STORY...  AFTER CAREFUL THOUGHT,

    MEDITATION, AND THE IOJS RELEASE I DECIDED...
  46.  OPEN SOURCE IT CAN BE DONE!

  47. You Are Probably Thinking BUT HOW?

  48. SCIENCE CAT SAYS “ ” GOOD QUESTION

  49. None
  50. WRITING CODE IS THE FIRST ANSWER ABSOLUTELY NOT

  51. DO HAVE A LONG TERM PROJECT GOAL

  52. WILLING TO HELP FIND ANYONE WHO IS WEEKLY MEETINGS AND

    START
  53.  YES! WE WANT YOU! TO JOIN WINSTON

  54.  TRIAGE ALL THE THINGS!

  55.  ISSUES, FIRST.  THEN PULL REQUESTS.  TRIAGE ALL

    THE THINGS!
  56. None
  57. HIGH LEVEL PROBLEMS FIND THE TRIAGE INTO BUCKETS AND

  58. HIGH LEVEL PROBLEMS FIND THE TRIAGE INTO BUCKETS AND 

    NEXT-MINOR  NEXT-MAJOR  NEXT-PATCH
  59.  REVERSED LEVELS

  60.  COMMON.LOG

  61.  COMMON.LOG

  62.  COMMON.LOG

  63.  COMMON.LOG

  64. None
  65. HERE BE DRAGONS

  66. None
  67. THEN YOU CAN LAND YOUR PRS

  68. THEN YOU CAN LAND YOUR PRS  DO NOT REFACTOR

    THE THINGS YOU HATE YET. For SeRIOUS.
  69. None
  70. BUT I HATE THE THINGS I HATE ABOUT my Code!

  71. PATIENCE

  72. LANDING OLD PRS IS HARD IT GETS EVEN HARDER AS

    MORE OF THE CODE CHANGES
  73. None
  74. JUST ASK THEM TO RESUBMIT

  75. THERE IS USUALLY ONLY ONE CHANCE PER PR. DEVELOPERS VERY

    RARELY COMMIT
  76. #&'6$,*/($0/4*45&/5

  77. #&'6$,*/($0/4*45&/5 THIS PERSON DO NOT BE PLEASE

  78. IT IS EASIER TO MERGE RATHER THAN REFACTOR THEN REFACTOR

    THEN MERGE
  79. None
  80. NOW YOU CAN FOCUS PROJECT GOAL ON THAT LONG TERM

  81. WINSTON@1.0.0 SMALL BREAKS

  82. WINSTON@2.0.0 BIGGER BREAKS

  83. WINSTON@3.0.0  BREAK TO NEW APIS

  84. STREAMS ALL THE THINGS

  85. MOCHA ALL THE TESTS

  86. INTRODUCE FORMATS

  87. INTRODUCE FORMATS

  88. INTRODUCE FORMATS

  89. INTRODUCE FORMATS

  90. INTRODUCE FORMATS

  91. INTRODUCE FORMATS

  92. None
  93. FORMATS YOUR OWN DEFINE

  94. SHARED FUNCTIONALITY

  95. SHARED FUNCTIONALITY  require(‘winston-transport’);

  96. SHARED FUNCTIONALITY  require(‘winston-transport’);  require(‘abstract-winston-transport’);

  97. BACKWARDS COMPATABILITY

  98. BACKWARDS COMPATABILITY  require(‘winston-compat’);

  99. BACKWARDS COMPATABILITY  require(‘winston-compat’);  common.log

  100. BACKWARDS COMPATABILITY  require(‘winston-compat’);  common.log winston.transports.Transport

  101. BACKWARDS COMPATABILITY  require(‘winston-compat’);  common.log winston.transports.Transport Old vows-based test

    macros
  102. require(‘logmark’)

  103. require(‘logmark’) 30% FASTER THAN WINSTON@2

  104. require(‘logmark’) 30% FASTER THAN WINSTON@2 50% FASTER THAN BUNYAN

  105. IN BETA THIS WEEK  {github, twitter}.com/indexzero MAY THE SOURCE

    BE WITH YOU
  106.  YES! WE WANT YOU! TO JOIN WINSTON SPECIAL THANKS

    TO  Alberto Pose & Jarrett Cruger