3 ms·
Ok, I have been known to have strong opinions on HN, and each one is open to being changed and is rooted in extensive personal experience. I have said that com
by EGreg 7y ago
Ok, I have been known to have strong opinions on HN, and each one is open to being changed and is rooted in extensive personal experience.
I have said that comments are a code smell.
I have written extensively in favor of decentralization and even formed two companies to promote it in increasingly sophisticated ways (qbix.com and intercoin.org)
So I’m gonna say something that may get me downvoted...
Package Managers are almost as bad as closed source software, which is almost as bad as closed software in “the cloud” (the fake, centralized one) which you don’t host.
Society today still has to rely on feudal lords for many things, just as we used to rely on the post office, printing presses and telephone switchboard operators.
If you are going to use a package manager, you should be at the very least pinning all your versions and personally vetting any changes that are pulled from upstream. You can outsource this security check to some third parties (at least GitHub has those alerts when vulnerabilities are found) but we need the security audit people in the loop, signing releases. Not just pull from upstream, MUCH LESS pulling thousands of new commits across hundreds of packages!
We have seen this introduce security bugs all over the place, in the past. Deprecation is not as bad as that, but you gotta vet what goes into your code.
One of many examples, how can we address this?
https://www.theregister.co.uk/AMP/2016/03/23/npm_left_pad_chaos/ https://www.theregister.co.uk/AMP/2016/03/23/npm_left_pad_ch...
I speak a bit flippantly but when you’re building a PLATFORM or FRAMEWORK for apps, this matters. A lot. Linus’ rant about diffs and patches being far better than svn are a version of what I’m talking about. At least svn is inside an organization. This is out on the internet!
The bazaar may be better than the cathedral, but not for security and the more power your framework have the more responsibility you have to not skip security checks and just pull code. It’s worse than executing a shell script downloaded from the ‘net, because you’re essentially shipping this shell script downstream to everyone who uses your code!!
- hombre_fatal 7y agoSure, taking on dependencies introduces pros and cons. But isn't this just the classic HN trope where you fly off the handle on a loosely related rant just because TFA has some sort of triggering buzzword like "NPM"? Not sure how your rant is related. In fact, that such a popular library is being deprecated contains in itself the realization for unknowing developers a downside of depending on large libraries. Someone upset by this deprecation that wasn't yet aware might, in the future, seek out a more timeless solution for making http calls like the Node implementation of the browser's native window.fetch(). All without having to read a rant.
- UnFleshedOne 7y agoThe rant might be off topic, but everything he says is reasonable. In a "this is why we can't have nice things" way.
- SahAssar 7y agoI agree with a lot of the ideas behind what you say, but what is your solution? That we should use less dependencies? Sure. That we should review changes in our dependencies? Sure. But If I were to take a nodejs app and move it from ubuntu version X to ubuntu version Y, node version Z to node version A, and update npm dependencies the code review itself would take me a year. Is your point that we should only do this to npm dependencies? Is this a wider problem with how we think about software development as never being finished instead of solving a problem and moving on to the next? Yes.
- EGreg 7y agoMy solution is to have a specific job for independent people to sign off on all changes and you can sorta trust them before you pull. As opposed to just the developer. And everyone should have a reputation.