Thursday, June 25, 2009

one blind mouse


My old bluetooth mouse, a Logitech which I really loved, recently developed a problem which caused it to skip erratically. Needless to say this served to annoy me greatly. I finally got fed up with the problem and being a bit reluctant to get another mouse which might fail prematurely, purchased a Microsoft Notebook Mouse 5000 (see image above) instead.

The new mouse is smaller than the Logitech which means it doesn't fit my hand quite as well as the Logitech did. On the plus side, at 1000 dpi the tracking is incredibly precise. That's a nice change from the way the old mouse had behaved recently. I'm pretty sure that's much better tracking resolution than the old mouse had when it was new.

One thing I don't care for is the scroll wheel which moves in a jerky fashion. I guess it's designed to keep you from scrolling too quickly and going past whatever you're trying to find. I prefer the smoother scroll wheels which Logitech mice typically have.

The manual estimates the battery life at 3 months on two AAA batteries. If it really lasts that long, that will be slightly better than the old mouse. I've got to get more rechargeable AAA batteries now.

All in all, I think I like this mouse. The fact that it was cheaper than replacing the old one with another Logitech would have cost me more is a nice bonus too.

Tuesday, June 09, 2009

Less than perfect

In case anyone thinks I'm one of the Apple fanboys oblivious to their shortcomings, I'll disclose my top pet peeve about Macs. Their default HFS file system is case insensitive. This can cause problems for software engineers like me as some engineers use the file extension .C for C++ source code (I prefer .cpp myself) and .c for C source code. It's not out of the question to want to have source files with identical base names and with file extensions which would be identical aside from their case within the same directory. In a development environment with both Linux and Mac systems available, this can cause Macs to fail to be able to check out source directories with these potentially duplicate filenames.

With the last few versions of OS X version 10.5, there has been an option to format disks with a case sensitive version of HFS. This should not be undertaken lightly. I've read accounts that this can cause problems for older programs (backup programs seem particularly vulnerable for some reason).

I've taken the approach that the devil you know is preferable to the devil you don't. I know how to avoid difficulties on a case sensitive file system. I'm not sure I can find workarounds for some of my older software were I to make the switch to case sensitive HFS.

Friday, June 05, 2009

Happy 40th birthday to my favorite OS

Unix celebrates its 40th anniversary this summer. This article from ComputerWorld recounts the history of the world's most productive OS.

Not a week goes by that I'm not somehow reminded of just how powerful Unix is. Treating all devices as files was brilliant. Being able to combine command line utilities via I/O redirection gives an amazing amount of power and flexibility to the Unix/Linux user interface.

It's no wonder the first thing I do whenever presented with a stock Windows PC is to download the Cygwin utilities. I still can't see how anyone can get any work done using only the built-in Windows commands.

Monday, May 04, 2009

XnView proves handy

One complaint my wife had was after the data restoration I spent much of the weekend on, all of her photos ended up with yesterday's date. This causes her problems locating photos because while she can typically remember the approximate date when she took a picture, she always can't recall for certain what she named the directory. Recently she's taken to my simple approach of prefacing the directory name with a date. I use a date of the form YYYYMMDD (year, month, day) which causes the directories to sort nicely.

I remembered JPG files contained metadata fields which stored useful information like landscape or portrait orientation (for cameras which have appropriate sensors), GPS data (for cameras with a GPS installed), photo settings, and the date the photo was taken. There's even a standard for how these metadata fields are recorded called EXIF.

A bit of searching turned up some software called XnView which allows one to perform a number of date related functions including the following:

