Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • 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
Code Project
  1. Home
  2. Other Discussions
  3. The Insider News
  4. mr. null

mr. null

Scheduled Pinned Locked Moved The Insider News
com
31 Posts 8 Posters 0 Views 1 Watching
  • 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.
  • B Brisingr Aerowing

    For websites and stuff to fail like that is really worrying. Shouldn't those just be strings?

    What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???

    T Offline
    T Offline
    TheGreatAndPowerfulOz
    wrote on last edited by
    #18

    There's probably some code somewhere in the frontend/backend that's comparing the string to "null" because the developers doughheads decided that was the way to represent (no data) for certain db fields instead of using the more reasonable dbnull field concept.

    Decrease the belief in God, and you increase the numbers of those who wish to play at being God by being “society’s supervisors,” who deny the existence of divine standards, but are very serious about imposing their own standards on society.-Neal A. Maxwell You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun

    B 2 Replies Last reply
    0
    • T TheGreatAndPowerfulOz

      I modified it to test for "undefined == null" and "undefined === null" and only the "==" (double eq) succeeded in being "equal".

      Decrease the belief in God, and you increase the numbers of those who wish to play at being God by being “society’s supervisors,” who deny the existence of divine standards, but are very serious about imposing their own standards on society.-Neal A. Maxwell You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun

      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #19

      But that's not the point. The test was whether the string value "null" would compare equal to null or undefined, which it doesn't.

      "null" === null // false
      "null" == null // false
      "null" === undefined // false
      "null" == undefined // false

      // Neither of these tests would affect "Mr Null":
      null === undefined // false
      null == undefined // true


      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      T 1 Reply Last reply
      0
      • Richard DeemingR Richard Deeming

        But that's not the point. The test was whether the string value "null" would compare equal to null or undefined, which it doesn't.

        "null" === null // false
        "null" == null // false
        "null" === undefined // false
        "null" == undefined // false

        // Neither of these tests would affect "Mr Null":
        null === undefined // false
        null == undefined // true


        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        T Offline
        T Offline
        TheGreatAndPowerfulOz
        wrote on last edited by
        #20

        Yes, I know, and I understood that already. The claim was made that "undefined == null" and "undefined === null" are equivalent and "fail" but they don't. Both are valid well-defined statements and comparisons.

        Decrease the belief in God, and you increase the numbers of those who wish to play at being God by being “society’s supervisors,” who deny the existence of divine standards, but are very serious about imposing their own standards on society.-Neal A. Maxwell You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun

        1 Reply Last reply
        0
        • T TheGreatAndPowerfulOz

          Yeah, that's what I was thinking. What bassakward software is written to see a "null" STRING as a null object pointer. WTF? Very poorly written software. And I'm wondering just how real this is?

          Decrease the belief in God, and you increase the numbers of those who wish to play at being God by being “society’s supervisors,” who deny the existence of divine standards, but are very serious about imposing their own standards on society.-Neal A. Maxwell You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #21

          Methinks it isn't. "Null" != "null"; and does it happen to "nulls" also? Come on, a string literal is exactly that, an array of byte in a specific encoding, and it does not magically become a null-pointer. Sound like something only an idiot would parse in each user-input. Then again, the heir to the throne of idiots may have decided that a NVARCHAR text of 'Null' is actually null. I doubt we will find out.

          Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

          T 1 Reply Last reply
          0
          • L Lost User

            Methinks it isn't. "Null" != "null"; and does it happen to "nulls" also? Come on, a string literal is exactly that, an array of byte in a specific encoding, and it does not magically become a null-pointer. Sound like something only an idiot would parse in each user-input. Then again, the heir to the throne of idiots may have decided that a NVARCHAR text of 'Null' is actually null. I doubt we will find out.

            Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

            T Offline
            T Offline
            TheGreatAndPowerfulOz
            wrote on last edited by
            #22

            Eddy Vluggen wrote:

            Methinks it isn't.

            Agreed.

            Eddy Vluggen wrote:

            something only an idiot would parse

            Indeed.

            Decrease the belief in God, and you increase the numbers of those who wish to play at being God by being “society’s supervisors,” who deny the existence of divine standards, but are very serious about imposing their own standards on society.-Neal A. Maxwell You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun

            1 Reply Last reply
            0
            • T TheGreatAndPowerfulOz

              There's probably some code somewhere in the frontend/backend that's comparing the string to "null" because the developers doughheads decided that was the way to represent (no data) for certain db fields instead of using the more reasonable dbnull field concept.

              Decrease the belief in God, and you increase the numbers of those who wish to play at being God by being “society’s supervisors,” who deny the existence of divine standards, but are very serious about imposing their own standards on society.-Neal A. Maxwell You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun

              B Offline
              B Offline
              Brisingr Aerowing
              wrote on last edited by
              #23

              TheGreatAndPowerfulOz wrote:

              developers doughheads

              LOL

              What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???

              1 Reply Last reply
              0
              • T TheGreatAndPowerfulOz

                There's probably some code somewhere in the frontend/backend that's comparing the string to "null" because the developers doughheads decided that was the way to represent (no data) for certain db fields instead of using the more reasonable dbnull field concept.

                Decrease the belief in God, and you increase the numbers of those who wish to play at being God by being “society’s supervisors,” who deny the existence of divine standards, but are very serious about imposing their own standards on society.-Neal A. Maxwell You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun

                B Offline
                B Offline
                Brisingr Aerowing
                wrote on last edited by
                #24

                Or possibly the management decided that.

                What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???

                T 1 Reply Last reply
                0
                • B Brisingr Aerowing

                  Or possibly the management decided that.

                  What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???

                  T Offline
                  T Offline
                  TheGreatAndPowerfulOz
                  wrote on last edited by
                  #25

                  yah, it does sounds like a manager sort of thing to do...

                  Decrease the belief in God, and you increase the numbers of those who wish to play at being God by being “society’s supervisors,” who deny the existence of divine standards, but are very serious about imposing their own standards on society.-Neal A. Maxwell You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun

                  1 Reply Last reply
                  0
                  • T TheGreatAndPowerfulOz

                    Really? Java converts a string variable with the contents "null" into a null object pointer? Really? I think maybe you mean JavaScript, but even then that doesn't do what you suggest (convert a string containing "null" to a null pointer).

                    Decrease the belief in God, and you increase the numbers of those who wish to play at being God by being “society’s supervisors,” who deny the existence of divine standards, but are very serious about imposing their own standards on society.-Neal A. Maxwell You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun

                    J Offline
                    J Offline
                    Jorgen Andersson
                    wrote on last edited by
                    #26

                    I can see that I was quite unclear, or even erroneous, in my answer to Eddy. What I meant to convey was merely the existence of the literal 'null'. This is why I asked "But which other languages does the same". And I know this isn't converted to a null object pointer, 'null' in Java is a type[^] not a pointer. This is the reason I responded to Eddy that it is an abstraction. I'm sorry to have ticked you off so badly.

                    Wrong is evil and must be defeated. - Jeff Ello

                    T 1 Reply Last reply
                    0
                    • Sander RosselS Sander Rossel

                      My thoughts exactly! It takes A LOT OF WORK to translate "null" into null... :~ At least in the languages I know. Unless...

                      <script>
                      var name = 'null';
                      if (name == null) {
                      alert("That's a lovely name " + name + '!');
                      } else {
                      alert('Please insert a name!');
                      }
                      </script>

                      Yep, JavaScript as always X| And it's only the one language that's used for every website everywhere. Just "if (name)" would've been fine though... JavaScript... Y U DO DIS!? :confused:

                      Visit my blog at Sander's bits - Writing the code you need. Or read my articles at my CodeProject profile.

                      Simplicity is prerequisite for reliability. — Edsger W. Dijkstra

                      Regards, Sander

                      R Offline
                      R Offline
                      Rob Grainger
                      wrote on last edited by
                      #27

                      Running that script in Chrome alerts "Please insert a name". Even JavaScript isn't that bad. Close, but not quite that bad.

                      "If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.

                      Sander RosselS 1 Reply Last reply
                      0
                      • R Rob Grainger

                        Running that script in Chrome alerts "Please insert a name". Even JavaScript isn't that bad. Close, but not quite that bad.

                        "If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.

                        Sander RosselS Offline
                        Sander RosselS Offline
                        Sander Rossel
                        wrote on last edited by
                        #28

                        Please see my earlier reaction[^]... :laugh:

                        Visit my blog at Sander's bits - Writing the code you need. Or read my articles at my CodeProject profile.

                        Simplicity is prerequisite for reliability. — Edsger W. Dijkstra

                        Regards, Sander

                        1 Reply Last reply
                        0
                        • J Jorgen Andersson

                          I can see that I was quite unclear, or even erroneous, in my answer to Eddy. What I meant to convey was merely the existence of the literal 'null'. This is why I asked "But which other languages does the same". And I know this isn't converted to a null object pointer, 'null' in Java is a type[^] not a pointer. This is the reason I responded to Eddy that it is an abstraction. I'm sorry to have ticked you off so badly.

                          Wrong is evil and must be defeated. - Jeff Ello

                          T Offline
                          T Offline
                          TheGreatAndPowerfulOz
                          wrote on last edited by
                          #29

                          Sorry if I gave the impression that I was "ticked off". I was just surprised that someone would seem to "believe" what you wrote.

                          Quote:

                          There is also a special null type, the type of the expression null (§3.10.7, §15.8.1), which has no name.

                          Doesn't that say that 'null' is an expression whose type is also null? How else can we compare a java reference value (an expression) to null unless null is also an expression (i.e value)?

                          Decrease the belief in God, and you increase the numbers of those who wish to play at being God by being “society’s supervisors,” who deny the existence of divine standards, but are very serious about imposing their own standards on society.-Neal A. Maxwell You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun

                          J 1 Reply Last reply
                          0
                          • T TheGreatAndPowerfulOz

                            Sorry if I gave the impression that I was "ticked off". I was just surprised that someone would seem to "believe" what you wrote.

                            Quote:

                            There is also a special null type, the type of the expression null (§3.10.7, §15.8.1), which has no name.

                            Doesn't that say that 'null' is an expression whose type is also null? How else can we compare a java reference value (an expression) to null unless null is also an expression (i.e value)?

                            Decrease the belief in God, and you increase the numbers of those who wish to play at being God by being “society’s supervisors,” who deny the existence of divine standards, but are very serious about imposing their own standards on society.-Neal A. Maxwell You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun

                            J Offline
                            J Offline
                            Jorgen Andersson
                            wrote on last edited by
                            #30

                            Interesting choice of words, isn't it. Especially when you read two rows below.

                            Quote:

                            The null reference is the only possible value of an expression of null type.

                            But since the null type is mentioned together with reference types and primitive types I don't feel there is any doubts about the intensions.

                            Wrong is evil and must be defeated. - Jeff Ello

                            T 1 Reply Last reply
                            0
                            • J Jorgen Andersson

                              Interesting choice of words, isn't it. Especially when you read two rows below.

                              Quote:

                              The null reference is the only possible value of an expression of null type.

                              But since the null type is mentioned together with reference types and primitive types I don't feel there is any doubts about the intensions.

                              Wrong is evil and must be defeated. - Jeff Ello

                              T Offline
                              T Offline
                              TheGreatAndPowerfulOz
                              wrote on last edited by
                              #31

                              Sure, the obvious intention that "null" is both a value expression and a type. Although you can never access the null type only the null value expression.

                              Decrease the belief in God, and you increase the numbers of those who wish to play at being God by being “society’s supervisors,” who deny the existence of divine standards, but are very serious about imposing their own standards on society.-Neal A. Maxwell You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun

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


                              • Login

                              • Don't have an account? Register

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