140
top 50 comments
sorted by: hot top controversial new old
[-] JoMiran@lemmy.ml 154 points 7 months ago

TL;DR: A patent and trademark agent and NPM bullied an Open Source Dev, so the Dev deleted his code from NPM as is his right. The internet broke. NPM restored the code against the dev's wishes. Corpos win...as always.

[-] ramble81@lemm.ee 77 points 7 months ago

I’d say the bigger issue was people live-linking to the files rather than downloading and using a version controlled copy they can control.

[-] jayrhacker@kbin.social 27 points 7 months ago

They don't teach about Configuration Management in web-dev bootcamp

[-] Ramin_HAL9001@lemmy.ml 11 points 7 months ago* (last edited 7 months ago)

They don’t teach about Configuration Management in web-dev bootcamp

Ha! Bullshit like configuration management, memory management, optimizing compilers, all obsolete technology! We don't need that anymore with modern web browsers now that every single computer ever is connected to the Internet, and now that we have AI to write code for us!!! JavaScript is the one true language!

(sarcasm)

[-] JoMiran@lemmy.ml 12 points 7 months ago

I love how it broke React.

[-] Aatube@kbin.social 7 points 7 months ago

“Bullied”? I mean, the open source app the trademarker wanted to replace wasn’t popular either, and I don’t see how the heck “kik” could be related to something for creating templates. Neither do I see it for messaging, but that is a trademark.

In this case, we believe that most users who would come across a kik package, would reasonably expect it to be related to kik.com.

IMO, the dev was the asshole in that case.

[-] zout@kbin.social 58 points 7 months ago

Not in my book. They asked him if he would rename his package, he replied sorry but I'm building a project with this name, and they replied that they were going to send lawyers to do takedowns if he would release his project. This would also rub me the wrong way. Also, the dev was already working on the package before the kik company ever came to NPM. Why would he have to give up on the name for his project?

[-] zylinderhut@feddit.de 8 points 7 months ago

Because not enforcing a trademark means potentially losing the trademark. Not saying that makes it right, IMHO the system just sucks.

[-] pivot_root@lemmy.world 11 points 7 months ago

For United States trademarks, not necessarily. You don't have to enforce the trademark to keep it; you just have to renew it on time.

The problem with not enforcing the trademark is that it opens the term up to genericization (for example, referring to all types of tissues as Kleenex). Genericization will cause a company to lose the trademark.

I don't think kik was worried about that. It's more likely they were bullying the guy into giving up the package name.

load more comments (5 replies)
load more comments (2 replies)
[-] Aatube@kbin.social 4 points 7 months ago

Like NPM said, I'd expect a package named kbin to be about kbin.social, not e.g. some random recycling app. The company wants to open source their stuff. That's great! And then, kik a bit selfishly doesn't want some package with only 1 star and 3 watches to confuse the 5 people who would want to look at the source code. NPM doesn't conflate versions between different packages formerly published under the same name, so virtually no harm done to existing users. People who want Kik's code would get to find Kik, and people would still be able to use the renamed project. I don't see a reason for the dev to hold on to their Kik name when it would do a slight bit of harm.

Though, maybe that's not how it turned out. NPM later took over Kik's package again as a security holding to this day, and whatever you think, it's not a good reaction to unpublish all your popular packages, causing massive code breakage around the world and Facebook going up in flames, prompting the world to reevaluate dependency chains and the world's dependency on JavaScript- that sounds kinda nice, actually, so maybe I'm glad this happened.

(also, he already released it)

[-] zout@kbin.social 7 points 7 months ago

I get that, but suppose you start a package on NPM named "bronk". Sometime later someone starts a company with that name. Should you just be forced to give up your package name, just because people suddenly associate the name with the company?

load more comments (1 replies)
[-] nick@midwest.social 16 points 7 months ago

Hard disagree. I took much delight in watching the internet collapse when he deleted HIS PROPERTY.

[-] Aatube@kbin.social 4 points 7 months ago

We're not talking about the effects; we're talking about the cause.

[-] ChairmanMeow@programming.dev 6 points 7 months ago

Kik, as in "kickstart". Makes sense for templating.

