Slide 1

Slide 1 text

How to choose the best npm module for your team? @sota1235

Slide 2

Slide 2 text

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

Slide 3

Slide 3 text

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

Slide 4

Slide 4 text

Q. How many npm module are you using?

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

197

Slide 7

Slide 7 text

197 = 197 decisions

Slide 8

Slide 8 text

Q. Can you explain a reason behind every npm module you chose?

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

http://www.modulecounts.com/

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

Wait!! Can you explain the Goal you set?

Slide 13

Slide 13 text

Using a npm module is not Goal Goal is to solve the problem

Slide 14

Slide 14 text

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

Slide 15

Slide 15 text

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

Slide 16

Slide 16 text

Define the Goal ● There are still many problems to solve ● We always use some tool to solve that problem

Slide 17

Slide 17 text

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

Slide 18

Slide 18 text

Search a npm module ● www.npmjs.com ● awesome-* pages ● Recommendation from other engineers ● Googling

Slide 19

Slide 19 text

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

Slide 20

Slide 20 text

Select from candidates ● When you have multiple choices, you need to compare them ● There are a lot of points to do that

Slide 21

Slide 21 text

● Star count ● API design ● Size of community ● Performance ● Documentation ● Test coverage ● Quality of code ● and so on...

Slide 22

Slide 22 text

https://jp.freeimages.com/photo/cat-1537181

Slide 23

Slide 23 text

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

Slide 24

Slide 24 text

OK, let’s use that!

Slide 25

Slide 25 text

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

Slide 26

Slide 26 text

Using a npm module is not free :( ● It takes time to maintain ● Managing vulnerability/version ● If maintenance stops, you will need to fork it

Slide 27

Slide 27 text

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!

Slide 28

Slide 28 text

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

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

Q. Can you explain a reason behind every npm module you chose?

Slide 31

Slide 31 text

Conclusion

Slide 32

Slide 32 text

Make it better! ● You should be able to explain the reason ● It’ll be a good experience even if you made a wrong decision

Slide 33

Slide 33 text

Thank you @sota1235 JavaScript lover