Finishing a messy filesystem merge with DeltaWalker

Almost six months ago, I managed to create a big mess 0n my outboard media drive with iTunes, when, while trying to consolidate all my music onto a new 1TB drive, I managed only a partial move and ended up with files strewn across the old drive and two different directory trees on the new drive. I’ve spent the time since in a lot of manual moving of files, since the Mac does not support merging two different directories with the same name.

I was able to clear up the top level confusion easily enough by doing a diff on directory listings from the top level directories, but that still left issues with subdirectories that had the same names but different contents. I thought I’d be doing the project forever. I tried a couple different tools to help. Path Finder was the nicest UI that I worked with, but it still only supported manual comparison and synchronization of the two directory trees.

I finally broke down and looked harder, and found an amazing tool, DeltaWalker, that seems as though it were designed for exactly the nightmare I faced. Point it at a pair of directories and it will highlight all the differences between them–missing subdirectories on one side or the other, or subdirectories whose contents are different in the two different locations. You can filter the output, too, so that you only have to see the differences that you care about (I didn’t need to know how many folders were in my target directory and not my source). And when you find files that have to come over, it’s a button click to make the move.

Once I found DeltaWalker, it took only about an hour to finish cleaning up the mess that I had started over six months before. It’s an awesome tool, and one I can’t believe I had never seen before.

New MacBook Pro time

I suppose it was inevitable. My last MacBook Pro was Apple’s first, the 1.83 GHz 15″ model that was the first to bear the name back in 2006. That was one in a series of upgrades that saw me getting a new machine every few years, thanks to a series of good product launches by Apple and a series of appalling product failures (power supply failures on the G3, the stuck hinge on the G4…) As I noted back then, the first generation MacBook Pro had case damage that rendered the battery unchargeable.

What happened afterwards was the trackpad button started sticking. And suddenly every time I tried to select text or files, the mouse got stuck in drag mode. It finally got to the point, yesterday, where I couldn’t even type. And Lisa said, “It’s time for a new laptop.”

It was time. Four years and four months, the longest time between machine refreshes that I’ve ever had since the year 2000. A testament as much to our financial priorities as to the quality of the machine.

And now, the new MacBook Pro is here. Most everything has been migrated to the new machine, a 13″ Pro model, which has, for the record, 4 GB of RAM, a 250 GB hard disk, and a 2.4 GHz Core 2 Duo processor. Twice the RAM, thrice the hard disk, and about 32% more CPU clock cycles doesn’t seem like it should make the computer a lot faster, but it does, oh it does.

And I am absolutely in love with the small form factor. The screen has about the same pixel dimensions as my old one but in a smaller form factor, and it’s a nice lightweight machine, rock solid, with a million nice features. We should have done this a lot sooner.

Upgrade day: iOS 4.0 (with iTunes 9.2), WordPress 3.0

For reasons best known to my shrink (maybe I wasn’t exposed to enough risk as a child?), I decided to tackle two major upgrades yesterday. Of course iOS 4.0 was released yesterday, so I had to get multi-tasking working; but WordPress 3.0 was also released last Thursday and I figured it was time to check that out. In the process of doing the iOS upgrade, there was also an incidental iTunes upgrade. Of the three, guess which one was the most problematic?

WordPress 3.0 went absolutely smoothly in manual install mode. I haven’t been able to use auto updates because my FTP user does not have the WordPress directory as its home directory, but manual installs have generally worked well for me. I reviewed the sample wp_config.php file, updated a few parameters that had been added in the recent past, then copied all the other files over. A db upgrade later and everything was up and running. The downer of WP 3.0 is that most of the features are available through new theme capabilities, and the author of my theme appears to have left WP theme development in favor of the preacher’s life. Best of luck, Armen, and if you ever revive the Excel theme let me know. In the meantime, it looks like I have to learn how to hack themes to take advantage of flexible menus and some of the other new features.

Now iOS and iTunes 9.2 is another story. I hadn’t remembered to do the 9.2 update over the weekend, so I was prompted partway into the iOS 4.0 installation. I had to step back and do that install first, then restart iTunes. And of course, somehow, iTunes lost my music directory location again (I keep all my iTunes files on a NAS since I have much more music than will fit on my MacBook Pro’s HD). I don’t know why it decided that I had my library back in the default location, but it did, and it spent a half hour rebuilding my library file only to lose all the file locations. I had to change the location and rebuild again, and only then was I able to do the sync. In spite of the multiple rebuilds, iTunes was still confused about the location of some files, and it took another restart of iTunes to fix the problem.

By comparison the iOS 4.0 upgrade was a piece of cake. Everything about the phone seems snappier now. Multitasking and folders work as advertised; I like the new iBooks reader (though it’s much slower on initial start than the Kindle App or Classics); and it was a kick to see a photo of my daughter (my normal wallpaper) behind all the home screen icons.

But there was one big glitch. For some reason, name server resolution stopped working through my VPN. The VPN was working, and I was able to find my Exchange server and other resources by IP address, but there were definitely some frustrating moments this morning as I tried to get everything working. I really hope that that was a transient glitch, or this new OS is not going to work out too well for me.

Moving iTunes libraries from one hard drive to another

For the love of me, I don’t know how I ended up here again. The last time I moved my iTunes library to a bigger disk, I was able to use the Consolidate Library command and let iTunes do all the file moves. This time… not so much.

I was trying to do two things at once with this move: put all my music onto a larger external drive (a 1TB MiniStack from OtherWorld Computing. Can’t recommend the enclosure enough for form factor, ports, and reliability; my older 500 MB drive is in the same enclosure), and move to the new iTunes library layout, where there are separate top level folders for music, movies, podcasts, etc. This didn’t work, because partway through the process writing to the disk errored out. I quickly realized that the problem was that I was doing it over the network (the new 1TB drive and my older drive were both connected to my AirPort Extreme). So I directly connected the new drive via FireWire, left the old one on the AirPort, and tried to consolidate again. Only this time, it told me I didn’t have enough disk space. On the new 1TB drive.

What?

Then I realized what was going on. The restructuring of the library wasn’t moving files, it was creating another copy of the files on the same drive. I had started consolidating before I did the library restructuring, so now it was trying to write a second copy of all my music on the drive. Since I probably have about 515 GB of music to work with (some resident on my MacBook Pro’s internal drive), two copies weren’t going to fit on the new drive.

So now I had: a full copy of my library spread across the old drive and my hard drive; one partial copy at the root of my new drive; and another partial copy in the proper location in a Music subdirectory. I didn’t want to delete either of the partial copies because songs in my library were mapped to both locations; I couldn’t reconsolidate on the old drive for lack of space. But I still had over 160 GB free on the new drive, so I could probably copy over the missing files by hand.

So I’m going the manual route to clean up. First, I went to the Terminal and ran the comm command, which compares two text files line by line; I fed it the directory listings of the old external drive and the new final destination, and it spit out about 165 differences, directories that didn’t get copied from the old drive to the new one.

Second, I’m going line by line through the results of the comm listing. For each line, I:

  1. Copy the missing files from the old drive to the new one.
  2. Delete the old files from the old drive.
  3. Go to the matching tracks in iTunes and do a Get Info. Amazingly, since I’m copying the new files into the correct directory structure, a lot of the time I don’t have to do any more work and the library automatically finds the files in the new drive. Sometimes I have to browse one file at a time to link up to the new files, which is a drag.

I expect I’ll be done with the process sometime next week. Painful, but at least no data is lost. Then I can repeat with any files from my laptop’s disk, a much shorter list.

The final cleanup may take some XSLT fu. I will need to triple check the final library to make sure no tracks point to locations on the old drives. I’m going to try using XSLT on the iTunes Library.xml file to see if I can cull out the problem tracks that way; if not, it’ll be a matter of trial and error, because there’s no convenient way to find the file system locations of iTunes tracks from within iTunes itself, other than one at a time.

I’d love to have this be  a more error-free process. I’m beginning to think that iTunes libraries on external drives simply isn’t a well tested scenario by Apple.

Apple iPad: first reactions

Four reactions that I agree with (parts of) in response to Apple’s iPad announcement yesterday:

  • Doc Searls places the iPad in the context of vertical integration (apps all the way down to CPUs) and horizontal playing fields and says, “What you have to appreciate, even admire, is how well Apple plays the vertical game. It’s really amazing. What you also have to appreciate is how much we also need the horizontal one. The iPad needs an open alternative, soon.”
  • Dave Weinberger says that the iPad is the “future of the past of books” and says it’s missing interactivity and collaboration as key features.
  • John Gruber says that the iPad user experience feels like it’s all about speed, and says that Apple’s vertical integration play (the aforementioned Apple A4 chip) is responsible, and that “this is Apple’s way of asserting that they’re taking over the penthouse suite as the strongest and best company in the whole ones-and-zeroes racket” ahead of Sony, Nokia, and Samsung.
  • Michael at Cruftbox sums up the reactions of the rest of the world and says, “You’ll bang on about features, data plans, DRM, open source, and a multitude of issues. You’ll storm the message boards, wring your hands, and promise you won’t buy one till ‘Gen 2.’ The din will grow and grow as time passes. And then one day, in a few months, you will actually hold one and use it. And you will say, ‘I want one. Iwant one right now.'”

I think what disappointed me about the launch was not the device but the position it occupies. Jobs sees the iPad as occupying empty space in the consumer world between a PC (laptop) and phone. And there is probably room in that position. But the iPad seems also to be firmly positioned, at least for now, as a companion device. You sync it to another computer over iTunes. There’s no USB port or optical drive. It’s not going to be replacing anyone’s laptop any time soon.

And, frankly, that’s what I was hoping it would do. Because while it looks like it blows away its target use cases (web browsing, mail, calendar, gaming, music, book reading, even office apps), there are some very real use cases it doesn’t handle. And not just being a development platform. Like:

  • Preparing taxes (though Intuit could probably do a tax application for it)
  • Scanning documents (no USB port…)
  • Printing (ditto–though I wonder if it supports network based printing?)
  • Videoconferencing (no camera and no ports)
  • Organizing photos
  • Making a calendar or Christmas card

Additionally, I have question marks about some of the use cases that it seems to handle well otherwise. Like: can I point its version of iTunes at my 500 GB network drive and play music from there? How do the new iWork apps manage their files? (Remember, there is no user visible file system on the iPhone OS, on which the iPad is based.)

But, my quibbles aside, I have to confess that I’ve already talked with my wife about getting one. We’re pretty excited for the brave new iPad future. Because for most of what it does, it does beautifully.

iTunes Plus de-emphasized in iTunes Store?

Looking at the new iTunes Store experience in iTunes 9, I had difficulty finding any information about iTunes Plus upgrades, Apple’s offer that allows you to upgrade your old DRM-crippled protected files to the new “purchased” format.

Fortunately, it seems that the page is still there and working in the store, just not promoted. Bookmark the link…

Update: In the comments, David C. points out that the link is there, but it looks like it’s not loading reliably–it certainly didn’t ever load for me yesterday. The box in the upper right corner of the store loads progressively, and the bottom links (including iTunes Plus and Complete My Album) load after a delay.

Snow Leopard: Initial thoughts

I did the Snow Leopard upgrade last night, and it went OK.

First step was to back up my MacBook. It’s an exaggeration to say that it had never been backed up–I do, or did, regularly back up files to my .Mac iDisk, but rarely if ever did a whole system back up. A $99 external USB hard drive let me use Time Machine for the first time and I let that run for about three hours. Once it ran, I kicked off the installer and went to bed. (Yes, tempting fate.)

In the morning, I came down to the login screen. After login, about five copies of Software Update popped up, prompting me to install Rosetta so that “HP IO Classic Proxy 2” could run. I cancelled all of them, and went to HP’s site, where I found a suggestion that I didn’t need that driver, or any of HP’s software. Seems that the printer drivers are included in Snow Leopard, and scan support has been added to the built in Apple Image Capture application. Um, yay. Scan support from pressing the printer button is gone, but I never used that.

I couldn’t get my Cisco VPN working, but I should be able to get a later version of the client from work on Monday. Even better, I’ll be able to try out the built in VPN support once I turn up my connection file (it’s in a directory that’s not indexed by Spotlight, apparently).

Best of all? The update did free up disk space. About 11 gigs. Now that’s what I call a good upgrade.

Snow Leopard arrives Friday

You can now pre-order Mac OS X 10.6, aka “Snow Leopard,” at the Apple Store for delivery on Friday. I forgot what it feels like to be excited and waiting for a Mac OS X release, even what is admittedly a point release with a handful of features. Some of those features are pretty cool, though, like Exchange support.

I’ve decided to get ready for the new Exchange features by doing something I should have done a while ago: I created a new dedicated “work user” on my laptop for those times I need to get into the office from home, and locked down the account–deprivileged it, used File Vault for the home directory, the whole nine yards. When Snow Leopard comes out, I’ll hook that user’s Mail and Calendar into the office Exchange server over the VPN. Nicer experience than Outlook Web Access and still secure.

I think, though, that most of all I’m looking forward to getting up to 7 GB back on my hard disk.

Improving iPod FM adapter reception in a VW Passat

This one was counter-intuitive, but it worked. I’ve been suffering through static and interference ever since my Monster iPod FM adapter burned out and I replaced it with a different model. My Passat has the rear-roof-mounted antenna, and it’s apparently too far away from the FM adapter that I use for my iPod. It’s great at pulling in distant radio stations, which tend to swamp the empty channels that I’d normally listen to the iPod on.

So I removed it.

Yep, just unscrewed the antenna and now the reception for the iPod is crystal clear. Smart but totally counter-intuitive.

Credit goes to this anonymous poster on MacOSXHints. I read this a while ago and just today had the nerve to try it. No more static for me!

Recovering from an iTunes 13001 error

I hesitate to write this post, but since I found very few reliable aids for surviving this error, I’m writing it up in the hope that it will help someone else.

My MacBook Pro (first generation, dented side resulting in unreliable power cord connection, weak battery) shut off sometime overnight. Unfortunately, when I booted it back up, iTunes told me that the library file was corrupt. Given the size of my library and the fact that I’ve got somewhere close to 100 playlists, and that I just spent about two years going through and listening to everything at least once after the last library deletion, I freaked out.

Then I quit iTunes and started thinking. There are now quite a few files that constitute the “iTunes library,” including iTunes Music Library.xml, iTunes Library Extras.itdb, iTunes Library Genius.itdb, and iTunes Library itself. I knew from past experience that it was iTunes Library that held the playcounts and playlists, so I crossed my fingers, moved everything else out of the folder, and started iTunes. Now it started up, but when it tried to rebuild the Genius data, it told me that it couldn’t save it because of a 13001 error.

I did a lot of research, and through some trial and error I hit upon the following steps:

  1. I moved all my non-Apple codecs out of the Library/Quicktime folder. In my case, this was a DivX decoder and encoder, and three component files from Flip4Mac WMV. (This was nonintuitive; thanks to this Apple support discussion post for suggesting it.)
  2. I deleted the ~/Library/Preferences/com.apple.itunes.plist file. (This is iTunes preferences, including your default settings for importing and your library location. You’ll want to reset these at the end of the process.)
  3. I re-deleted the the iTunes Library Extras.itdb and iTunes Library Genius.itdb files.
  4. I temporarily moved my external music hard drive from my AirPort Extreme and attached it directly to my Mac. (This might not have been a factor, but I figured it would be a lot faster to get through the Genius rebuild if it didn’t have to do it over an 802.11g network connection. Yes, the MacBook Pro 1st gen only has an 802.11 card, alas.)
  5. I restarted iTunes and let it rebuild the Genius database all day.

When I came home, it had succeeded.

I don’t know if all these steps were necessary, but I do know that when I didn’t delete the preferences file or the codecs, rebuilding was not successful. Whatever: it worked.

Requiem for a dying iPod?

I’ve had three iPod-like devices since 2001, four if you count my iPhone. The first one was the classic iPod 5GB with the mechanical clickwheel (that was a happy Christmas day). The FireWire port famously broke on it, and I picked up a 10GB model in time for my cross-country drive. I bought a 30GB fifth-generation model in late 2006 when the 10GB model stopped taking a battery charge and developed hard disk problems. The iPhone followed in late 2007 (I wasn’t an early adopter, but I did buy before the 3G model came out).

And now? Well, last night I tried to sync the 30GB iPod about four times. The first time it copied 200 songs, then I couldn’t eject it from the OS and had to reboot and grab it and go. And none of the new songs made it over. The second time it synced successfully but the songs still weren’t there. I rebuilt the smart playlist that had the songs in them, resynced, and this time the sync hung iTunes. Finally I restarted both the iPod and the machine, finished syncing–and again the iPod refused to eject because iTunes claimed that it had files that were open from another application. When I finally got it free, the songs still weren’t there.

Based on what I hear on the Apple support boards, I probably have a bad hard disk in the little bugger, which is consistent with the “clunking” sounds I occasionally hear while it’s trying to sync. So, it’s gone. Maybe tomorrow, maybe in a month, but it’s on its last legs, because replacing the hard drive is not a cost effective move.

So the question is, what do I do next? I can only get a fraction of my 475GB music library on it, but that’s more than I could get on the iPhone, so going to the iPhone alone isn’t an appealing option. And paying $399 for a 32GB iPod Touch isn’t going to happen right now, either, as much as I like the form factor. (I’m a big fan of the scroll wheel but would go to the Touch in a second if price weren’t a factor.)  I don’t know if I can swing $249 for the 120GB “classic” model either, but it’s the only model that has a fraction of the capacity I’m looking for. We’ll see what happens.

Meantime, anyone have a good project that involves rebuilding a 5th generation iPod with a bad hard drive?

Sweating off the gigabytes

Since my budget doesn’t move as fast as the hard disk industry increases capacity, I periodically use OmniDiskSweeper to go through and clean a few gigabytes of dross off my MacBook Pro’s 80 GB drive. It’s necessary, because without going through the exercise, I end up with less than a gig of free drive space and everything grinds to a halt.

I don’t always remember where I find the disk space hogs, so this time I’m writing them down:

  • A mail folder for the Blogcritics mailing list: 899 MB. (This one was a surprise, since I’ve been religiously deleting the mails since I stopped regularly writing for the site, but there was a ton of old mail in there.)
  • Four iPhone software updates—I kept the last two or three there, but didn’t see the need for the 1.x updates or the first 2.0 one—about 800 MB.
  • The ~/Library/Caches/Metadata/Delicious Library Items folder. Appears to date to Delicious Library 1.0, since there’s also a Delicious Library 2 folder: 220.6 MB.
  • ~/Library/Application Support/NetNewsWire/Backups: old subscription lists, 289 of them: 90.9 MB.
  • ~/Library/Application Support/NetNewsWire/SearchIndex: last updated in 2005. 146.3 MB.
  • ~/Music/iTunes/Previous iTunes Libraries: three old copies from last year. About 250 MB.

What’s interesting this time is how little of this was real content as opposed to just old cache files. My free disk space now, even before a reboot (to clean up the VM and flush various other system caches), is up from 80 MB (yeah, I know) to 3.28 GB. Every little bit helps.

When your PowerBook G4 screen goes dark

I had a panicked call last night from Estaminet, whose PowerBook G4 laptop screen was going dark just seconds after booting up and staying dark. She had a paper due tomorrow morning. Could I help her out?

I have a karmic obligation to answer these kinds of support calls, considering that the lemon laptop in question used to be mine. So I Googled the problem while I talked her down. The most likely answer (though we’ll know for sure once she has it seen by a specialist) was that the inverter board went south. This is a hardware failure and can’t be remedied by poking about in the system, but since it’s confined to the video subsystem the rest of the PowerBook was still working.

Racking my brain to figure out how to get her paper-in-progress off the machine, I had her try a tip from the MacOSXHints forum: shine a bright light, like a flashlight, directly at the screen to see what the computer is doing, then turn on iChat. I then sent a screen sharing request, which she was just able to see and accept, and then I saw her whole desktop clear as day on my machine. I fired up Firefox and Gmailed her paper to her so that she could work on it on another machine.

So, in summary: iChat screen sharing is your friend if your screen fails.

Reunion on the iPhone: Genealogy on the go

