Exporting AddressBook birthdays to Remind

I always thought I was a bit of an oddball for choosing the ancient scheduler Remind as my favorite OS X calendar software. But as it turns out, I’m not quite as alone as I had assumed. I guess OS X is a bigger draw to Unix geeks than I realized.

So I’ve decided to publish a tool that I wrote a few months back, a simple little Objective-C command line application that reads the birthdays of all your OS X AddressBook contacts and outputs them in .reminders format.

The source code bundle is here. After installation, see the manpage remind_birthdays(1) for documentation.

You can also view the source code repository on Github.

halfdim

It seems to be a commonly experienced problem with the Intel rendition of OS X 10.4 that some power management settings, such as the halfdim pmset parameter (a.k.a., “automatically reduce the brightness of the display before display sleep”) may be reset when the system boots. Since I started dual-booting Vista my reboots have increased from about once a week to a few times a day, so I decided to tackle this annoying little bug with a StartupItem.

Here’s how to do it. First, make a directory named PMSetManager in /Library/StartupItems. Create two files in this new directory, StartupParameters.plist and PMSetManager, with the specified contents.

/Library/StartupItems/PMSetManager/StartupParameters.plist:

{
Description = "PMSetManager";
OrderPreference = "Late";
Provides = ("PMSetManager");
Message =
{
start = "Starting pmset manager";
stop = "Stopping pmset manager";
};
}

/Library/StartupItems/PMSetManager/PMSetManager:

#!/bin/sh
# pmset manager
#
# Resets the 'halfdim' pmset parameter to false
# on reboot, in order to counteract what appears
# to be a bug on OS X 10.4.
. /etc/rc.common
StartService ()
{
if [ "${PMSETMANAGER:=-NO-}" = "-YES-" ]
then
ConsoleMessage "Starting pmset manager"
pmset -a halfdim 0
fi
}
StopService ()
{
ConsoleMessage "Stopping pmset manager"
}
RestartService ()
{
StopService
StartService
}
RunService "$1"

(The pmset command in this script can do more than just disable display dimming, if you like. See `man 1 pmset` for all your options.)

Next, make the PMSetManager script executable:

$ sudo chmod +x /Library/StartupItems/PMSetManager/PMSetManager

And finally, append “PMSETMANAGER=-YES-” to /etc/hostconfig in order to enable your new StartupItem. Now congratulate yourself for no longer needing to run System Preferences to get rid of that pesky dimming option every time you log in, and you’re good to go.

Vista

The University’s software licensing program proudly furnishes UF engineering students with Microsoft’s latest-and-greatest (with the notable exception of cash cow Microsoft Office). As of Wednesday, latest-and-greatest meant Windows Vista Business Edition*, so I decided to download it and, with the help of Boot Camp, give it a run on my iMac. Here are my notes and impressions, in no particular order:

  • It’s faster than I expected. It takes almost twice as long as OS X to boot, but programs (subjectively) seem to start more quickly.
  • The new user interface is nice. I still prefer Exposé to Flip3D, but things such as real-time previews of taskbar items and a hardware-accelerated UI make this the first version of Windows that I actually feel comfortable while using.
  • User Account Control is a mess. Some operations, such as touching a file in C:\Program Files\, require you to confirm your intent twice – once for UAC, and once again for what appears to be some manifestation of Windows Security Center. Talk about the left hand not knowing what the right is doing.
  • AutoPlay finally asks for your confirmation before automatically executing whatever program or virus might be on that CD you just stuck in your computer. A small touch, but this one’s been a long time coming.
  • Data Execution Prevention (NX bit support) is enabled by default for the operating system, and optionally for the rest of your programs as well. This didn’t seem to cause any problems with the relatively small set of software that I’ve installed so far. Apple needs to bring this feature to OS X as soon as possible.
  • The whole system seems quite a bit less naggy than XP was about activating your OS and so on. Granted, “less naggy than XP” might not be saying much, but it goes a long way to improve the overall user experience.
  • It isn’t entirely stable. The whole system locked up on me three times while I attempted to install (the admittedly not-entirely-Vista-ready, but-whose-fault-is-that) Microsoft Visual Studio 2005. That shouldn’t happen.

Aside from DRM issues, Vista really is a solid improvement over XP. In particular (and I’ll probably get burned at the stake for saying this), Vista is interesting because it may represent the first time in PC history that Microsoft Windows is, on paper but probably not in practice, on par with or better than the most prominent “alternative” desktop operating systems in terms of security against remote attack. I would really like to see OS X pick up heap-side support for the NX bit to complement the protection already in place against stack overrun attacks, and both OS X and the most popular Linux distributions integrate an analogue to Vista’s OpenBSD-inspired address space layout randomization.

