Blogtrek

Blogtrek

2002/12/03

Null

Microsoft has done a lot to infuriate computer users and programmers, but one of the worst is Null, most prevalent in his database package, Access. This is a quantity that supposedly fills a slot where there supposedly is no value; it isn't zero, it isn't "" (a word with zero letters in it), it isn't 0.0, and it isn't False. It is Null, and any operation that uses Null is Null. 3 + Null = Null. "This is a good string" concatenated with Null is Null, and so forth. The most unreasonable at one time was saying that True or Null is Null. No matter what the truth value of the second argument is, the expression is going to be True; that is a property of "or". Later versions of Access set True or Null to True.

The other way in which Null infuriates programmers is that you can't use it in certain applications without causing an error message that terminates the entire application. That's like A-bombing a street because it has a pothole. When this thing can happen, it can take a long time to see what is happening, and it causes you to have to program around it. I don't know how many programmer hours have been lost because of Null, but it must be a lot.

No comments: