The Enchanted Tavern
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
@siriusmart@lemmy.ml to Programmer Humor@lemmy.ml • 1 year ago

the hardest exam question

lemmy.ml

message-square
170
fedilink
719

the hardest exam question

lemmy.ml

@siriusmart@lemmy.ml to Programmer Humor@lemmy.ml • 1 year ago
message-square
170
fedilink
alert-triangle
You must log in or register to comment.
  • @jordanlund@lemmy.world
    link
    fedilink
    13•1 year ago

    Over what?

    • @wewbull@feddit.uk
      link
      fedilink
      English
      8•1 year ago

      Death by wasps

      • @Buffalo1387@thelemmy.club
        link
        fedilink
        12•1 year ago

        Can I please pick the wasps?

        • @wewbull@feddit.uk
          link
          fedilink
          English
          4•1 year ago

          Totally understandable choice.

        • gimpchrist
          link
          fedilink
          3•
          edit-2
          1 year ago

          Did a robot just ask to die because of JavaScript hahaha

          • @Buffalo1387@thelemmy.club
            link
            fedilink
            3•1 year ago

            The bot toggle was on for my account for some reason but I am human… I think

            It should be off now

            • 56!
              link
              fedilink
              3•1 year ago

              It seems it doesn’t propagate to other servers immediately though.

            • gimpchrist
              link
              fedilink
              3•1 year ago

              ROFL it is not

  • @heavyboots@lemmy.ml
    link
    fedilink
    English
    11•
    edit-2
    1 year ago

    Browsers love it!

    Practically anything you write will execute without all that scope and well formed statements nonsense.

    Mind you, number 2 is also its biggest flaw as well, but…

  • SGG
    link
    fedilink
    English
    65•1 year ago
    1. It runs in browsers
    2. If you hate your co-workers, then they will also feel your pain.
  • Norgur
    link
    fedilink
    2•1 year ago

    You can make your speakers go BRRRRRRRRR via Home Assistant with it

    • @Tja@programming.dev
      link
      fedilink
      2•1 year ago

      Elaborate?

  • Elise
    link
    fedilink
    19•1 year ago

    It has a cup of coffee as logo

    • Sagar Acharya
      link
      fedilink
      5•1 year ago

      I want to create a political party in India. I need you as a candidate for next elections.

    • @BorgDrone@lemmy.one
      link
      fedilink
      14•1 year ago

      That’s Java, not Javascript. Java is to javascript as ham is to hamster.

      • Elise
        link
        fedilink
        5•1 year ago

        Or butter to butterfly

        • @BorgDrone@lemmy.one
          link
          fedilink
          6•1 year ago

          Or car to carpet

          Or fun to funeral

          • Elise
            link
            fedilink
            3•1 year ago

            Moon to moonshine

  • @xmunk@sh.itjust.works
    link
    fedilink
    6•1 year ago
    1. Ajax.

    2. Uhhh…

  • @lowleveldata@programming.dev
    link
    fedilink
    23•1 year ago

    await and async

  • @theherk@lemmy.world
    link
    fedilink
    14•1 year ago

    It runs in browsers. It… isn’t poop? I don’t know. I’m all out of ideas.

    • @TheEntity@lemmy.world
      link
      fedilink
      4•1 year ago

      It… isn’t poop?

      https://www.youtube.com/watch?v=BLikP6BDH5w

      • @perishthethought@lemm.ee
        link
        fedilink
        English
        1•1 year ago

        Well, there’s a link that’s staying blue.

    • @wewbull@feddit.uk
      link
      fedilink
      English
      2•1 year ago

      Half marks

    • @bloubz@lemmygrad.ml
      link
      fedilink
      3•
      edit-2
      1 year ago

      It runs on mobile also. Hell it runs everywhere nowadays

      • @Tja@programming.dev
        link
        fedilink
        1•1 year ago

        3 billion devices worldwide?

        • @bloubz@lemmygrad.ml
          link
          fedilink
          1•1 year ago

          Java-Script

  • @gaael@lemmy.world
    link
    fedilink
    96•1 year ago

    You’ll find an npm package to help you count up to 2.

    (I recently learned - maybe here - that the is-even package has over 170k weekly downloads)

    • @hemko@lemmy.dbzer0.com
      link
      fedilink
      English
      25•1 year ago

      Is-even continues to be the best joke in the industry

    • @Drusenija@lemmy.world
      link
      fedilink
      83•1 year ago

      What’s even wilder is if you look at the code of that package, all it does is include the is-odd package and then return !is-odd. And the is-odd package isn’t much better, it does some basic checks on the input and then returns n % 2 === 1.

      • @gravitas_deficiency@sh.itjust.works
        link
        fedilink
        English
        1•1 year ago

        I’ve always looked at stuff like that as much more along the lines of performance art than anything else.

      • @NotAViciousCyborg@lemmy.world
        link
        fedilink
        27•1 year ago

        I thought I was missing something. JS is one of my main languages and I always just write the is-odd function myself since it’s like 10 characters. It boggles the mind that is-even has 176k weekly downloads

        • @gaael@lemmy.world
          link
          fedilink
          7•1 year ago

          Also there are 40-something packages depending on it, so I guess it gets pulled automatically when they are used.

        • @kevincox@lemmy.ml
          link
          fedilink
          19•1 year ago

          To be fair having a name can make things easier to read. I get that i % 2 == 0 is a common pattern and most programmers will quickly recognize what is happening. But isEven(i) is just that much easier to grok and leaves that brainpower to work on something else.

          But I would never import a package for it. I would just create a local helper for something this trivial.

          • @NotAViciousCyborg@lemmy.world
            link
            fedilink
            10•1 year ago

            Exactly what I would do if I had to reuse it, especially now since I know that adding a package would actually add 2. It all just seems so…inefficient

            • @kevincox@lemmy.ml
              link
              fedilink
              11•1 year ago

              Even if the code isn’t reused adding names to sub-expressions can be very valuable. Often times I introduce new functions or variables even if they are only used once so that I can give them a descriptive name which helps the reader more quickly understand what is happening.

              • @NotAViciousCyborg@lemmy.world
                link
                fedilink
                3•1 year ago

                Yeah, I do that with pretty much every separate operation in c# since our solutions are pretty big. Most of my JS scripts are just done in ServiceNow which are separated and named appropriately.

        • @Aqarius@lemmy.world
          link
          fedilink
          2•1 year ago

          If youre lazy/busy enough, doing basic checks on the input is enough boilerplate to package out.

    • kamen
      link
      fedilink
      10•1 year ago

      This must be a “hold my beer” kind of joke and someone wanting to see how far they can take it.

    • @PrettyFlyForAFatGuy@feddit.uk
      link
      fedilink
      11•1 year ago

      Oh boy, this actually made me laugh out loud

  • @sturlabragason@lemmy.world
    link
    fedilink
    10•1 year ago
  • udon
    link
    fedilink
    71•1 year ago
    1. it’s easy to make fun of
    2. it makes every other programming language look better in comparison
  • 420stalin69 [he/him]
    link
    fedilink
    English
    6•1 year ago
    1. Duck typing
    2. Typescript
  • @AstridWipenaugh@lemmy.world
    link
    fedilink
    5•1 year ago

    !!isAdvantage

  • sincle354
    link
    fedilink
    12•1 year ago

    We have forced it, quite hamfistedly, to do anything. The organic hell-evolution of web browsers turned them into do-anything sandboxed mini-OS. It meant whatever hellish code you used to write your corporate mandated web app could now become a perfectly bloated standalone application. And the demonic language that would enable it was called Javascript. It does the backend and it does the frontend. You could consider those advantages over other devices, like toasters and those handheld electronic games from the 80s.

  • @bloubz@lemmygrad.ml
    link
    fedilink
    3•
    edit-2
    1 year ago

    JIT compilation

Programmer Humor@lemmy.ml

!programmerhumor@lemmy.ml
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: !programmerhumor@lemmy.ml

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 29 users / day
  • 51 users / week
  • 293 users / month
  • 1.52K users / 6 months
  • 1 subscriber
  • 1.67K Posts
  • 30.5K Comments
  • Modlog
  • mods:
  • @AgreeableLandscape@lemmy.ml
  • @cat_programmer@lemmy.ml
  • UI: unknown version
  • BE: 0.18.2
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org