However, despite the extended Beta stage Windows Vista still doesn’t have the feel of a finished product. Things like the quirkiness of UAC and possible stability issues (not to mention the lack of an entirely Vista-ready version of Visual Studio) make me recommend that anyone who relies on Windows as a primary operating system hold back from upgrading just yet, at least until the first service pack rolls around the corner. As history shows, one can never be too cautious with a first-iteration Microsoft product.

*Too bad they couldn’t spring for Microsoft Windows Vista Ultimate Upgrade Limited Numbered Signature Edition. Yes, it’s real.

Bill Amend is my hero

Thank you, Mr. Amend, for giving the dangers of electronic voting machines some much-needed press. The more people who are informed about such a frightening threat to our democratic process, the better.

In an attempt to convince a complacently skeptical public of just how much a problem that direct-recording electronic voting machines pose, Jon Stokes of Ars Technica has written a guide, How to steal an election by hacking the vote, which illustrates just how easy it is to hijack an election conducted entirely over electronic media.

If nothing else, watch this video by the security researchers at Princeton University’s Center for IT Policy, wherein researchers demonstrate how to load a malicious payload onto a Diebold voting machine in under one minute. Come election day, this payload, a computer virus which spreads to other machines through normal memory card exchange, silently skews the vote toward its preferred candidate; these alterations are made untraceable by the fact that these voting machines provide users with no voter-verifiable paper trail. Such a virus could even delete itself once the election has concluded, leaving behind no evidence within the machine itself.

In concluding his article, Mr. Stokes sums up the problem nicely:

  • Bits and bytes are made to be manipulated; by turning votes into bits and bytes, we’ve made them orders of magnitude easier to manipulate during and after an election.
  • By rushing to merge our nation’s election infrastructure with our computing infrastructure, we have prematurely brought the fairly old and well-understood field of election security under the rubric of the new, rapidly evolving field of information security.
  • In order to have confidence in the results of a paperless DRE-based election, you must first have confidence in the personnel and security practices at these institutions: the board of elections, the DRE vendor, and third-party software vendor whose product is used on the DRE.
  • In the absence of the ability to conduct a meaningful audit, there is no discernable difference between DRE malfunction and deliberate tampering (either for the purpose of disenfranchisement or altering the vote record).

Although researchers have been warning us of the dangers of direct electronic voting for a long time, by now it is too late to change this state of affairs before next month’s elections. However, afterwards - if you are as troubled as I am about these challenges to the transparency and verifiability of our democratic process - contact your congresscritters and tell them to support voter-verified paper record legislation.

Apple battery recall

Probably to help ensure that this doesn’t happen to anyone else, Apple has decided to recall more than a million batteries shipped with its G4 iBook and PowerBook computers from October 2003 through 2006:

powerbookexplode_01.jpg

More information can be found on the Apple web site. On the positive side of this, at least I’m getting a fresh new battery for my two-year-old laptop…

A clean ABS speed sensor…

The ABS warning indicator in my Integra started lighting up this week. Following the directions on this forum, I got the car to tell me that there seemed to be a problem with the rear, passenger-side ABS speed sensor.

In most ABS-equipped cars, there is a magnetic induction speed sensor at each wheel which allows the antilock controller to determine when a tire begins to slip under heavy braking. But because these sensors contain magnets and are relatively exposed, they often collect metal brake filings and other junk that can obstruct their operation. So, aside from interference due to Desiree’s magnificent aura (long story), the most likely explanation for my ABS troubles seemed to be that the sensor was just dirty.

For any other Integra owners out there, here’s a brief explanation of how to remove, inspect, and clean your rear ABS sensors. It’s a pretty straightforward process, and all you will need are:

  • a 10mm ratchet with short extension,
  • a rag or paper towel, and
  • a jack stand.

Begin by raising your car onto the jack stand. Remove the wheel in question. On the front side of the hub, just behind the rotor, you’ll see a small, rectangular metal shield with three bolts in it. Unscrew the bolts and pull off the shield. You will now be able to see the sensor itself:

sensor-mounted.jpg

Next, remove the two bolts directly holding the sensor in place, as well as the two bolts that attach the sensor cable to the car’s suspension. The sensor should come out easily.

sensor.jpg

Now wipe off any excess dirt and grime, then put it all back together. My car hasn’t complained any more since I cleaned this sensor, and I couldn’t see any obvious damage to either it or the cable, so hopefully I won’t find myself spending $70 for a replacement somewhere down the road…

Pagination