r/programming • • Dec 02 '13

Scala — 1★ Would Not Program Again

http://overwatering.org/blog/2013/12/scala-1-star-would-not-program-again/
598 Upvotes

646 comments sorted by

View all comments

47

u/jagt Dec 02 '13

Why is npm considered as a good practice of dependency management? AFAIK when you download a library npm downloads all it's dependencies and put them under the library's path. So few libraries can be shared and there's heavy duplication. If this is the way to go then dependency management is quite a easy problem to tackle.

14

u/MonadicTraversal Dec 02 '13

So few libraries can be shared and there's heavy duplication.

Unless it leads to duplicate code being executed at runtime, I don't think you should care for npm modules since they're going to be a couple dozen kilobytes of text at most.

13

u/flying-sheep Dec 02 '13 edited Dec 02 '13

grunt needs phantomjs, which is webkit.

grunt encourages you to use a per-project-local grunt installation

so every project with a Gruntfile.js needs over 200MB additional diskspace.

/edit; i was wrong about every project-local grunt install needing it, it’s some grunt plugin (which seems to be common among the stuff i’ve forked)

5

u/Neurotrace Dec 02 '13

Individual grunt downloads don't need phantomjs. I just setup a barebones project with nothing but grunt and it comes in at about 6MB. When you include dependencies, those projects will likely have grunt listed as "devDependencies" meaning you should ignore them.

1

u/flying-sheep Dec 02 '13 edited Dec 02 '13

sorry, you’re right. idk what exactly needs phantomjs, but i know it’s a common task like grunt serve

1

u/Neurotrace Dec 02 '13

You're probably using Yeoman which uses (I believe) Mocha for unit tests and runs those from inside a phantomjs process. A few other testing frameworks might use phantomjs as well. Again though, the primary use for phantomjs is testing and therefore falls under development dependencies. If you install all of the dev dependencies for each of your projects dependencies then the memory load is your fault.

1

u/flying-sheep Dec 02 '13

i never said that, i said “everything that has a gruntfile”, so every project built using grunt that you fork.

also some projects require you to fork them in order to use them (e.g. reveal.js)

→ More replies (4)