Yesterday afternoon’s little bit of head scratching and debugging confusion comes to you courtesy of the fact that

SELECT * FROM my_table
WHERE my_id = iObject.my_id

does not do the expected thing when both my_id and iObject.my_id are null.
Because apparently null = null and null <> null both evaluate to false, because any comparison involving null evaluates to false.
(Edit: As pointed out to me by many people, it should actually evaluate to null, but regardless, the effect is the same… the select statement does not get the rows you expect.)

I guess it makes sense when you think about it (a lack of a value is not equal to the lack of a value, because there is no value, as opposed to C where null is just a pointer to 0x0 so a value comparison makes sense), but it’s still a surprising issue when you first come across it. Working around it involves the non-intuitive

SELECT * FROM my_table
WHERE (my_id IS NULL AND iObject.my_id IS NULL) OR my_id = iObject.my_id

It looks like MySql also provides the null-comparing operator <=> which will return equality even if both items are null. But it doesn’t look like Oracle does.


On an unrelated note, I’ve redone the design of photos. Check it out if you haven’t yet, and let me know if things are broken or don’t work for you. :)

Zombie Dream

I just had a rather interesting dream about the zombie apocalypse that seems like it was either a game or really wants to be a game. (Or maybe it’s because I’m still half asleep.)

It starts out straightforwardly enough. I’m in my room fighting some zombies that have come in… very carefully because, apparently, the zombification is particularly dangerous because all bodily fluids are contageous and can turn you into a zombie on contact. That includes things like contact with worn clothing (sweat), used kleenex (snot), unbottled water (old urine, even if filtered) and children’s school desks (saliva from kids falling asleep and drooling). The general goal at this point was to collect food and supplies to help survive. There was the concept of my “inventory” where you have various food items like “Dubious Steak” (the origin is unknown and you have a percent chance of getting zombified when eating it), “Spoiled Dubious Steak” (same thing but that has been in your inventory too long and is now rancid), “Sterile Steak” (steak that is guaranteed to be safe to eat), and “Infected Steak” (steak that is guaranteed to make you a zombie because it is known to have come into contact with zombies’ bodily fluid). Of course, you have to eat every now and then (hunger meter!), so you venture out into the world to collect food and weapons, find survivors, and fight zombies.

Eventually, after fighting through some locations, I come across a house where the front yard is entirely cactuses. The owner has filled in the walkway to the house with potted cactuses as well, and there is a wall around the rest of it, rendering it mostly safe (apparently zombies hate getting poked). Going in, I find myself in a huge luxury hotel (hey, dreams are weird) with a ton of survivors. Also the military. Also a printing press. It’s really hot and stuffy inside. Random plans are made and supplies are collected. I have vague ideas to use the printing press to distribute information (which is apparently a huge thing that is larger than two people… I’ll try and make a drawing later if I can still remember) when the zombies manage to break in. In the ensuing battle, a zombie raspberries at me, covering me in spit. I am now infected. My friend, rather than killing me, has pity on me and kicks me outside.

Transition in the game/dream (with a fade to a black screen with the white “Part 2” text and everything)… I am now a zombie. However, unlike the zombies I’ve been fighting up until now, I have kept my mind (and my brain) and am still basically myself… except I no longer need to eat (apparently I don’t need to eat brains). I come across a human survivor who can’t tell I’m a zombie and attempts to hug me. After warning him away, we end up travelling together. We seek food for him (his entire inventory is spoiled, and mine is starting to as well… lack of untainted water is the worst) and generally talk about the apocalypse and thoughts on why I’m not a typical zombie. He tries to convince me to bite him or something so he becomes a zombie too, and I repeatedly refuse. Eventually, we’re sitting and talking and he goes off on a long tangent on some boring topic that causes me to nod off. He sticks his hand in my puddle of drool and becomes a zombie like me. I feel really guilty afterward, we just continue exploration.

The epilogue of the game/dream shows a city in the world much like the modern day one (or the one before the apocalypse), except with all zombies as inhabitants (sane zombies). The biggest thing that stuck out to me was the lack of food or farming-related locations in the city, which seemed like a really good thing.


Today’s terrifying thing is these new Goldfish S’Mores.

Not sure what I was thinking in buying them. I’m sure it seemed like a good idea at the time.
They’re a mix of honey graham cracker goldfish, chocolate graham cracker goldfish, and tiny marshmallow goldfish like the kind you find in scary children’s cereal. (I was expecting marshmallow-flavored goldfish, which would have been slightly less scary.)



life has gotten an update to fill in the last two months and bring it up to date. Accordingly, the photo stats page has also been updated to yesterday. Yay photos.

Life is going well in general. Pittsburgh was a really good idea. :)

Here’s some random photos from life: