Jun 2007: all entries
   Review: Canon PowerShot SD1000
   Category-specific RSS feeds
   Game console stats for May 2007
   Do you want karate?
   Disjunctive type bounds on catch clauses
   How much ram will OS X support?
   vCard Export utility
   Sound Switcher, part 2
   Sound Switcher, part 1
   Who is this?
   WordPress site hacked, easy fix
   One-click sync using iSync
   Making a Nokia 6133 work with iSync

Click to enlarge

I just wrote a review of the Canon PowerShot SD1000 7.1MP on Amazon.com. I'm quite unhappy with the camera, and want to get this info out.

Here's the Reviews page at Amazon: Reviews for Canon PowerShot SD1000 7.1MP Digital Elph Camera

And here is my review:

I recently bought this camera as a replacement for an older 2.1mp Canon PowerShot S100. I own a great digital SLR, but my wife and I like to have a simple point shoot for short trips, easy carrying, etc. My older Canon was fine, this new SD1000 is not. I'm going to give it another few days (max), but I'm quite close to returning it.

Why? The *one thing* this camera is supposed to do well is take photos in automatic mode. I don't want to mess with camera settings - for that, I take my SLR and fiddle to my heart's content. With a point shoot, you're supposed to do just that: point and shoot.

The basic problem I've observed (after ~500 photos) is the auto-focus is *terrible*. I tried different lighting scenarios: indoor (flash), indoor (no flash), outdoor (daylight flash), outdoor (daylight, no flash). The results were the same: approximately half of the photos turned out poorly, and almost always it was due to the autofocus.

For example, I took a photo of a subject positioned directly in front of the camera, directly in the middle of the viewfinder, about 3 feet away. The subject took up approximately 40% of the view, and again, was positioned directly in front of the camera. Instead of doing what you think autofocus would do, the camera somehow decided to focus on the background scene, completely blurring the foreground. If I checked the photo on the camera, it looked fine but that's only because you cannot perceive focus problems on a 2" lcd screen. Once I transferred the photo to my computer, it was immediately evident that the focus was completely wrong and the photo was unusable.

This autofocus blurring happened repeatedly, in varying light conditions, and is flat out terrible. I still have my Canon S100, and despite being an older, slower, and much lower resolution camera (2.1 vs. 7.1 megapixels), I'm tempted to keep using it instead.

The Wii is still dominating the market, which isn't too suprising news since most people I know either want (or hopefully already have) a Wii. The other consoles just aren't that interesting. On the other side of it, the PlayStation 3 is trailing everyone, even the PlayStation 2 - their own console from 2000. Yikes. More info here.

console# sold in May 2007
Nintendo Wii 338,000
PlayStation 2 188,000
Xbox 360 155,000
PlayStation 3 82,000

Brian Goetz recently posted about exception handling in Java (Remove checked exceptions?), and offered an excellent suggestion for eliminating duplicate code when catching multiple exception types. His idea is to allow disjunctive type bounds on catch clauses, so you could do something like this:

public void addInstance(String className) {
    try {
        Class clazz = Class.forName(className);
        objectSet.add(clazz.newInstance());
    }
   catch (IllegalAccessException | InstantiationException | ClassNotFoundException  e) {
        logger.log("Exception in addInstance", e);
    }
}

Not only is it prettier, it would also make code easier to read and maintain.

I just stumbled upon something rather amusing. I don't know if it's an indication of some not-too-far-off reality or what, but the OS X system info strings are... absurd. There are formatting rules for how to display RAM quantities in megabytes, gigabytes, terabytes, petabytes, and exabytes.

Quick recap:
1,024 megabytes = 1 gigabyte
1,024 gigabytes = 1 terabyte
1,024 terabytes = 1 petabyte
1,024 petabytes = 1 exabyte

Said differently...
1 terabyte = one thousand gigabytes
1 petabyte = one million gigabytes
1 exabyte = one billion gigabytes

I know technology changes quickly, but it seems beyond ridiculous to think that commodity hardware could be anywhere near approaching exabyte (or even petabyte) memory support.

On OS X 10.4.x, see /System/Library/CoreServices/Resources/English.lproj/AppleSystemInfo.strings, which contains the following:


"RAMInMB" = "%d MB";
"RAMInGB" = "%.*f GB";
"RAMInTB" = "%.*f TB";
"RAMInPB" = "%.*f PB";
"RAMInEB" = "%.*f EB";

vCard Export utility
more from apple
Jun 8, 07

I wrote a utility a few years ago to export the contents of my Address Book as a single vCard file.

Why? I wanted to retain Notes on each contact, and the Address Book Group info, too.

For example, I might have a contact in a group called "Friends", but normal vCard export loses that info. My utility keeps it, and also woks correctly for contacts that appear in multiple groups.

