3 ms·
Totally agreed, that's why most npm modules are focused on specific tasks, and we use github and npm to track how active projects are before installing them. I
by nailer 10y ago
Totally agreed, that's why most npm modules are focused on specific tasks, and we use github and npm to track how active projects are before installing them.
It really seems like you don't do a lot of node - which is fine obviously, but you seem to have very strong opinions about it.
- coldtea 10y ago>It really seems like you don't do a lot of node - which is fine obviously, but you seem to have very strong opinions about it. The first part of this is a guess -- and it's wrong. I can't speak for "most npm modules" (there are 200.000 or so -- i've only used around 1000, transitive dependencies included) but even those focused on specific high level tasks tend to depend on tons of lower level modules of varying utility and quality -- living them open to things like the "leftpad" fiasco. And using "github and npm to track how active projects are before installing them" is not really an answer to the UNIX way described. First because with UNIX you don't even need to check. You know all the basic tools, from grep and unique, to watch and make, are there for the long term (and have been for 3, 4 decades). Second, because with npm, even checking for popularity doesn't tell you much. Even the most popular modules can be dropped by their authors, rewritten in just 1-2 years to behave differently, fall out of favor and languish etc. Heck that's true even for npm itself (e.g. the changes for version 3, like the flat sub-packages), gulp (see the way the new gulp handles dependent tasks and the new syntax required) and everything else. Heck, 6 years ago Backbone was merely just released. And from then on we already went from it being most used and "hot", to Angular, React, React+Redux and who knows what's next.
- nailer 10y ago> and it's wrong. Fair enough. Just saying that's the impression I get. > even those focused on specific high level tasks tend to depend on tons of lower level modules Yes. Good libraries do that. Smaller bits are made from bigger bits. > living them open to things like the "leftpad" fiasco I don't think you understand what the "leftpad fiasco" was. Small modules doesn't have anything to do with it - people who unpublish their modules on a whim does. And that's not been prevented. > And using "github and npm to track how active projects are before installing them" is not really an answer to the UNIX way described. Indeed. It's an answer to your concern about "npm module du jour that gets abandoned 2-3 years later or completely rewritten". I'm not sure that npm, gulp changing significantly is a bad thing. Good software evolves over times. As long as the changes are clearly communicated I'm 100% down with that. Look how much better express got!
- coldtea 10y ago>Yes. Good libraries do that. Smaller bits are made from bigger bits. I think there's a marginal returns (or worse negative returns) border with this approach, where the overhead, over-generalization, and, finally, bloat, maintenance and management issues stemming from having too many small parts from disparate sources justify writing a specialized solution. Leftpad would be an extreme case in point -- I'd put the bar even higher than that. >Small modules doesn't have anything to do with it - people who unpublish their modules on a whim does. And that's not been prevented. The "unpublish" thing just made the issue instantly apparent, but the core issue would still be there even if nobody could ever unpublish anything. E.g. such small modules could get abandoned and neglected with bugs or security issues, could have extra bloat the parent library doesn't need (this might not hold with leftpad but would be true for anything a little larger that covers 10 things when you only need 2 and could code them yourself and be done with it), is now a dependency that has to be tracked and updated, it's not optimized for the particular use case it is used in, etc.
- nailer 10y ago> E.g. such small modules could get abandoned and neglected with bugs or security issues How well do you think a module with 1000 users is likely to be maintained, vs a create-your-own-wheel equivalent? Do you think writing the latter is an adequate use of your time? Do you think you'll discover all the edge cases? How does writing your own wheel module rank when compared to working on features your customers want?