Personal Lemmy
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
ShaggySnacks@lemmy.myserv.one to Today I Learned@lemmy.worldEnglish · 2 years ago

TIL About How 11 Lines of Code Supported Web Development and the Code Was Deleted It Broke the Internet

getpocket.com

external-link
message-square
66
link
fedilink
122
external-link

TIL About How 11 Lines of Code Supported Web Development and the Code Was Deleted It Broke the Internet

getpocket.com

ShaggySnacks@lemmy.myserv.one to Today I Learned@lemmy.worldEnglish · 2 years ago
message-square
66
link
fedilink
How One Programmer Broke the Internet By Deleting a Tiny Piece of Code
getpocket.com
external-link
A man in Oakland, California, disrupted web development around the world in 2016 by deleting 11 lines of code.
  • Admiral Patrick@dubvee.org
    link
    fedilink
    English
    arrow-up
    43
    arrow-down
    1
    ·
    edit-2
    2 years 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
      link
      fedilink
      English
      arrow-up
      14
      arrow-down
      1
      ·
      2 years ago

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

      • Aatube@kbin.social
        link
        fedilink
        arrow-up
        10
        ·
        2 years 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
          link
          fedilink
          English
          arrow-up
          4
          ·
          2 years ago

          Used in is-ten. Genius

    • GigglyBobble@kbin.social
      link
      fedilink
      arrow-up
      11
      ·
      2 years 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
      link
      fedilink
      English
      arrow-up
      10
      ·
      2 years ago

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

      • BougieBirdie@lemmy.blahaj.zone
        link
        fedilink
        English
        arrow-up
        7
        ·
        2 years ago

        There’s an npm for everything.

    • Pennomi@lemmy.world
      link
      fedilink
      English
      arrow-up
      13
      arrow-down
      3
      ·
      edit-2
      2 days ago

      deleted by creator

      • Admiral Patrick@dubvee.org
        link
        fedilink
        English
        arrow-up
        10
        arrow-down
        1
        ·
        2 years 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
          link
          fedilink
          English
          arrow-up
          9
          ·
          edit-2
          2 days ago

          deleted by creator

        • Jo Miran@lemmy.ml
          link
          fedilink
          English
          arrow-up
          3
          arrow-down
          1
          ·
          2 years ago

          This is why I only code in Assembly. /jk

    • Gork@lemm.ee
      link
      fedilink
      English
      arrow-up
      7
      ·
      2 years ago

      I can’t even…

      • surewhynotlem@lemmy.world
        link
        fedilink
        English
        arrow-up
        11
        ·
        2 years ago

        Yes you can, just don’t odd

    • Aatube@kbin.social
      link
      fedilink
      arrow-up
      4
      ·
      2 years ago

      Created by the organization “i-voted-for-trump”

      • Admiral Patrick@dubvee.org
        link
        fedilink
        English
        arrow-up
        5
        ·
        2 years ago

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

        • Aatube@kbin.social
          link
          fedilink
          arrow-up
          2
          ·
          2 years ago

          Yeah, Trump didn’t even exist in 2014!

          /s

          he never did

          • EmasXP@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            ·
            2 years ago

            Hah, even!

Today I Learned@lemmy.world

til@lemmy.world

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !til@lemmy.world

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.

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 626 users / day
  • 1.96K users / week
  • 5.6K users / month
  • 12.3K users / 6 months
  • 1 local subscriber
  • 30.6K subscribers
  • 1.74K Posts
  • 46.1K Comments
  • Modlog
  • mods:
  • Rooki@lemmy.world
  • _MoveSwiftly@lemmy.world
  • Thekingoflorda@lemmy.world
  • DriftingDeep@lemmy.world
  • eric@lemmy.world
  • Decoy321@lemmy.world
  • BE: 0.19.15
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org