Jay McGavren's Journal

2008-04-14

I didn't know that!

I really need to re-read Chapter 22 of Programming Ruby, because there’s all kinds of gory Ruby details that didn’t stick the first time…

A statement may have an optional rescue modifier followed by another statement (and by extension another rescue modifier, and so on). The rescue modifier takes no exception parameter and rescues StandardError and its children. If an exception is raised to the left of a rescue modifier, the statement on the left is abandoned, and the value of the overall line is the value of the statement on the right.
values = [ "1", "2.3", /pattern/ ]
result = values.map {|v| Integer(v) rescue Float(v) rescue String(v) }
result # [1, 2.3, "(?mix:pattern)"]

Read more...
2008-04-14

Amen, kitteh.

humorous pictures
see more crazy cat pics

(Actually, I was spared from today’s dronefest. Next one’s Thursday, though.)

Read more...
2008-04-14

Rock Band has “Won’t Get Fooled Again”?! Holy crap. We really need to finish tour mode.

Pick up my guitar and play Just like yesterday Then I'll get on my knees and pray We don't get fooled again

Remember my earlier rant about karaoke song quality? Definitely doesn’t apply to Harmonix. In fact, now that I know just how hard it is to get the rights to these songs and get the lyrics and timings right, I appreciate them a lot more.

(I’m also appreciating The Who more.)

Read more...
2008-04-14

Akismet is doing a good job blocking blog spammers, but now and again I’ll get a registration from a .de address or someone named “Nataljia” or so forth. I’m getting so I automatically delete these users without a second thought.

It must suck to be an Eastern European geek… You try to post an honest question, and everyone automatically assumes you’re a spammer…

Read more...
2008-04-13

Jotted this dream to myself in the wee hours of the morning...

The baby woke me up about 2:40 AM, so I can recall the dream I was having… Diana, Judy and I are all living on some kind of air platform with a whole city-full of other people, and the bottom level was about to fall off. I was scrambling to get my company’s data backed-up to CDs, including data for some game a co-worker was working on, so it wouldn’t be lost.

Read more...