Europe Pub
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
tfmA to Programmer Humor@programming.devEnglish · 2 months ago

True crime

message-square
74
link
fedilink
  • cross-posted to:
  • programmerhumor@lemmy.ml
326

True crime

tfmA to Programmer Humor@programming.devEnglish · 2 months ago
message-square
74
link
fedilink
  • cross-posted to:
  • programmerhumor@lemmy.ml
  • jbrains@sh.itjust.works
    link
    fedilink
    arrow-up
    10
    ·
    2 months ago

    What if role is FILE_NOT_FOUND?!

    • foxglove (she/her)@lazysoci.al
      link
      fedilink
      English
      arrow-up
      15
      ·
      2 months 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@swg-empire.de
        link
        fedilink
        arrow-up
        30
        ·
        2 months 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
          ·
          2 months 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@swg-empire.de
            link
            fedilink
            arrow-up
            4
            ·
            2 months 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
              ·
              2 months ago

              thank you for letting me in on the joke 😄

              and for catching my error!

              • jbrains@sh.itjust.works
                link
                fedilink
                arrow-up
                2
                ·
                2 months 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
                  ·
                  2 months 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
                    ·
                    2 months 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.47K users / day
  • 5.48K users / week
  • 9.15K users / month
  • 19.8K users / 6 months
  • 18 local subscribers
  • 26.7K subscribers
  • 1.09K Posts
  • 21.7K Comments
  • Modlog
  • mods:
  • adr1an@programming.dev
  • Feyter@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.12
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org