Archives / Search ›

Buying a CO alarm

So Illinois is mandating carbon monoxide detector/alarms in residences as of January 1. Today I decided to buy one. I wanted to get a combination smoke/CO detector, that way I wouldn’t need to change two batteries. Sounds easy, doesn’t it?

Let’s see, this one is on clearance because its battery lasts 2 weeks.

This one seems to give a lot of false alarms, and has a rather humorous review attached.

Reviewer: A Kitchen & Housewares enthusiast
This is not and I repeat is not a good alarm. There is one alarm light and you can hardly tell which one is sounding. It looks as if the specs are lying to me and I hate lies. Also the battery died after 6-8 months. The low battery alert is loud and chirps so anoyingly. I also noticed that the alarm sounds a loud shrieking alarm when it sounds. I will return this alarm. Never again will I trust in First Alert!

It also makes me wish I never meet a “kitchen and housewares enthusiast” in person.

This one goes off when you try to use an infrared remote control. The detector goes in the hallway behind my stereo, so that one’s out.

Finally, I give up on Amazon.com and do a Google search. I eventually stumble upon the Firex 12000, which has such useful features as a mute button that actually mutes for longer than you hold it down, an alarm that starts out quiet, a battery that’s easy to replace, and an industrial design that looks vaguely like someone cared. It’s AC/DC so I don’t have to replace batteries every 6 months, and even communicates over the power line with other units of its type. I read prior ones have freaked out after 4–6 years, but I plan to be gone by then.

A bonus review (for a CO-only alarm). The username is a nice touch.

Australian “Engrish”

Yesterday’s Engrish was a sign which actually wasn’t Engrish at all. Unlike all the other posts on the site, however, it’s a sign I’ve seen myself—it’s in Mosman, where I’ve visited relatives many times. Small world as usual.

It was a bit weird of the submitter or site maintainers to obscure the office number (not that such things are hard to find on the Web these days) but not the mobile number on the door below, though.

Anyway, sorry for not much posting recently. I’m still very busy writing a paper, and need to prepare my DLS presentation in the coming week.

Another day, another WordPress upgrade

Running WordPress 2.0.4 now. The upgrade took longer than expected, but I’ve documented what I need to do for next time, and upgraded a couple of my plugins as well. Hopefully nothing broke.

The ICeCoffEE 1.4.3 release went pretty well—I’ve received two crash reports, and one user claimed it didn’t work for him. One of the crashes is not my fault: Safari crashed during a page load triggered by a Command-click. For the other one, I discovered that I had completely stripped the distributed binaries, which isn’t too useful for debugging:

Thread 0 Crashed:
0   com.apple.CoreFoundation       	0x90853b76 CFBundleCopyLocalizedString + 106
1   net.sabi.ICeCoffEE             	0x002e5358 APEBundleMainLateLoad + 23883
2   net.sabi.ICeCoffEE             	0x002e569b APEBundleMainLateLoad + 24718

I haven’t yet figured out how to map those addresses back to the source code, so I’ll repost 1.4.3 with symbols later this weekend. It’s now less than a week until I leave for WWDC, the pace of my research work continues to quicken and I’ve got a lot left to arrange.

Restoring backslashes in WordPress

Sorry if anyone tried the scripts I posted yesterday and found them inoperative—they were missing backslashes. I used to always verify this stuff back when I was using more finicky blogging tools, but given WordPress generally does the right thing™ I didn’t worry.

WordPress strips backslashes inside <pre> tags because quotes get escaped. I spent a while searching for the responsible regular expression substitution before finding out PHP had a function to strip backslashes. The line responsible is the second last of wpautop in wp-includes/functions-formatting.php:

$pee = preg_replace('!(</pre><pre .*?=".*?">)(.*?)</pre>!ise', " stripslashes('$1')
                    .  stripslashes(clean_pre('$2'))  . '' ", $pee);

While this eliminates the extra backslashes before quotation marks, it also removes other backslashes. Here’s a fix:

$pee = preg_replace('!(</pre><pre .*?=".*?">)(.*?)!ise', " stripslashes('$1') 
                    .  str_replace('\\\\\"', '\"', clean_pre('$2'))  . '' ", $pee);

This American Life track munger

Since This American Life has switched from streaming in RealAudio to MP3, Jon Udell and Jared Benedict have posted some unofficial podcast feeds. Unlike with my previous RealPlayer-to-Audio Hijack Pro-to-iTunes-as-AAC solution, the MP3 files aren’t bookmarkable on my 3G iPod, but they are certainly a lot more convenient to grab for later listening.

Which reminds me, since other people may find it useful—a few weeks ago, I wrote a script which operates on the selected This American Life MP3 tracks in iTunes, renames them to match my existing scheme, and moves the episode number to the track field (especially useful on older iPods where the episode number takes up half the width of the screen).

TALize.png

Download the script here. Sorry for the image; Script Debugger 3’s HTML export appears to have broken—and since I have primarily switched to appscript, I can’t justify the upgrade to version 4. The string parsing pain above should be enough to send anyone running to Python.

‹ Newer Posts  •  Older Posts ›