Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

agnos.is Forums

  1. Home
  2. Programmer Humor
  3. All of IT in one image

All of IT in one image

Scheduled Pinned Locked Moved Programmer Humor
programmerhumor
52 Posts 40 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F [email protected]

    NaN minutes later, a truck arrives in the alley, its license plate reads "undefined". Someone gets out of the vehicle
    "I have something for you"
    He gives you a package. You open it. It's an [object Object]

    D This user is from outside of this forum
    D This user is from outside of this forum
    [email protected]
    wrote on last edited by
    #31

    "I've been looking for you! Got something I'm supposed to deliver. Your hands only."

    1 Reply Last reply
    16
    • cm0002@lemmy.worldC [email protected]
      This post did not contain any content.
      T This user is from outside of this forum
      T This user is from outside of this forum
      [email protected]
      wrote on last edited by
      #32

      Wait until Null opens the door

      B null@slrpnk.netN 2 Replies Last reply
      11
      • C [email protected]

        besides NaN actually being a number, this could completely and easily be avoided with typescript.

        R This user is from outside of this forum
        R This user is from outside of this forum
        [email protected]
        wrote on last edited by
        #33

        Naaah. Good programmers know how to use as any as any to make this work in typescript as well.

        1 Reply Last reply
        4
        • T [email protected]

          Wait until Null opens the door

          B This user is from outside of this forum
          B This user is from outside of this forum
          [email protected]
          wrote on last edited by
          #34

          segmentation fault

          1 Reply Last reply
          2
          • S [email protected]
            "a"+"b" -> "ab"
            "a"-"b" -> NaN
            
            M This user is from outside of this forum
            M This user is from outside of this forum
            [email protected]
            wrote on last edited by
            #35

            Yeah:

            parseInt("a") -> NoT a NuMbEr
            
            S 1 Reply Last reply
            0
            • blackn1ght@feddit.ukB [email protected]

              This isn't the languages fault, it's the developers.

              scoopta@programming.devS This user is from outside of this forum
              scoopta@programming.devS This user is from outside of this forum
              [email protected]
              wrote on last edited by
              #36

              I'm assuming by this you mean the developers of JS /s

              1 Reply Last reply
              0
              • M [email protected]

                Yeah:

                parseInt("a") -> NoT a NuMbEr
                
                S This user is from outside of this forum
                S This user is from outside of this forum
                [email protected]
                wrote on last edited by
                #37

                Sure, but the main issue here is that JS doesn't only auto cast to more generic but in both directions.

                Maybe a better example is this:

                "a" + 1 -> "a1"
                "a" - 1 -> NaN
                

                With + it casts to the more generic string type and then executes the overloaded + as a string concatenation.

                But with - it doesn't throw an exception (e.g. something like "Method not implemented"), but instead casts to the more specific number type, and "a" becomes a NaN, and NaN - 1 becomes NaN as well.

                There's no situation where "a" - "b" makes any sense or could be regarded as intentional, so it should just throw an error. String minus number also only makes sense in very specific cases (specifically, the string being a number), so also here I'd expect an error.

                If the programmer really wants to subtract one number from another and one or both of them are of type string, then the programmer should convert to number manually, e.g. using parseInt("1") - parseInt("2").

                1 Reply Last reply
                1
                • blackn1ght@feddit.ukB [email protected]

                  This isn't the languages fault, it's the developers.

                  S This user is from outside of this forum
                  S This user is from outside of this forum
                  [email protected]
                  wrote on last edited by
                  #38

                  Albeit true, I want to note that some languages encourage such practices way more than others do. Also, when you've got a hammer everything looks like a string nail.

                  blackn1ght@feddit.ukB 1 Reply Last reply
                  2
                  • blackn1ght@feddit.ukB [email protected]

                    This isn't the languages fault, it's the developers.

                    C This user is from outside of this forum
                    C This user is from outside of this forum
                    [email protected]
                    wrote on last edited by
                    #39

                    It's both.

                    1 Reply Last reply
                    1
                    • B [email protected]

                      You wouldn't want your code throw an exception

                      jackbydev@programming.devJ This user is from outside of this forum
                      jackbydev@programming.devJ This user is from outside of this forum
                      [email protected]
                      wrote on last edited by
                      #40

                      [object Object]

                      1 Reply Last reply
                      1
                      • scoopta@programming.devS [email protected]

                        As someone who mostly avoids JavaScript, I don't see the IT in this image, I just see a bad language I avoid!

                        jackbydev@programming.devJ This user is from outside of this forum
                        jackbydev@programming.devJ This user is from outside of this forum
                        [email protected]
                        wrote on last edited by
                        #41

                        I promise you, people make mistakes in every language lol.

                        1 Reply Last reply
                        2
                        • cm0002@lemmy.worldC [email protected]
                          This post did not contain any content.
                          H This user is from outside of this forum
                          H This user is from outside of this forum
                          [email protected]
                          wrote on last edited by
                          #42

                          I freaking love naan! Bring it!

                          F 1 Reply Last reply
                          3
                          • H [email protected]

                            I freaking love naan! Bring it!

                            F This user is from outside of this forum
                            F This user is from outside of this forum
                            [email protected]
                            wrote on last edited by
                            #43

                            NaN naan Jeremy that's insane

                            1 Reply Last reply
                            0
                            • M [email protected]

                              I got one of those too. I called the customer service to get another path home because of disturbances, and they just have robot answering. The robot started halfway through the call just reading pure json at me, and then said "to get this information as a message press 1" or something. This is what I got:

                              Here is your journey from undefined to undefined:
                              BUSS 506 towards Karolinska sjukhuset
                              09:36 from undefined
                              10:18 arrived at undefined.
                              Link to your journey.

                              jackbydev@programming.devJ This user is from outside of this forum
                              jackbydev@programming.devJ This user is from outside of this forum
                              [email protected]
                              wrote on last edited by
                              #44

                              If you want those on separate lines you need to add two spaces on the end of each line!

                              1 Reply Last reply
                              1
                              • dumbkid@lemmy.dbzer0.comD [email protected]

                                What's wrong with skateboards

                                jackbydev@programming.devJ This user is from outside of this forum
                                jackbydev@programming.devJ This user is from outside of this forum
                                [email protected]
                                wrote on last edited by
                                #45

                                I really don't care people using skate boards, even doing it around a workplace isn't necessarily taboo in my mind, but they were in the office right outside someone's door. Do it in the parking lot or something.

                                1 Reply Last reply
                                0
                                • T [email protected]

                                  Wait until Null opens the door

                                  null@slrpnk.netN This user is from outside of this forum
                                  null@slrpnk.netN This user is from outside of this forum
                                  [email protected]
                                  wrote on last edited by
                                  #46

                                  Knock knock

                                  1 Reply Last reply
                                  0
                                  • dohpaz42@lemmy.worldD [email protected]

                                    Must be from the NPM delivery service. The recipient is lucky the driver didn’t give them thousands of dependencies too.

                                    H This user is from outside of this forum
                                    H This user is from outside of this forum
                                    [email protected]
                                    wrote on last edited by
                                    #47

                                    You don't get dependencies in real life like that.

                                    You work 10 years in an industry and try to get a promotion? That may be a dependency issue.

                                    1 Reply Last reply
                                    0
                                    • S [email protected]

                                      Albeit true, I want to note that some languages encourage such practices way more than others do. Also, when you've got a hammer everything looks like a string nail.

                                      blackn1ght@feddit.ukB This user is from outside of this forum
                                      blackn1ght@feddit.ukB This user is from outside of this forum
                                      [email protected]
                                      wrote on last edited by
                                      #48

                                      In my mind a simple unit test should have caught this. Mock out the call to the service that sends the message and verify that it's been called with the correct message, and cover the possible failure scenarios. That said I hate loosely typed languages lol.

                                      1 Reply Last reply
                                      0
                                      • F [email protected]

                                        "I got a package from Jason"

                                        A This user is from outside of this forum
                                        A This user is from outside of this forum
                                        [email protected]
                                        wrote on last edited by
                                        #49

                                        "I also got a lock"

                                        1 Reply Last reply
                                        1
                                        • matty_r@programming.devM [email protected]

                                          I actually wish skateboards made a come back. Much more preferable over the escooters I see around a lot.

                                          A This user is from outside of this forum
                                          A This user is from outside of this forum
                                          [email protected]
                                          wrote on last edited by
                                          #50

                                          What about kick scooters?

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups