"So there are Oliphaunts. But no one at home will ever believe me."
Random header image... Refresh for more!

Category — computers

Troubleshooting hardware/software interaction

When you’re trying to figure out what when wrong, you have to look at all the variables, not just the obvious ones.

I rebooted my hackintosh a few days ago, and instead of booting to the Chameleon boot loader screen, it hung on the spinner. I decided to leave it to the weekend to fix. I hadn’t performed any updates to important system software so I figured it was going to be small nightmare to track down whatever minuscule change had broken the system. I had been making a back up image of the boot partition on a daily basis, but I stopped a few weeks ago when I swapped in an old hard drive that was giving me problems so that I could recover some files from it.

This morning I began the recovery process by removing that old drive and plugging the recovery image drive in. But, dang it, the recovery drive wouldn’t get past the “recovering DMI pool data” message, which means the BIOS couldn’t pass drive information to the boot loader. On a hunch I tried rebooting from the main drive again, and this time it worked with no issues. So I conclude that the old, scratch drive I had been using finally gave up the ghost and Chameleon was choking on trying to read the disk to see if it contained a bootable partition. Possibly if I had let it try long enough, it would have past the problem drive.

March 26, 2011   Comments Off

The Snipe Hunt

This morning, over espresso (how terrible war is), somebody wanted to play with my iPad (again, this war, right now: terrible) and started an impromptu game of Scrabble. We started a “pass the iPad” multiplayer game, and to my surprise the demo turned into a serious contest. Time passed, and finally somebody suggested that it would be great if we had a multiplayer computer version to play on our laptops, taking turns during little breaks throughout the day.

Surely, I offered, some enterprising programmer has created a free version of Scrabble that can be hosted on one computer and played locally with other computers on the same network. Probably, I hypothesized, this programmer had even made it possible to play through your web browser. The other two agreed that this was virtually certain to have happened.

“Well,” said one, “you should probably go back to your CHU to download whatever it is since the Internet is so slow so we can have this set up by tonight.”

“Right,” I agreed.

Six hours gone, and many vast and deep Internet searches later, I had to give up. I realized that the challenge to find this thing on the Internet had been like a perfectly aimed special munition into the very heart of my personal Death Star. A whole perfectly splendid idle Sunday used up in futile sifting through the bed of the web’s Mariana Trench.

“Well played, friend,” I admitted to my new enemy, many hours later.

Perhaps all was not lost. I have been casting about for something to work on to keep my coding skills sharp. A locally shareable game like Scrabble, with an HTML5 client, would have a pretty deep stack of the technologies I’m interested in. So I may pursue it.

Around dinner time I got a late invitation to go barbecue with our Lebanese friends. The food tonight was really, really good. I think that perhaps my culinary interest in Lebanese food has prompted our host to up his game, or it may be that improving economic conditions have made it possible for him to acquire better ingredients and equipment (for instance, tonight he had actual hard wood charcoal as opposed to briquettes). Whatever the cause, it’s great to be able to enjoy simple food, well prepared.

We were going to make peanut brittle afterwards, but everybody was stuffed, and I owed this to the blog.

Tomorrow I start teaching math class again. We learned in the last that having the class five or six times a week was likely too much, so we’re cutting back to every other day and placing more emphasis on homework.

April 25, 2010   Comments Off

Some UNIX Marbles

Some tricks I’ve used recently.

  1. Suppose you want to enable non-interactive (that is, “passwordless”) login to a remote host using ssh. This happens all the time, right? If you follow the usual steps, or the man page, there is a good chance it will fail on you without explanation. This is because ssh silently croaks when it discovers that your ~/.ssh directory is group or globally readable. To fix it, just
    chmod 700 ~/.ssh

    and you’re done. Some helpful links:

  2. File transfer (ftp, scp, http, whatever) interrupted from a known host? Resume file copy using rsync. You just supply the –progress argument point rsync to the source file. Found this tip at a defunct Danish blog. Sample usage:

    rsync --progress --rsh=ssh "joe@joesdiner.com:mydir/myfile" .

    Note that the destination is required, so to resume in the working directory use . as above. rsync will compare the two files and resume copying at the break.

  3. Setting (or spoofing) your Machine Address Code (MAC) on OS X? Use the ifconfig command, passing lladdr with your new, colon-delimited MAC. This needs to be done as root, so sudo is required. Sample usage:

    sudo ifconfig en0 lladdr 00:11:22:33:44:55

    Used on OS X 10.6 but I’m sure it works on any POSIX system. I looked this up for a friend because his, er, off-brand (Iraqi) router insisted that his MAC was invalid, so it couldn’t be entered into the MAC filter table. Odd. Found here.

April 23, 2010   Comments Off

Corrupting your Preferences

There is nothing more insidious than having your preferences corrupted. Of course I’m talking about the file that stores your configuration information from an application running in Mac OS X becoming unreadable to the computer, causing unpredictable results.