- changing the create and/or modified file time stamps based on the date from the EXIF fields (very useful in this case)
- changing the EXIF time stamps based on the current file time stamp (useful when the camera's date was not set when the photo was taken)

As you might imagine, I was very happy to discover I didn't have to cobble together a solution on my own. While I enjoy writing the odd bash or Python script, doing so unnecessarily didn't strike me as much fun.

Windows data recovery

Last night while poking about the web in my typical pseudorandom fashion, I found a new tool which may help prepare for the next time Windows decides not to boot. TestDisk is a tool designed to run under multiple OSes which can perform lots of handy data recovery functions including repairing and restoring an NTFS boot sector.

It turns out it's already available on the System Rescue CD I've been using. I just needed to poke around a bit more.

I'll be making backups of the MBR and boot record since I don't expect this to be the last time that Windows goes belly up. *sigh*

Sunday, May 03, 2009

Windows strikes again

Despite the fact I made the switch to a Mac about 6 years ago, Windows still manages to be a thorn in my side from time to time. Yesterday morning my wife discovered that her XP laptop which had been working Friday night had decided not to boot. What was even more entertaining was it decided to display a completely blank screen so there was no clue what was causing the boot to fail. What's even more disturbing is this is the second time I've seen these same symptoms.

I poked around a bit after booting the system under Linux using a System Rescue CD. That allowed me to see which files had been added or modified since the last full backup a month ago. To do so, I had to issue a few Linux commands.

Here's the command to mount the Windows NTFS file system on the /mnt/windows mount point.

ntfs-3g /dev/sda1 /mnt/windows

Here's the commands to mount an external USB disk containing a Windows FAT32 file system on the /mnt/usbdisk mount point. Note that you have to create the mount point first. Also note that the device name of the USB drive may be different than /dev/sdb1. You can figure this out by issuing the command "ls -l /dev/sd*" before and after connecting the USB disk. The device name which appears after connecting the disk will be the correct one.

mkdir /mnt/usbdisk
mount -t vfat /dev/sdb1 /mnt/usbdisk

Here's the command to show you the files which have a later modification date than the last backup. This will give us an idea of what files need to be backed up before we perform any potentially destructive operations to the old disk.

find /mnt/windows -newer /mnt/usbdisk/backup -print

Once I did this, I had a quick look at the partition table/MBR to see if that might be the cause of the failure to boot. That required dumping sector 0 via a program which can display binary data in hexadecimal form. The xxd command will display hexadecimal equivalents for binary data and we can use the dd command to copy the first sector to xxd. Here's the command I used.

dd if=/dev/sda1 count=1 | xxd

A cursory glance indicated the partition table looked okay. It ended with the required 0xaa55 (since PCs are little endian this appears as 0x55aa when viewed as bytes).

I verified the rest of the files involved in the early portion of the XP boot process appeared to be present and had a reasonable size and time stamp. All appeared fine.

Now I was almost ready to try to fix the problem. Since this involved issuing some potentially destructive commands, I booted from the Acronis True Image CD to create a new "since save" backup of the data which had changed since the last full backup.

First I tried booting into the XP Recovery Console to issue the fixmbr command. Sadly, that didn't fix the problem. It did issue some stern looking warnings about the drive having a nonstandard partition table. Since I had used Windows to set up the disk, I found this very irritating. Why would Windows use a partitioning scheme which it would later declare to be nonstandard, especially when the default method is chosen? By this point, there aren't many of Windows' quirks which surprise me. They do make me all the happier that I deal mostly with MacOS and Linux these days.

I also tried an XP Repair Installation. Strangely enough that didn't change the boot failure symptoms at all.

What finally fixed the problem? Doing a full restore with Acronis True Image followed by a restore of the Acronis "since save" data. I may be completely disillusioned with Windows but Acronis makes a very nice product. I don't think I'd consider running Windows without it.

Monday, April 20, 2009

Apple makes switching phones incredibly easy

One of the things I've always dreaded about switching phones the laborious process of entering the phone numbers of friends and family members. I've got all those in my Mac Address Book so why can't I sync it straight to my phone? I've gotten used to doing so with my Palm Centro but wasn't sure it was easily accomplished using my old Razr.

Apple comes to the rescue again. It turns out they've included enough intelligence in their Bluetooth software that I can choose groups of contacts from my Address Book to sync.

But wait, there's more. I was also able to add my favorite wallpaper image to the old phone by using Apple's Bluetooth browsing feature. In the future, I'll be able to transfer photos taken with my cell phone via Bluetooth instead of being charged a fee for using the phone's data connection.

The procedure for accomplishing this was pretty easy to figure out... after all, it is an Apple. But here's the procedure spelled out if you don't feel like noodling it out yourself.

I did a little work with Google but I didn't see a similar procedure available for Windows. That doesn't mean it doesn't exist but if it does, it must not be quite so obvious as Apple's.