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. The Lounge
  3. Why do so many "developers" not understand 'null'?

Why do so many "developers" not understand 'null'?

Scheduled Pinned Locked Moved The Lounge
helpsharepointcollaborationbeta-testingtutorial
61 Posts 36 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    I have just gone through four QA questions, each of which is an error caused by a null reference. And yet none of the posters seems to have any idea a) how to diagnose and fix it, or b) even what the error means. Do those of you who still work in teams find this is a common problem with younger team members?

    R M R M J 31 Replies Last reply
    0
    • L Lost User

      I have just gone through four QA questions, each of which is an error caused by a null reference. And yet none of the posters seems to have any idea a) how to diagnose and fix it, or b) even what the error means. Do those of you who still work in teams find this is a common problem with younger team members?

      R Offline
      R Offline
      Ron Anders
      wrote on last edited by
      #2

      Perhaps because they are so spoiled that they have never in there life encountered "nothing" and have no empathy for the poor code where they would otherwise put in a null check or try/catch to help it succeed. Prolly not. But kids today. :-D

      1 Reply Last reply
      0
      • L Lost User

        I have just gone through four QA questions, each of which is an error caused by a null reference. And yet none of the posters seems to have any idea a) how to diagnose and fix it, or b) even what the error means. Do those of you who still work in teams find this is a common problem with younger team members?

        M Offline
        M Offline
        Mircea Neacsu
        wrote on last edited by
        #3

        Well, after all it is the Billion Dollar Mistake[^], as Tony Hoare himself put it :-D Recently I had to go through a large code base where the authors went crazy using Non-nullable pointers[^] almost everywhere. What can I say, seems a complicated problem for many people :rolleyes:

        Mircea

        P 1 Reply Last reply
        0
        • L Lost User

          I have just gone through four QA questions, each of which is an error caused by a null reference. And yet none of the posters seems to have any idea a) how to diagnose and fix it, or b) even what the error means. Do those of you who still work in teams find this is a common problem with younger team members?

          R Offline
          R Offline
          RickZeeland
          wrote on last edited by
          #4

          The song "Absolute beginners" by David Bowie springs to mind :-\

          1 Reply Last reply
          0
          • L Lost User

            I have just gone through four QA questions, each of which is an error caused by a null reference. And yet none of the posters seems to have any idea a) how to diagnose and fix it, or b) even what the error means. Do those of you who still work in teams find this is a common problem with younger team members?

            M Offline
            M Offline
            Marc Clifton
            wrote on last edited by
            #5

            Well, in a world where we have programming languages that have concepts like "truthy" and "falsey", what can you expect? :rolleyes:

            Latest Article:
            SVG Grids: Squares, Triangles, Hexagons with scrolling, sprites and simple animation examples

            R 1 Reply Last reply
            0
            • L Lost User

              I have just gone through four QA questions, each of which is an error caused by a null reference. And yet none of the posters seems to have any idea a) how to diagnose and fix it, or b) even what the error means. Do those of you who still work in teams find this is a common problem with younger team members?

              J Offline
              J Offline
              Jacquers
              wrote on last edited by
              #6

              Not sure... there's nothing to understand ;)

              L 1 Reply Last reply
              0
              • J Jacquers

                Not sure... there's nothing to understand ;)

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

                I read somewhere, years ago, that zero/nothing is one of the most difficult concepts for the human brain to understand. I think it was suggested that that was why there is no zero in Roman numerals.

                L H 2 Replies Last reply
                0
                • L Lost User

                  I have just gone through four QA questions, each of which is an error caused by a null reference. And yet none of the posters seems to have any idea a) how to diagnose and fix it, or b) even what the error means. Do those of you who still work in teams find this is a common problem with younger team members?

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

                  Education. And yes, lack of is a common problem.

                  Bastard Programmer from Hell :suss: "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.

                  1 Reply Last reply
                  0
                  • L Lost User

                    I read somewhere, years ago, that zero/nothing is one of the most difficult concepts for the human brain to understand. I think it was suggested that that was why there is no zero in Roman numerals.

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

                    It isn't. I have one apple in my hand. How much do you have in yours? Even prehistoric hunters came back with "zero". There's no 0 in Roman Numerals because it would not make sense to count nothing. A farmer that owes no taxes gets ignored, they counted what was owed. "Zero" would have no use there; even if that is the return of your hunting trip, 0 is not recorded. Writing is too precious to record zero's.

                    Bastard Programmer from Hell :suss: "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.

                    T J 2 Replies Last reply
                    0
                    • L Lost User

                      I have just gone through four QA questions, each of which is an error caused by a null reference. And yet none of the posters seems to have any idea a) how to diagnose and fix it, or b) even what the error means. Do those of you who still work in teams find this is a common problem with younger team members?

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

                      Addresses of other addresses boggles the mind; until you get the hang of it.

                      "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

                      1 Reply Last reply
                      0
                      • L Lost User

                        I have just gone through four QA questions, each of which is an error caused by a null reference. And yet none of the posters seems to have any idea a) how to diagnose and fix it, or b) even what the error means. Do those of you who still work in teams find this is a common problem with younger team members?

                        0 Offline
                        0 Offline
                        0x01AA
                        wrote on last edited by
                        #11

                        Give freedom back to 'NULL' to exist. If not: Dear c# designers, please then remove the possibility to define nullable types ;P

                        L 1 Reply Last reply
                        0
                        • 0 0x01AA

                          Give freedom back to 'NULL' to exist. If not: Dear c# designers, please then remove the possibility to define nullable types ;P

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

                          The problems are not about nullable types. Thay are about ordinary references being null.

                          1 Reply Last reply
                          0
                          • L Lost User

                            I have just gone through four QA questions, each of which is an error caused by a null reference. And yet none of the posters seems to have any idea a) how to diagnose and fix it, or b) even what the error means. Do those of you who still work in teams find this is a common problem with younger team members?

                            D Offline
                            D Offline
                            Daniel Pfeffer
                            wrote on last edited by
                            #13

                            There is a bridge joining the two buildings in our location. Any "developer" whose code crashes in production because of a bad pointer gets hanged from the bridge pour encourager les autres. So no, this is not a common problem. :) Seriously, all the developers I work with (even the young 'uns) know what a null reference is, and know to avoid it

                            Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

                            0 1 Reply Last reply
                            0
                            • M Marc Clifton

                              Well, in a world where we have programming languages that have concepts like "truthy" and "falsey", what can you expect? :rolleyes:

                              Latest Article:
                              SVG Grids: Squares, Triangles, Hexagons with scrolling, sprites and simple animation examples

                              R Offline
                              R Offline
                              raddevus
                              wrote on last edited by
                              #14

                              Marc Clifton wrote:

                              in a world where we have programming languages that have concepts like "truthy" and "falsey", what can you expect?

                              In that Universe, I expect Qubits. :rolleyes: Just putting a Quantum spin on things.

                              1 Reply Last reply
                              0
                              • D Daniel Pfeffer

                                There is a bridge joining the two buildings in our location. Any "developer" whose code crashes in production because of a bad pointer gets hanged from the bridge pour encourager les autres. So no, this is not a common problem. :) Seriously, all the developers I work with (even the young 'uns) know what a null reference is, and know to avoid it

                                Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

                                0 Offline
                                0 Offline
                                0x01AA
                                wrote on last edited by
                                #15

                                Quote:

                                Seriously, all the developers I work with (even the young 'uns) know what a null reference is, and know to avoid it

                                Same here. All the young serious developers I'm working with, know how to handle it.

                                M 1 Reply Last reply
                                0
                                • 0 0x01AA

                                  Quote:

                                  Seriously, all the developers I work with (even the young 'uns) know what a null reference is, and know to avoid it

                                  Same here. All the young serious developers I'm working with, know how to handle it.

                                  M Offline
                                  M Offline
                                  megaadam
                                  wrote on last edited by
                                  #16

                                  0x01AA wrote:

                                  Same here.

                                  Here too.

                                  "If we don't change direction, we'll end up where we're going"

                                  1 Reply Last reply
                                  0
                                  • L Lost User

                                    It isn't. I have one apple in my hand. How much do you have in yours? Even prehistoric hunters came back with "zero". There's no 0 in Roman Numerals because it would not make sense to count nothing. A farmer that owes no taxes gets ignored, they counted what was owed. "Zero" would have no use there; even if that is the return of your hunting trip, 0 is not recorded. Writing is too precious to record zero's.

                                    Bastard Programmer from Hell :suss: "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.

                                    T Offline
                                    T Offline
                                    trønderen
                                    wrote on last edited by
                                    #17

                                    In Norwegian, the name of numeric zero is 'null'. So Norwegian kids 'sort of' have an excuse for confusing the two. But they are quite different. Zero is a distinct, well defined numeric value that you may treat 100% like any other numeric value. 'null' is nothing, not a numeric value, but a void. Emptiness. An abyss. Not at a valid numeric value. Some programming languages use the term 'void'; it is really much more descriptive. I feel like digging up my old Robert Heinlein collection to re-read the short story—And He Built a Crooked House[^]. The story tells about a crazy architect (in California, obviously :-)) who designs a house which is a 3-dimensional projection of a 4-dimensional cube, a tesseract. The night before the house owners move in, there is an earthquake that makes the house fold up as a true tesseract, in 4 dimensions, not just as a 3-dim projection. I believe that Heinlein has taken liberties in his description of how a real tesseract would appear. But his description of the view out one window, of a total emptiness, not even black, gave me shivers when I first read it, many years ago. It is a beautiful literary description of the concept of a 'null'. I think that I didn't fully understand the concept of null, void, myself until I read the Heinlein story.

                                    L K 2 Replies Last reply
                                    0
                                    • L Lost User

                                      I have just gone through four QA questions, each of which is an error caused by a null reference. And yet none of the posters seems to have any idea a) how to diagnose and fix it, or b) even what the error means. Do those of you who still work in teams find this is a common problem with younger team members?

                                      S Offline
                                      S Offline
                                      Slacker007
                                      wrote on last edited by
                                      #18

                                      Richard MacCutchan wrote:

                                      Do those of you who still work in teams find this is a common problem with younger team members?

                                      Yes, all the time. I almost think it is something you have to learn the hard way, because in my experience, most are not aware of this as they code. Now, new IntelliSense with VS 2022 and ReSharper will point this out/alert you right away when it happens, but still, everyone should grok this concept.

                                      1 Reply Last reply
                                      0
                                      • L Lost User

                                        I have just gone through four QA questions, each of which is an error caused by a null reference. And yet none of the posters seems to have any idea a) how to diagnose and fix it, or b) even what the error means. Do those of you who still work in teams find this is a common problem with younger team members?

                                        L Offline
                                        L Offline
                                        lmoelleb
                                        wrote on last edited by
                                        #19

                                        A guy on the team I just joined was somewhat miffed about the whole nullable feature in C#. He had learned in university that object oriented languages had nullable references. And C# is an object oriented language... so obviously we could not force references to have values.

                                        1 Reply Last reply
                                        0
                                        • L Lost User

                                          I have just gone through four QA questions, each of which is an error caused by a null reference. And yet none of the posters seems to have any idea a) how to diagnose and fix it, or b) even what the error means. Do those of you who still work in teams find this is a common problem with younger team members?

                                          M Offline
                                          M Offline
                                          Mycroft Holmes
                                          wrote on last edited by
                                          #20

                                          Richard, this is a problem of perception, you seem to think anyone who posts in Q&A is a "developer". Most are probably just learning (and you are their teaching resource) and a lot of them are code monkeys at best.

                                          Never underestimate the power of human stupidity - RAH I'm old. I know stuff - JSOP

                                          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