Every application stores information about itself in something known as a property list file, or plist file for short. Any well-behaved application will create it for you if it is missing. This happens, for example, the first time you run the program. If this configuration file gets corrupted—for example, if there was a crash while it was being updated—then the program may not be able to read it the next time it starts up. Rather, it may be able to read it, but only partially, yielding strange, incomplete, or undefined options controlling the behavior of your application.

This happened to me recently when iChat refused to start up with the video camera enabled. It would tell me that the computer did not support video conferencing. However, it was able to turn the indicator light for the camera on, and all other programs using the camera worked fine. A bit of Google searching revealed that iChat is particularly susceptible to having its plist file corrupted in a way that has this effect.

Even if you don’t have a reason to suspect the preferences file, it is not a bad troubleshooting technique, when you are up against the wall and everything else has failed. So it’s a good technique to remember.

Most plists will live somewhere in your Home folder’s Library. In my case, I found the .plist for iChat in Home/Library/Preferences. It’s name was com.apple.ichat.plist. Quitting iChat, deleting the file, and restarting iChat solved the problem.

February 25, 2010   Comments Off

Creating custom subclasses for MyDocument

I learned two things while playing around with Cocoa.

Firstly, in order to change the default MyDocument subclass of NSDocument to something else, say FooDocument, it is not enough to change the class references. Of course the whole application is tied into Interface Builder’s .xib files by magic, so you have to tell MyDocument.xib’s File’s Owner that its new class type is FooDocument. That wasn’t too hard to figure out. However if you do that you’ll get a cryptic error:

The DocumentType type doesn't map to any NSDocumentClass

This is because the class name of the document is part of the application’s configuration file. In other words you have to update your InfoPlist.

The second thing I figured out is that (NSString *)windowNibName isn’t just for looks. I foolishly changed the return value thinking it would programmatically set the name of the document window. No. The application framework sends this message to the NSDocument instance you have configured for your application (see above) to figure out the name of the .xib (or .nib) file it needs to wake up to display your document. Which is nifty, but one of those mysterious interactions that makes Cocoa hard to learn but easy to use.

Is there a flow chart to model the interaction of the run time and .nibs?

February 17, 2010   Comments Off

Canon VIXIA HFS-100 fumble test

So, I just got this new toy. The following video was shot after ripping the camera out of the box and fumbling with it to figure out how to turn it on, set it to high quality, zoom and focus. Hence it is nothing more than the fumble test. Here is a sample of what you get with the “raw” AVHDC conversion to Apple Intermediate codec, and another sample of what you get when you use iMovie 09′s Share > Export Movie… > HD option (720p).

The links below should pop a QuickTime player for you. Both are large files at high resolutions. Cuts are about 16 seconds each (I didn’t bother trying to make them exactly the same but the overlap is considerable).

Apple Intermediate, 1920×1080 pixels, 214 MB

iMovie HD Export, 1280×720 pixels, 24 MB

Light in the room was above average (very sunny out, large windows on three sides, high ceiling).

By the way, I really like the camera. I’m already wondering if I should get the extra battery and charge, and a wide angle lens. Still, too bad about that viewfinder, Canon.

July 17, 2009   Comments Off

Brain transplant

iTunes. A great program that leaves your life in a mess if you share a household with another music lover and iTunes consumer. I’ve always manually managed keeping my library and my wife’s library more or less in sync, without excessive duplication (thanks to symlinks). It’s a lot of work though, and the result is a library spread across several hard drives, no consistency, and no process that my wife can understand or duplicate (“How do I get the songs in your library into mine again?” Sorry Apple, but any answer that begins with “First mount the network drive in your account…” isn’t going to cut it).

I had hopes for AppleTV coming to the rescue, but the truth is, Apple does not rescue problems that affect only 1% of users, their rationale for the recent switch from ExpressCard slots to SD card slots. I feel sorry for the 15″ MacBook Pro users that just got hosed by Apple. The right solution was to include an SD card adapter already installed. Or to add a second port.

Anyway, tonight I am upgrading my wife’s laptop and my laptop with 500 GB hard drives. The only way I can make a solution that works for her is to consolidate everything in her library, and mine. I’m going away for a year, so the libraries will fork during that time, and then I get to reconsolidate them. Good times.

Apple, fix iTunes. It cries out for a client-server database-driven solution.

July 13, 2009   Comments Off

Walking WMD

Thanks to my job I am now “walking WMD” as @tefft puts it. Smallpox, anthrax and a hepatitis cocktail.

Standing in line all day thanks to my decision to revisit every aspect of my will, insurance and powers of attorney, I came to the firm decision to buy some sort of e-reader. I was previously merely strongly inclined. I’ve pretty much ruled out the Kindle, because of the DRM, lack of support for other formats without crazy service-based conversion, clunky design and general antipathy for the company.

I was fortunate enough to have Napolean’s Pyramids with me to read. It’s not great but easy enough to read in a loud room while standing in line for eight hours.

June 3, 2009   Comments Off