TIL About How 11 Lines of Code Supported Web Development and the Code Was Deleted It Broke the Internet
TIL About How 11 Lines of Code Supported Web Development and the Code Was Deleted It Broke the Internet
A man in Oakland, California, disrupted web development around the world in 2016 by deleting 11 lines of code.
You're viewing a single thread.
I always reel in horror when projects have tiny, 'negligible to implement yourself' functions like these as dependencies. See also: is-even 🙄
Edit:
is-even
has a dependency onis-odd
which has a dependency onis-number
. 🤦‍♂️43 0 ReplyI think
is-odd
is intentionally a reference to / satire ofleftpad
14 0 ReplyIt was created in 2014, 2 years before the leftpad incident, when a user was learning JavaScript. They now have over 350k downloads per week.
However, https://github.com/slmjkdbtl/is-is-odd/issues/4 is a wonderful work of satire.
10 0 ReplyUsed in
is-ten
. Genius4 0 Reply
JavaScript is a dangerous shitshow for this exact reason. Dependencies are a security and stability nightmare.
13 0 ReplyEh, I'd say any language that offers a package repository is just as susceptible. I'm neither pro- nor anti- dependency, but I do always try to keep them to an absolute minimum regardless of what environment I'm working in. Sometimes it makes sense to not reinvent the wheel.
10 0 ReplyYes, but other languages have exponentially fewer packages that install when you add something, making the attack vector smaller and easier to monitor.
The best way to fix this is for library authors to avoid installing as many sub-dependencies as possible (is-odd, being an obvious example). But that’s a fundamental culture problem.
9 0 ReplyThis is why I only code in Assembly. /jk
3 0 Reply
And the whole implementation of is-number which is at version 7.0.0:
module.exports = function(num) { if (typeof num === 'number') { return num - num === 0; } if (typeof num === 'string' && num.trim() !== '') { return Number.isFinite ? Number.isFinite(+num) : isFinite(+num); } return false; };
The node.js ecosystem has always been madness.
11 0 ReplyAt this point it’s just a joke. Is there a npm for console log? I’ll have to check.
10 0 ReplyI can't even...
7 0 ReplyYes you can, just don't odd
11 0 Reply
Created by the organization "i-voted-for-trump"
4 0 ReplyLol, I saw that. If you go to their main page, it's explained that it's a joke.
5 0 ReplyYeah, Trump didn't even exist in 2014!
/s
he never did
2 0 ReplyHah, even!
1 0 Reply