4 ms·
We essentially have that, they're stored in NPM, and it's horrible. It turns out when you can package snippets you use so many you can't possibly keep track an
by eterm 7y ago
We essentially have that, they're stored in NPM, and it's horrible.
It turns out when you can package snippets you use so many you can't possibly keep track and audit them all.
Just look at the Left-pad thing, or the event-stream thing.
- spuz 7y agoWhat do you mean by this? As far as I understand, NPM provides access to packages, not snippets and doesn't as far as I know provide a way to search the code in those packages let alone isomorphically.
- eterm 7y agoA lot of npm packages aren't longer than a typical stackoverflow answer, and they get used everywhere, to the point where installing a dozen packages can lead to tens of thousands of sub-packages being installed. At that point, the packages are essentially "indexed snippets" of code.
- earthboundkid 7y agoSO copypasta is better than NPM, because no one can change the codesnippet to steal bitcoins once you've copied it into your code base. It's much more secure than a mutable database.
- ben509 7y ago> Just look at the Left-pad thing, or the event-stream thing. Those prove that we could see the problem. Brokenness doesn't go away when you grab a snippet of code or reinvent the wheel, you're simply unaware of how much of it is buggy or broken.