3 ms·
I think it's funny how so many people have an allergic reaction to using a package manager to add fragments of small but non-obvious code to their codebase, but
by stupidcar 7y ago
I think it's funny how so many people have an allergic reaction to using a package manager to add fragments of small but non-obvious code to their codebase, but have no issue with frequently using Google to track down one-liners on Stack Overflow, which they then copy-and-paste into their codebase.
Why is you acting like a slow, biological package manager for small bits of code better than using a real package manager for the same purpose?
- tntn 7y ago1. The code you pull in will not get updated unless you do it explicitly. 2. The code you pull in will not get exploited when someone masquerades as the package owner. (How many widely publicized cases of this have there been by now, 5? 10?) 3. Presumably you read the code enough while copy-pasting to be sure it isn't mining Bitcoin or something.
- gnrl 7y agoThe line of code in that moment is read and "vetted". Same can be done for the dependency yes, but what happens if malicious code is injected later and you update your packages? Or like the leftpad disaster where the package was deleted? There is many reasons why the copied one liner is better and many why the package manager is better.