Anyway, I decided I should post it online in case anyone else needs / wants something like this.

No bling.

Pure function.

Check it out: vCard Export

Sound Switcher, part 2
more from apple
Jun 8, 07

I worked on Sound Switcher a little bit last night, probably 50% finished with the widget stuff. I also fixed the bug with setting the output device.

Earlier today, I got my first feature request: modify Sound Switcher to support both input and output audio devices. My initial motivation was to build support for output devices only, because that's a pain point for me, but a friend needs this tool for switching input devices, too.

In light of the feature request, I made some changes to the Objective-C code to support more generalized audio device stuff.

Now it can:

  • list all sound input devices
  • list all sound output devices
  • show current sound input device
  • show current sound output device
  • change sound input device
  • change sound output device

I'm not sure if I want to build one meta-widget that lets you select input+output audio devices, or break it into two separate widgets. Both will use the switcher app underneath to read/write device changes.

Sound Switcher, part 1
more from apple
Jun 7, 07

I spent about 5 hours tonight working on phase 1 of "Sound Switcher", a new widget I'm building to quickly switch sound input devices. The widgety part is going to be pretty straightforward (that's next on the list).

The hard stuff is what I worked on tonight: writing a tiny app in Objective-C that talks to CoreAudio. It does three things:

  • list all sound output devices
  • show current sound output device
  • change sound output device (this one doesn't quite work yet...)

In the end, it's not all that complicated, but it was a bit rough getting started. The doc+examples aren't as useful as you'd like.

Who is this?
more from blah
Jun 6, 07

This doctor lady keeps showing up in my junk mail folder, enough times that I'm starting to get curious about who she is.

Does she know her face is delivered along with millions of spam messages every day?

Does she care?

And most importantly, is she really a doctor?

We may never know.

I run a site using WordPress, and it was recently hijacked by spammers. The result was the page content was deleted and it showed their garbage instead.

After doing some digging around, I discovered that numerous verions of WordPress have had serious security problems. Sadly, this is nothing new.

Note to self: never use WordPress again.
Excellent alternatives: MovableType or Nucleus.

So after much digging + reading, the official "fix" basically amounts to backing everything up, including database content, then installing a new version, then testing stuff, then possibly having to roll it all back if things don't work right.

Freaking waste of time. I don't want to do all of that, I want a damn patch so I can do other stuff and quit screwing around with WordPress!

So here's my quick, easy fix:

Rename your "wp-admin" directory to something else (like "wp-admin-hidden"). Do this through ftp or ssh.

Bad: your admin interface is now completely unusable.

Good: spammer jerks can't screw with your site content, it only took you 5 seconds to make this change, and it's completely reversible in another 5 seconds.

When you need to make content changes, just rename that directory back to "wp-admin", make your content changes, then name it "wp-admin-hidden" again.

Presto.

Your next task is to migrate your content out of WordPress into something un-shitty, like MovableType...

One-click sync using iSync
more from apple
Jun 4, 07

Here's a shortcut solution to synchronize your phone (or whatever) with your Mac using iSync. It assumes you're already setup for manual sync, such that you would do the following:

  1. launch iSync
  2. click "Sync Devices" button
  3. wait for sync to finish
  4. quit iSync

To make this a one-step process, open "Script Editor" (Applications > AppleScript > Script Editor), then paste the following:

tell application "iSync"
    synchronize
    repeat while syncing
        delay 1
    end repeat
    quit
end tell

Save the new AppleScript somewhere, and name it something descriptive like "Sync my phone". Also, be sure to choose "File Format" of "application", disable "Startup Screen", and disable "Stay Open".

When you're done, you can do a full sync by clicking your AppleScript application, and then it will clean itself up and let you continue doing whatever you were doing before.

Note: If the steps on this page don't work for you, check out the alternate method of 6133+iSync setup.

I just set up a Nokia 6133 to sync with my Mac over Bluetooth, and the one secret missing ingredient is this file: NOK6133.phoneplugin.zip. Without it, iSync will not allow you to add your phone as a device (and thus, you won't be able to sync the phone with your Mac). I tried this on two different Mac laptops (PowerBook G4, MacBook Pro), and both computers could see the phone, but wouldn't let me add it as a device.

Here's what you need to do to get things working:

  1. quit iSync
  2. create a new directory named "Phones" in your "Library" folder (so you end up with "~/Library/Phones")
  3. download NOK6133.phoneplugin.zip to your computer, double-click to unzip it
  4. copy "Nokia 6133.phone" to "Library/Phones"
  5. restart iSync
  6. try the "Add Device" stuff through iSync, everything should work this time

I didn't spend more than a few minutes digging around and setting this stuff up, and the results are great.