How to choose the best npm module for your team?

046baac588d91fd78a85b189847a151d?s=47 Sota Sugiura
November 23, 2018

How to choose the best npm module for your team?

2018/11/23
Presented at NodeFest 2018@Tokyo

https://nodefest.jp/2018/

046baac588d91fd78a85b189847a151d?s=128

Sota Sugiura

November 23, 2018
Tweet

Transcript

  1. How to choose the best npm module for your team?

    @sota1235
  2. Title @sota1235 Sota Sugiura Backend Engineer@Mercari, Inc. “My dream is

    to be JavaScript”
  3. Title @sota1235 Sota Sugiura Backend Engineer@Mercari, Inc. “My dream is

    to be JavaScript”
  4. Q. How many npm module are you using?

  5. None
  6. 197

  7. 197 = 197 decisions

  8. Q. Can you explain a reason behind every npm module

    you chose?
  9. Let’s think! https://jp.freeimages.com/photo/thinking-1387695

  10. http://www.modulecounts.com/

  11. It’s like a jewelry box! Let’s choose!

  12. Wait!! Can you explain the Goal you set?

  13. Using a npm module is not Goal Goal is to

    solve the problem
  14. Define the Goal Think about the candidates Decide what to

    use Solve the problem
  15. Define the Goal Think about the candidates Decide what to

    use Solve the problem
  16. Define the Goal • There are still many problems to

    solve • We always use some tool to solve that problem
  17. Define the Goal Think about the candidates Decide what to

    use Solve the problem
  18. Search a npm module • www.npmjs.com • awesome-* pages •

    Recommendation from other engineers • Googling
  19. Define the Goal Think about the candidates Decide what to

    use Solve the problem
  20. Select from candidates • When you have multiple choices, you

    need to compare them • There are a lot of points to do that
  21. • Star count • API design • Size of community

    • Performance • Documentation • Test coverage • Quality of code • and so on...
  22. https://jp.freeimages.com/photo/cat-1537181

  23. Again, the Goal is... • Let’s decide the priority by

    thinking about the Goal • If you will use it for prototyping, not necessary to mind test coverage • If you will use it for only development environment, file size won’t be a problem
  24. OK, let’s use that!

  25. Wait!! Did you think about the cost to maintain that?

  26. Using a npm module is not free :( • It

    takes time to maintain • Managing vulnerability/version • If maintenance stops, you will need to fork it
  27. Think about Pros/Cons everytime • We SHOULD think about Pros/Cons

    everytime • What is the benefit to use that? • What is the problem to use that? • If Pros won, let’s use that!
  28. Define the Goal Think about the candidates Decide what to

    use Solve the problem
  29. None
  30. Q. Can you explain a reason behind every npm module

    you chose?
  31. Conclusion

  32. Make it better! • You should be able to explain

    the reason • It’ll be a good experience even if you made a wrong decision
  33. Thank you @sota1235 JavaScript lover