Still, Kik could have easily named their package "kik-messenger" or something. Would have been much clearer.

[-] Aatube@kbin.social 3 points 7 months ago

Ah, that makes a lot of sense.

load more comments (1 replies)
[-] infeeeee@lemm.ee 45 points 7 months ago

Original article not via pocket: https://qz.com/646467/how-one-programmer-broke-the-internet-by-deleting-a-tiny-piece-of-code

It's the left-pad npm incident, it was a big news back than, it has its own section on wikipedia: https://en.wikipedia.org/wiki/Npm#Dependency_chain_issues

[-] ptz@dubvee.org 43 points 7 months ago* (last edited 7 months ago)

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 on is-odd which has a dependency on is-number. 🤦‍♂️

[-] cbarrick@lemmy.world 14 points 7 months ago

I think is-odd is intentionally a reference to / satire of leftpad

[-] Aatube@kbin.social 10 points 7 months ago* (last edited 7 months ago)

It 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.

[-] jas0n@lemmy.world 4 points 7 months ago

Used in is-ten. Genius

[-] pennomi@lemmy.world 13 points 7 months ago* (last edited 7 months ago)

JavaScript is a dangerous shitshow for this exact reason. Dependencies are a security and stability nightmare.

[-] ptz@dubvee.org 10 points 7 months ago* (last edited 7 months ago)

Eh, 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.

[-] pennomi@lemmy.world 9 points 7 months ago

Yes, 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.

[-] JoMiran@lemmy.ml 3 points 7 months ago* (last edited 7 months ago)

This is why I only code in Assembly. /jk

[-] GigglyBobble@kbin.social 11 points 7 months ago* (last edited 7 months ago)

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.

[-] LazaroFilm@lemmy.world 10 points 7 months ago

At this point it’s just a joke. Is there a npm for console log? I’ll have to check.

[-] Gork@lemm.ee 7 points 7 months ago
[-] surewhynotlem@lemmy.world 11 points 7 months ago

Yes you can, just don't odd

[-] Aatube@kbin.social 4 points 7 months ago

Created by the organization "i-voted-for-trump"

[-] ptz@dubvee.org 5 points 7 months ago

Lol, I saw that. If you go to their main page, it's explained that it's a joke.

load more comments (2 replies)
[-] Dirk@lemmy.ml 30 points 7 months ago

11 lines of code shouldn't be a package.

[-] xor@infosec.pub 9 points 7 months ago

you should see the "is_odd" package...

it's like, return (num%2)? true:false

[-] Dirk@lemmy.ml 12 points 7 months ago

People using this deserve that their code breaks. Absolutely ridiculous.

Neither this, nor the leftpad thing, nor this is-even “package” are things I would even think about for a second before just writing it on my own. I wouldn’t even consider those features (let alone packages to depend my code on!) but basic programming.

[-] Ephera@lemmy.ml 8 points 7 months ago

Problem is when you accidentally pull it in as a transitive dependency...

[-] Dirk@lemmy.ml 7 points 7 months ago

