4 ms·
The myriad of small snippets of JS encapsulated as npm modules is best compared to the alternative of copy-pasting solutions from websites like stack overflow.
by TAForObvReasons 8y ago
The myriad of small snippets of JS encapsulated as npm modules is best compared to the alternative of copy-pasting solutions from websites like stack overflow. Instead of lots of copies of solutions to common problems, now everyone shares the same implementation. This obviously has the centralization weaknesses but also has the centralization strengths.
The fact that there's no panacea is a fact of life. There's a tradeoff, but it is not reflective of the people in the JS community.
- nerdponx 8y agoI'm not talking specifically about having dependencies instead of copying and pasting utility functions. In both cases you are expected to at least sort of understand the code you are copying/importing.
- vbezhenar 8y agoIn Java world those snippets tend to combine into bigger libraries. Apache commons and Google guava are the most known ones and their reputation is established. I don't understand why JS world does not do something similar. Some essential-utils from AiRbNb or whatever JavaScript analog of Google. And if there's still need for some tiny function, just implement it and move on! I can understand that JavaScript favors small download size, but modern tools should be able to remove unused code, so it shouldn't be an issue either.