This doesn't cut it
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
tfm@europe.pub to Programmer Humor@programming.devEnglish · 3 days ago

True crime

europe.pub

message-square
68
fedilink
316

True crime

europe.pub

tfm@europe.pub to Programmer Humor@programming.devEnglish · 3 days ago
message-square
68
fedilink
  • jbrains@sh.itjust.works
    link
    fedilink
    arrow-up
    10
    ·
    3 days ago

    What if role is FILE_NOT_FOUND?!

    • foxglove (she/her)@lazysoci.al
      link
      fedilink
      English
      arrow-up
      15
      ·
      3 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
        ·
        3 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
          ·
          2 days 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
            ·
            2 days 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 days ago

              thank you for letting me in on the joke 😄

              and for catching my error!

              • jbrains@sh.itjust.works
                link
                fedilink
                arrow-up
                2
                ·
                1 day 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
                  ·
                  22 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
                    ·
                    21 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.

  • 2.61K users / day
  • 5.42K users / week
  • 8.78K users / month
  • 20.2K users / 6 months
  • 1 local subscriber
  • 25.8K subscribers
  • 1.06K Posts
  • 23.9K Comments
  • Modlog
  • mods:
  • adr1an@programming.dev
  • Feyter@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.8
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org