NYCPHP Meetup

NYPHP.org

[nycphp-talk] Need help understanding NULL

Kristina D. H. Anderson ka at kacomputerconsulting.com
Fri Sep 4 12:41:44 EDT 2009


Hey, you're welcome, but you should really thank Mr. Mintz as he's the 
one who's responsible.

An empty box score is a really good way to explain NULL, I gotta hand 
it to him.

Kristina

> As a Lifetime Baseball fan (married over home plate back in 2000), 
career-long web-programmer (I remember when NYPHP was first getting 
started), and long time stalker of this list, I second Kristina's "Love 
It".
> 
> As programmers, we spend a lot of time using metaphors to explain 
what we are doing in a way easily understood by others. I've even 
explained the ins-and-outs of MX records by using a "delivery to an 
upscale apartment building" metaphor.  But the baseball metaphor and 
Tao reference are best I've seen in a while... both for their 
simplicity and universal (at least in North America) appeal.
> 
> And to think that I overlooked the original posting.  Thanks Kristina.
> Thanks for making my Friday interesting.
> 
> 
> Patrick J. Fee
> Manager, Systems Engineering Services
> BAE Systems Technology Solutions & Services
> Cel: (240) 401-6820
> Fax: (301) 231-2635
> Patrick.Fee at BAESystems.com
> 
> 
> -----Original Message-----
> From: talk-bounces at lists.nyphp.org [mailto:talk-
bounces at lists.nyphp.org] On Behalf Of Kristina D. H. Anderson
> Sent: Friday, September 04, 2009 12:08 PM
> To: NYPHP Talk
> Subject: Re: [nycphp-talk] Need help understanding NULL
> 
> References to baseball AND the Tao in a PHP post about NULL!  Love 
it!!
> 
> Kristina
> 
> PS Also a jQuery fan here.
> 
> -----Original Message----- 
> On Mon, Aug 31, 2009 at 11:08 AM, <sequethin at gmail.com wrote:
>  
> [...] the way I think of it is, NULL simply means no value at all. 0 
and 
> boolean false and '' are values, for sure; NULL is, um, null. As for 
concrete examples, in baseball there are those two-row tables -- one 
for the 
> away and one for the home team -- with columns for each of the nine 
innings. 
> Before the game begins, what are the values in each of those fields?
>  
>  Problems can arise in PHP because if you var_dump($foo) and it's 
> NULL, is that because it was never set, or because it was explicitly 
set to 
> NULL? Or is it because you are referring to global that's out of 
scope because you're inside a function? PHP doesn't care because it's 
NULL in either case. If you have an $object and accidently lapse into 
French and type $objet-doSomething(), your program will puke because 
$objet is 
> likewise NULL. (Assuming for the sake of the example that you haven't 
actually assigned an object to $objet)
>   
> As for Javascript, the days of "I hate it" are behind us. You gotta 
> do it, like it or not, in this brave new web 2.0 world. Fortunately 
we have 
> an ample selection of quality frameworks to choose from, all of 
which, apparently, have peculiarities sufficiently irksome to some 
programmer,
>  whose Hubris and Impatience greatly exceed her or his Laziness, so 
> that she will write yet another one, and cast of characters grows 
larger. I'm a humble consumer, myself, and I'm liking JQuery.
>  
>  -- 
>  David Mintz
>  http://davidmintz.org/
>  
>  The subtle source is clear and bright
>  The tributary streams flow through the darkness
>  
>  
> 
> 
> 
> 
> _______________________________________________
> New York PHP User Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
> 
> http://www.nyphp.org/show_participation.php
> _______________________________________________
> New York PHP User Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
> 
> http://www.nyphp.org/show_participation.php
> 
> 







More information about the talk mailing list