Well, crap

A few months back (April 30, to be exact), I did a small overhaul of the monsters and items in CMU adventures. I wanted to make the early game easier so you weren’t eating all of your equipment or keeping one enemy alive to use for healing. Made the changes, uploaded the monster definition files over the existing ones, didn’t think much of it.

Cue today when I get an email saying the game is broken because “monster 37” doesn’t exist. I look and, sure enough, there is no definition for that monster… nothing after monster 32 exists. But strangely, the room definition files do know about 37. And there is an image for monster 37. And 36. And 35. And… oh shit.

So apparently, in doing my overhaul, I did not have the most up-to-date version of the code. As such, a lot of the post-boss content (all of the Cohort and their associated items, mainly) got wiped from the game. The worst part is that I can’t seem to find a backup of these files, so it looks like it’s truly gone.

Since it’s now 12:45 and I really should be sleeping, I took the easiest solution and reuploaded the entire game based on the version I have locally. It isn’t ideal, but it should at least prevent issues with broken monster and item references. People with older accounts may be broken because the item database is also screwed up now (or, really, was broken with the April 30 update). But those people beat the game up to what existed then anyway, so that matters less.

I suppose this is a good opportunity to work on the new game I haven’t touched since before moving from San Francisco and leave this one up as some sort of historical archive.

So, in conclusion… always make backups of files before you wipe them out as part of a major overhaul. Blah.

null

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.

Blah.

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. :)

Photo Dump

I spent most of the morning tagging photos, managing to finish up September 2003. I’ll probably go to May 2004 next and tag backwards so I can start working backward on life.alanv.org as well.

I also did some digging around and discovered that Adobe Photoshop Album (which I use) stores its tags in an Access database. This is actually kind of awesome, because it means I can export the information from the program into an XML file (or other format). Looking at a preliminary dump, it appears that there are two relevant tables: one for tags, which contains a row for each tag that basically gives the tag an ID (and stores information like parent tags and tag ordering), and one for photos, which contains a row for each photo that gives information like filename and path to the image. The photo table also contains a column that appears to be a base64-encoded bit vector. My assumption is that this bit vector is how the tags on each image are stored (based on the tag ID in the tag table). I’ll probably try writing a script to parse this stuff so I can generate dumps of tags by photo or similar. Still, it’s nice to know that I’m not locked in to using PSA forever, and can export my tags to some other program by some means.

So yeah, without further ado, photodump from the past few weeks:

Brian and Danny at lunch after the volunteer event at Glide.


Simon at lunch after the volunteer event at Glide.


Awesome cupcake boxes from the KaraVan.


The Bay Bridge as seen from Colt Tower. Also a bit of downtown.


A game of Kubb at work in the Spear 7 courtyard area.


Release food… Buca di Beppo this time.


He’s so pretty! :O


Ally in her new apartment.


The Container Store’s awesome rainbow-colored selection of hangers. I was amused.


Matt hugging the roll of bubble wrap at the Container Store.


Ally contemplating the fuzzy lime at dinner at 21st Amendment.


Matt in Shawn and Daniel’s awesome living room.


Shawn in his living room.


Shawn and Ally attempting to restrain each other.

Also, the Daily Photo Project seems to be good for me. It gets me out of the house at least once per day, and it’s making me notice things I never have before. I’ve been doing it every day, but uploads will be done in batches because it’s a pain to move files from one computer to the other.

I am really missing my DSLR though, especially now that I’m forcing myself to take more different photos. I might have to get the D90 this month.

Tonight is all-you-can-eat pizza at Local. Om nom nom nom.

Awesome and Crappy

Today’s bit of awesome comes to you courtesy of AIM’s OSCAR protocol spec, and courtesy of Ian.

The spec defines a message type SNAC for sending protocol messages.
And what do they call the different kinds of SNACs? Why, foodgroups, of course.

Also, the error codes:

TOO_EVIL_SENDER  	17	Sender is too evil
TOO_EVIL_RECEIVER	18	Receiver is too evil

(where “evil” is the warning level of the user… remember when you used to have warning wars?)

Today’s little bit of crappyness comes to me courtesy of Bank of America.

I found some games on Amazon that I wanted to buy this morning around 8:45. Didn’t bring my wallet to work today, but that wasn’t a problem because my BoA credit card has the ShopSafe feature, where I can generate temporary credit card numbers for online use.
I log in to the site, however, and find that my credit card details are “temporarily unavailable.” Naturally, there is no other way to access ShopSafe other than through the details. So I wait.
Three and a half hours later, details are still unavailable, and the items have almost sold out. I finally get Greg to buy the items for me, paying about $10 more than I would have at 8:45. (For a final price of $28, $10 is very significant :P)
This is absolute crap. If you’re going to have downtime, you should send out notifications (which they never do) or at least have your downtime during times when people aren’t going to be trying to access credit card details (like 2 AM or something). This isn’t the first time either… I find that once or twice a week, my credit card details are unavailable (usually at similarly inconvenient times like early evening).
*sigh*
I hate BoA so much. Why do I use them?

VM Fail, Take Two

So the last time I messed with my VM, I needed IT to come and build a new VM for me to use.
You think I would have learned better than to mess around with vmware when everything was working mostly fine.

This morning, I came in to work to a perfectly working VM and everything was fine. However, ever since IT had gotten me to install VMWare Player to create my new VM, I hadn’t been able to use VMWare Server. I figured I would remedy this.

First step was straightforward enough… uninstall VMWare Player. Unfortunately, it seems that doing so also uninstalled VMWare Server. Fine, whatever.

Second step then became to reinstall VMWare Server. This didn’t quite work… apparently I’m missing a couple kernel source files. As a result, it was unable to build the VSOCK module. This meant that my VMs, when run through VMWare Server, had no network access. This is a problem when the entire point of your VM is to run tests remotely.

After trying without success to sync the required source files, I figured I’d cut my losses and go back to the player. Uninstalled VMWare Server and reinstalled VMWare Player.

This install didn’t quite work right. It didn’t create the shortcut in my Applications menu, which I tried to do. Then, on launching, it was unable to read some required files to start up unless I ran it with sudo. In the end, I decided to just tell the shortcut to sudo it, because I didn’t want to start chowning the actual VM files.

So yeah. That took most of the morning and resulted in a less-usable Player (have to run with sudo now). Blah.

I am not touching my VM again for a while. :P