Upvote!
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
tfm@europe.pub to Programmer Humor@programming.devEnglish · 2 days ago

True crime

europe.pub

message-square
68
fedilink
314

True crime

europe.pub

tfm@europe.pub to Programmer Humor@programming.devEnglish · 2 days ago
message-square
68
fedilink
  • foxglove (she/her)@lazysoci.al
    link
    fedilink
    English
    arrow-up
    15
    ·
    2 days ago

    if it’s 'FILE_NOT_FOUND' then the string will be read as truthy and you will get 'User is admin' logged.

    • Björn Tantau@swg-empire.de
      link
      fedilink
      arrow-up
      30
      ·
      2 days ago

      Ackshually three equal signs check for type as well. So mere truthiness is not enough. It has to be exactly true.

      Also, everyone knows FILE_NOT_FOUND isn’t a string but a boolean value.

      • foxglove (she/her)@lazysoci.al
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 day ago

        yeah, it’s funny how my brain collapsed the boolean check into if (role) rather than if (role === true) - that’s tricky

        what is FILE_NOT_FOUND? I can’t find much on it …

        • Björn Tantau@swg-empire.de
          link
          fedilink
          arrow-up
          4
          ·
          1 day ago

          FILE_NOT_FOUND is from an old story on thedailywtf.com. Someone created a boolean enum with TRUE, FALSE and FILE_NOT_FOUND, if I recall correctly. It’s been a recurring running joke.

          • foxglove (she/her)@lazysoci.al
            link
            fedilink
            English
            arrow-up
            2
            ·
            1 day ago

            thank you for letting me in on the joke 😄

            and for catching my error!

            • jbrains@sh.itjust.works
              link
              fedilink
              arrow-up
              2
              ·
              11 hours ago

              Welcome! I guess this is your Ten Thousand moment for a mediocre joke for old programmers. 💪👍

              • foxglove (she/her)@lazysoci.al
                link
                fedilink
                English
                arrow-up
                2
                ·
                7 hours ago

                haha, yes - exactly! At least I got that reference, xkcd is pretty well known, though.

                • jbrains@sh.itjust.works
                  link
                  fedilink
                  arrow-up
                  2
                  ·
                  7 hours ago

                  I see that they’ve gone back to the name “The Daily WTF”. For some time, they changed to “Worse than failure” in order to avoid not even the word “fuck”. 🤷

                  https://thedailywtf.com/

Programmer Humor@programming.dev

programmer_humor@programming.dev

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: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

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

  • 1.77K users / day
  • 5.21K users / week
  • 8.85K users / month
  • 20.2K users / 6 months
  • 1 local subscriber
  • 25.7K subscribers
  • 1.58K Posts
  • 53.5K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.6
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org