The Economy is Literally Solid-State H2O

October 30, 2008

Two artists on Wednesday installed a 1,500-pound ice sculpture that spelled the word “Economy” in Manhattan’s financial district.

The “Main Street Meltdown” was to remain in Foley Square until it melted — about 24 hours. By Wednesday evening, the E and the C had already thawed and vanished.

Artists say an ice sculpture is a literal representation of the nation’s financial crisis.

Grammar nazis, however, say that that’s an entirely incorrect usage of the word “literal.”

Advertisements

Target: Best Video Game Retailer Evar???

October 27, 2008

I just had a great customer service experience at Target. Yesterday I bought the new Guitar Hero game, which includes mic and drums like Rock Band. But there was a certain very annoying problem with the drum pads. I didn’t want to pack everything back up in the box, and I wasn’t even sure if they’d have any more in stock. So I just took the drum pads and the receipt.

Not only was Target open at 8:45am; not only did they have another Guitar Hero in stock; not only did they allow me to exchange it without repacking the whole game; but they gave me the drum set from the last copy in stock. (Let me remind you that most Gamestops haven’t even gotten a single copy in stock other than preorders.) Target didn’t even make me wait for them to enter the return in their system – they just gave me the drum set and sent me on my way. Amazing!

Target’s also the best place to find hard-to-find popular items in stock. That’s where I got my Wii, and it’s the place that I most frequently saw Mario Kart in stock when it was extra-rare. So, in summary, Target’s a great place to shop for games, and I highly recommend it!

Blogged with the Flock Browser

YUI Calendar Changes Dates

October 21, 2008

My Ajax app has a persistent date it keeps track of, to compare other dates against. But I ran into a problem where the date was somehow being changed – from 12am on a certain day to 12pm. I looked through my code, and I wasn’t even changing it anywhere.

Finally, I noticed I was passing the date into a YUI Calendar object, to specify what was the minimum allowable selectable date. JavaScript Date objects are mutable, so I realized it was possible YUI was changing the hour value on the date. Sure enough, when I changed the code to pass YUI a copy of the Date instead, the date’s hour was no longer changed.

I’m still not entirely sure why YUI would need to change the Date, or if it’s even good design for it to do so instead of creating a copy of the Date object. Nonetheless, lesson learned: if you want to make sure an object you’re passing somewhere is unchanged, make a copy before you pass it. This smacks of a general OO principle, but for some reason I haven’t run across this problem in the Java world before.


News Flash: IE getElementById Invaded By Form Field Names!

October 17, 2008

If document.getElementById() isn’t returning the results in IE that you expect, checkand see if you have any form fields with that name. It seems like IE returns them from getElementById() – even if you manually give them an ID different from the name, that doesn’t conflict! Your only hope seems to be renaming the element you need to select, so that it doesn’t have the same name as any of your form fields.


IE6 setAttribute “onclick” not working

October 16, 2008

OK, I don’t have time to fully test this one, but when I dynamically create DOM nodes in a YUI panel, and then create an anchor tag and add an onclick handler to it (no HREF) by using setAttribute, IE6 doesn’t register the click event. It seems that I need to use another event attaching method, like YUI Event addListener() – that works fine in both IE and FF.


IE6 :hover Support

October 16, 2008

IE6 does not support :hover pseudo-classes on non-anchor elements. Ugh.

There are a few fixes out there. This one uses prototype. I was able to translate it to use YUI Event and Dom pretty easily. Wish I had an open-source agreement with my employer so I could show it here.


Don’t Waste Your Life on Your iPhone

October 16, 2008

John Piper is one of my favorite pastors and authors, but one who’s known for not trying to be particularly polite. He wrote a book called Don’t Waste Your Life, talking about God’s purpose for your life, and how so many things can distract us from it. One of the examples he frequently cites is computers and technology.

Today, on Piper’s blog RSS feed, I saw the following headline:

Don’t Waste Your Life on Your iPhone

Immediately I got convicted. Is my latest technology interest really keeping me from God’s purpose for my life? Am I wasting my life on Steve Jobs’ latest gadget?

Then I read the post:

The full text of Don’t Waste Your Life is now available online for free in a format optimized for the iPhone.

Oh. Right. I guess Piper wasn’t calling me out after all. Maybe it was just the Holy Spirit.