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

Build more gems

Build more gems

An impassioned plea to the BathRuby conference to build more gems so that we can look better than Node.js/npm in the numbers game.

We wrote a gem live and you can see it here: https://rubygems.org/gems/is_even

8ec1383b240b5ba15ffb9743fceb3c0e?s=128

Phil Nash

March 11, 2016
Tweet

Transcript

  1. BUILD MORE GEMS

  2. Phil Nash @philnash http:/ /philna.sh philnash@twilio.com

  3. WE HAVE A PROBLEM

  4. RUBY ISN'T COOL ANYMORE

  5. WHY?

  6. THE NUMBERS AREN'T GOING UP ENOUGH

  7. NODE.JS

  8. NPM

  9. NPM IS MAKING US LOOK BAD

  10. None
  11. The numbers Ruby Node.js Packages 115,566 250,796 Downloads 7,691,140,671 3,787,604,159

    in the last month
  12. WE KNOW WHY THOUGH

  13. r e q u i r e ( " i

    s - e v e n " ) ;
  14. r e q u i r e ( " i

    s - o d d " ) ; r e q u i r e ( " i s - n u m b e r " ) ;
  15. None
  16. WHO'S BUILT A GEM BEFORE?

  17. LET'S BUILD ONE NOW!

  18. Generate a gem $ b u n d l e

    g e m i s _ e v e n
  19. Write the code # l i b / i s

    _ e v e n . r b r e q u i r e " i s _ e v e n / v e r s i o n " m o d u l e I s E v e n d e f s e l f . w e l l _ i s _ i t ? ( n u m b e r ) n u m b e r . e v e n ? e n d e n d 0 1 . 0 2 . 0 3 . 0 4 . 0 5 . 0 6 . 0 7 . 0 8 .
  20. Update the gemspec s p e c . s u

    m m a r y = " T e l l s y o u i f a n u m b e r i s e v e n " s p e c . d e s c r i p t i o n = " T e l l s y o u i f a n u m b e r i s e v e n " s p e c . h o m e p a g e = " h t t p : / / p h i l n a . s h " 0 1 . 0 2 . 0 3 .
  21. Update the gemspec 2 We're pushing to Rubygems, so remove

    the a l l o w e d _ p u s h _ h o s t metadata i f s p e c . r e s p o n d _ t o ? ( : m e t a d a t a ) s p e c . m e t a d a t a [ ' a l l o w e d _ p u s h _ h o s t ' ] = " T O D O : S e t t o ' h t t p : / / m y e l s e r a i s e " R u b y G e m s 2 . 0 o r n e w e r i s r e q u i r e d t o p r o t e c t a g a i n s t p e n d 0 1 . 0 2 . 0 3 . 0 4 . 0 5 .
  22. Release the gem $ g e m b u i

    l d i s _ e v e n . g e m s p e c $ g e m p u s h i s _ e v e n - 0 . 1 . 0 . g e m
  23. But seriously • Building my first gem helped me learn

    Ruby
  24. bitly

  25. But seriously • Building my first gem helped me learn

    Ruby • Extracting gems from apps reduced repetition
  26. envyable

  27. But seriously • Building my first gem helped me learn

    Ruby • Extracting gems from apps reduced repetition • Creating new gems helped developers use Twilio
  28. twiml_template

  29. BUILD MORE GEMS!

  30. None
  31. Disclaimer I'm not really advocating for the creation of loads

    of crap gems. Make useful gems, make gems you'd want to use, write tests. No Node.js developers were hurt in the making of this presentation. No Node.js modules were hurt in the making of this presentation. Well, maybe some Node.js modules' feelings were hurt, but they will recover. Ruby is awesome. You are all awesome.
  32. Thanks! @philnash http:/ /philna.sh philnash@twilio.com