reunionI got an email from someone the other day asking about one of my ancestors (Andrew Hershey, 1702-1792). I get this sort of email all the time, since my family tree is online, and normally I’d have looked up the answer to the questions and emailed back. The problem was, I was on my iPhone and didn’t have access to my detailed genealogy research. I found myself thinking, I wonder if there’s a good genealogy app for the iPhone. Maybe something that will read my GEDCOM export and display it nicely. It would be really great if Reunion were on my phone, though.

So I hit the app store, and the first app in the search results for genealogy was … Reunion! Leister Pro has done an iPhone client that allows you to bring your genealogy data with you, and sync it back to your Mac when you’re done… sort of.

I have about 4000 records in my family data, and opening and browsing it is quick and painless. The UI is splendid, taking all the best parts of the Reunion “family card” display and porting them painlessly to the iPhone. Images are supported, and the experience is almost like sitting in front of my Mac.

There was one glitch I encountered–somehow my sources data didn’t seem to move from my Mac, something I’ll need to investigate further–and two missing features. On the iPhone it would seem natural to provide the ability to add a photo from the phone’s photo list or from the built-in camera to an entry; neither is currently supported. And the app relies on a Bonjour based syncing strategy — turn on your phone, click a button on your Mac, and the syncing happens over your WiFi network — that happens separately from the phone’s main sync loop. Based on your opinion of iPhone syncing, this may be a good or bad thing, but surely there are other sync methods available that wouldn’t require a separate action.

Right now these are quibbles–I’m generally very pleased with the app, and thrilled Ididn’t have to find a new genealogy app just for the iPhone.

Is it new MacBook time yet?

I have a  feeling, like a disturbance in the Force. It’s the feeling I get when it’s time for a new Mac.

I’ve been a Mac user for a long time… since my first year of undergrad, when my dad splurged on the best Mac ever made, the SE/30, for me. I’ve had, including the SE/30, two desktops and three laptops since then, as follows:

Machine Purchased Duration Fate
SE/30 September 1990 5 years Given to younger sister; recycled
Power Mac 7200/90 ca. October 1995 ca. 5 years Given to father; recycled
PowerBook G3 (Pismo) August 2000 2 y 11 mo Given to younger sister; then to cousin
PowerBook G4 1GHz July 2003 2 y 9 mo Given to younger sister
MacBook Pro 1.83 GHz March 2006 2 y 10 mo to date Current

So there have been a lot of machines and my laptops have been lasting a little under three years; why? Two words: case problems and capabilities.

The G3 was great; had no problems with it other than having to replace the power adapter four times. But when we moved out west to Seattle we decided that we’d keep in touch via videoconferencing, so upgraded to a machine that could handle video on iChat. The G4 had terrible case problems–a hinge stuck, then broke the bezel when it got forced open–and also had power adapter problems. We fixed the case and upgraded to a MacBook Pro when they first became available.

The MacBook Pro has been great; except… well, it got dropped. It landed on the side where the power connector was, which dented the case near the power connector, making it difficult for the MagSafe to function properly. It charges but you have to fiddle with the connection, and lately it’s been turning itself off. Plus, I haven’t been able to prune the data on the hard disk enough to keep more than 3 GB free at any given time, meaning the machine is prone to slowing to a crawl.

The cost to me to repair the case and the power board was quoted by the Apple Store as a minimum of $500, and I’m thinking very hard about doing that. But I’d also want to replace the hard drive, and that starts to bump up the cost close to the lowest-end MacBook.

Yes, MacBook. For the first time, I think that my needs are converging on Apple’s consumer line rather than the Pro line. The MacBooks are much more capable than they were three years ago, and I’m no longer doing the sort of programming that made me want a faster machine then. And I’m not sure that spending an additional $600-$1000 would give me a comparable increase in value. There are numerous side-by-sides that attest to this (Gizmodo, MacRumors, Engadget). The main issue appears to be the screen in the MacBook, and I’m going to have to go in and look at it to decide if that’ll be OK. (I don’t watch DVDs on my laptop much anymore, but I might be watching more TV there.) There’s also no FireWire support, and no card slot to plug in an expander–a problem if we want to keep using our ca. 2000 digital video cam. And there doesn’t seem to be a way around that, so we might have to keep the old Pro around just to do video.

We’ll have to think a little more about it, I suppose.