Yeah :( This also is why such nonsense “breaks the Internet” …

[-] xor@infosec.pub 5 points 7 months ago

i just don't see how npm is letting this happen...
im going to write an npm module called "true" that just returns true...

[-] Dirk@lemmy.ml 6 points 7 months ago

… and that has 4 dependencies on it’s own!

[-] vrighter@discuss.tchncs.de 3 points 7 months ago

and that's still too verbose. it should be (num % 2) != 0

load more comments (2 replies)
[-] 50gp@kbin.social 3 points 7 months ago* (last edited 7 months ago)

at which point do you blame the language for not implementing it natively?

[-] rikudou@lemmings.world 9 points 7 months ago

I mean, does any language implement is_odd() natively? Doesn't everyone implement modulus and pretty much assumes that you remember modulus from elementary and can infer that even numbers are those where x % 2 == 0.

[-] Aatube@kbin.social 6 points 7 months ago* (last edited 7 months ago)

Isn’t %2 already native?

(BTW this thing failed JavaScript so hard ECMA immediately included it in that year’s standard)

[-] Dirk@lemmy.ml 6 points 7 months ago

at which point do you blame the language for not implementing it natively?

Erm … What more native than number % 2 do you want to have it?

[-] Ephera@lemmy.ml 2 points 7 months ago* (last edited 7 months ago)

2.is_even()

(I don't know, if this is possible in JS.)

[-] Dirk@lemmy.ml 4 points 7 months ago

Let’s call the number variable just x, you then have literal math (Euclidean division) if you ignore === instead of = for equals.

x % 2 === 0

This can’t get better or more native than “just math”. This is the whole code you need to detect if a number is even. I wouldn’t even call it “code”.

If you remove whitespaces and ignore the type you end up with x%2==0 which is 6 characters long and a fully valid if clause. No magic involved, no abstraction, no weird function calls on integers …

I see that in modern JS this type of coding is a trend, but you can’t tell me you want to replace 6 characters with an own module or a package. :)

load more comments (1 replies)
load more comments (3 replies)
[-] Blue_Morpho@lemmy.world 30 points 7 months ago* (last edited 7 months ago)

The only part of the story that I'm pissed at is NPM corporation restoring content on their server that they didn't own and published it to millions for profit.

Koçulu removed left pad. It was his code.

Can you imagine the lawsuits if when Disney pulled the license for Avengers on Netflix, Netflix responded with:

"Millions of customers got errors that Marvel Avengers is missing. So we put Avengers back on our servers."

load more comments (2 replies)
[-] rikudou@lemmings.world 13 points 7 months ago

I remember it live as it was happening. It was fun.

[-] CrayonRosary@lemmy.world 2 points 7 months ago

Nice run on sentence in your title. Great job.

load more comments
view more: next ›
this post was submitted on 31 Jan 2024
140 points (100.0% liked)

Today I Learned

17329 readers
776 users here now

What did you learn today? Share it with us!

We learn something new every day. This is a community dedicated to informing each other and helping to spread knowledge.

The rules for posting and commenting, besides the rules defined here for lemmy.world, are as follows:

Rules (interactive)


Rule 1- All posts must begin with TIL. Linking to a source of info is optional, but highly recommended as it helps to spark discussion.

** Posts must be about an actual fact that you have learned, but it doesn't matter if you learned it today. See Rule 6 for all exceptions.**



Rule 2- Your post subject cannot be illegal or NSFW material.

Your post subject cannot be illegal or NSFW material. You will be warned first, banned second.



Rule 3- Do not seek mental, medical and professional help here.

Do not seek mental, medical and professional help here. Breaking this rule will not get you or your post removed, but it will put you at risk, and possibly in danger.



Rule 4- No self promotion or upvote-farming of any kind.

That's it.



Rule 5- No baiting or sealioning or promoting an agenda.

Posts and comments which, instead of being of an innocuous nature, are specifically intended (based on reports and in the opinion of our crack moderation team) to bait users into ideological wars on charged political topics will be removed and the authors warned - or banned - depending on severity.



Rule 6- Regarding non-TIL posts.

Provided it is about the community itself, you may post non-TIL posts using the [META] tag on your post title.



Rule 7- You can't harass or disturb other members.

If you vocally harass or discriminate against any individual member, you will be removed.

Likewise, if you are a member, sympathiser or a resemblant of a movement that is known to largely hate, mock, discriminate against, and/or want to take lives of a group of people, and you were provably vocal about your hate, then you will be banned on sight.

For further explanation, clarification and feedback about this rule, you may follow this link.



Rule 8- All comments should try to stay relevant to their parent content.



Rule 9- Reposts from other platforms are not allowed.

Let everyone have their own content.



Rule 10- Majority of bots aren't allowed to participate here.

Unless included in our Whitelist for Bots, your bot will not be allowed to participate in this community. To have your bot whitelisted, please contact the moderators for a short review.



Partnered Communities

You can view our partnered communities list by following this link. To partner with our community and be included, you are free to message the moderators or comment on a pinned post.

Community Moderation

For inquiry on becoming a moderator of this community, you may comment on the pinned post of the time, or simply shoot a message to the current moderators.

founded 1 year ago
MODERATORS