iMac Salvaged!

Mostly I’ve been blogging about my adventures in Linux-land. But I wanted to write a bit about my other project. About 9 1/2 years ago, we got an iMac, and about four years ago we replaced it with a Mac Mini.

The iMac was a mid-2007 20″ model. (This was the first Aluminum and Glass version, replacing the earlier white plastic models. You can watch Steve Jobs introduce the Aluminum Series on YouTube.)  The specs were: 2.0 GHz Core 2 Duo, 250 GB SATA, SuperDrive, and 1 GB of DDR2. It cost $1,220. The late 2012 Mac Mini that replaced it had a 2.5GHz Core i5, 500 MB SATA/5400, 8 GB DDR3) and cost $669, but we had to buy a monitor for it (a Samsung S23C570, which probably cost around $200). So the Mac Mini was definitely an upgrade.

But that wasn’t why we upgraded. It was because the iMac was barely working. The hard drive would go “tick tick tick” for the first hour or two whenever you started running it. The SuperDrive had quit working a couple of years earlier. (Technically, a DVD got stuck in it and could not be removed.) Plus the usual “I’m an old Mac so sometimes I just take forever to do things” that we’re all used to. We finally upgraded because we couldn’t trust that it would work any more.

So. Fast forward four years. I got tired of tripping over the iMac, but I couldn’t bear the thought of losing such a pretty computer. So …I fixed it. Or maybe I threw good money after bad and wasted my time fixing a ten-year old computer. Or both.

I watched a ton of how-to videos (this one was particularly helpful) and read the instructions over and over again. Oh, and before I did that, I got a set of tools from iFixit and parts from OWC (MacSales). Then, after putting it off all during Lent, I ran out of excuses after Easter. So I spent last Friday replacing the original 250 GB hard drive with a 2 GB drive and the SuperDrive with a 2.5″ 1 GB drive. Here’s what it looks like on the inside with the new drives.

iMac 20" (2007 model)

See more pictures of the work in progress on Flickr.

I will say that Apple sure doesn’t want you to make a bootable OS install disk. In spite of all the instructions they provide (here, here, and here). I own three Macs, but ((Shift+) Option+) Command+R doesn’t work on any of them. I finally dug up an old Snow Leopard install DVD and then upgraded to El Cap the slow and painful way.

Podcast Tagging

I’ve got a podcast and it’s a chore to update. I’ve built some tools to help me produce an RSS feed for the podcast, which is a good thing, since RSS = XML = too persnickety to do by hand. But I’ve had to do some of the work by hand, specifically, tagging the .MP3 files with the appropriate ID3 tags. I was using iTunes, which has never been very fun, and seems to get worse with each iteration.

Enter eyeD3. It’s a tag editor, but unlike most of them, you can operate it from the command line. Better yet, eyeD3 understands ID3 v. 2.X tags. The documentation for the classic eyeD3 interface is what I like best. You can use it to set all kinds of tags for your podcast. Like these v2.x tags here. If you want to set one of the date tags, you’ll need to know how to specify a date in ISO 8601 format.

Also, did you know that mp3info lets you get the length of an audio file from the command line? I didn’t, until I read it on the internet, and durned if it’s not true. That’s pretty nifty. And there’s even a Ruby API for it!

I also learned about something called mutagen, which is like eyed3 but for arbitrary types of audio files.

I spent the day learning all this, so my tools still need to be updated to do what I now know can be done programmatically. But I’ve done the hardest part, viz.:

Podcast Tagging

iTunes Confusion

Apple has never impressed me with their ability to have two different devices synchronize with each other. But they’ve got plenty of hubris, so they keep trying. Take the app store. (Please!) Here’s what happens when I sync my iPad: it tells me I need to authorize my computer to sync to it, I authorize it, and then it tells me never mind, because the computer is already authorized.

iPad Sync

OK. That explains it, then.

Software Update

In the mid-1990’s I worked for a telecommunications firm that was trying to make a set top box for interactive television. (This was even as the internet was exploding. Read Michael Lewis’ The Next Next Thing to find out what the “B Team” was working on.) One of the things I spent a lot of time on was “software update.” We needed a way to securely update the operating software in the device, and we wanted to do it while connected to our network, because the cost to roll a truck and have a technician do it was prohibitive.

A few years later, I was working for a different company trying to innovate in the electrical power industry. (I know, it was hopeless. But I was young and naive.) Anyway, we had the exact same problem: securely updating the software in a networked device. It’s a problem that’s fraught with difficulties.

As it happens, both of those ventures flamed out, so I never got to be part of solving that problem. But this morning, as I was eating my oatmeal, I saw that someone else seems to be doing it:


Not only solved, but untethered. Yay Apple.

Leaving iPhoto

Yesterday I did an “empty trash” command in iPhoto, to expunge 27 thousand photos I’d just deleted. Characteristically, the application hung. Well, it probably didn’t hang. After half an hour, I did a force quit, and on reopening the program and emptying the trash again, it told me there were about 5,000 photos to be deleted. Another 15 minutes wasn’t enough time for iPhoto to clean them up, so I force quit again, broke out a shell in Terminal and did:

$ cd ~/Pictures/
$ rm -rf iPhoto*
$ cd ~/Library/Caches
$ rm -rf

…which fixed things very nicely.

So ended a 27-month experiment with Apple’s end-user image management software. They also have a “pro” or “prosumer” product called Aperture, and if iPhoto is any indicator, I wouldn’t have it, even gift wrapped.

Between 2001 and 2009, I’d used my own set of tools to manage and manipulate my digital images, but when I got the MacBook, I decided to try iPhoto. That was two versions ago, and the things I disliked with ’09 weren’t fixed in ’10, and there wasn’t any sign they’ve been fixed in ’11 either.

What are those? Primarily two things:

  1. Speed. Or rather, its lack. The software just wasn’t very responsive. Dragging the elevator on a scroll bar felt sluggish, and if that’s not easy, what good is a photo management app?
  2. Noise. Running iPhoto was like playing Flash videos on YouTube: both cause my computer to heat up to where the fan runs. It doesn’t matter what I was doing in iPhoto; I could go away and drink a cup of coffee and it would just start overheating all by itself.

Now, I had some other complaints as well. I don’t need face recognition, and I would like text search, but Apple evidently has the opposite set of priorities. I would love to have uploads to social media sites, but the iPhoto way didn’t win me over at first blush, so I used other tools.

Sometime this summer, I gave up on iPhoto. Since then, I’ve spent my free time copying files out of the iPhoto library and renaming them and filing them elsewhere. I’d like to have tags, but what I’ve learned in 30 years with a Unix shell is that find(1) is pretty good at finding things:

$ find . -name '*whatever*'

for some really tricky things, I break out grep:

$ find . -name '*whatever*' \
	| egrep -i 'one thing|another' \
	| egrep -v 'but not this'

Yesterday, I finished the conversion and (after making lots of backups in lots of places on multiple drives), I emptied the trash in iPhoto. My fan hasn’t run since then.

I also noticed that while those 27K photos took 41 GB of space in iPhoto, they only occupy 38 GB in the filesytem. What was iPhoto doing with the other 3 GB?

Recovering eight or ten percent of a dataset isn’t chopped liver, but the space saving may prove eventually to be even more significant. iPhoto is monolithic. (By default, at least.) You put your files in there, and it’s a huge black box and you don’t need to worry your pretty head about what’s going on inside. But the filesystem gives me all kinds of options about how to manage my image files. For example, I can put different subsets of the data on different media, with symlinks connecting one part with another.

For now, I’ve stored everything in a single master folder. Within that, files are stored by year (2001, 2002, etc.). Within a year’s folder, I typically store files by the month (01-jan, 02-feb, …). Since I take the most photographs when I’m on vacation, I sometimes put vacation photos in their own folder (04-vac, etc.). Finally, I have a separate folder for video files called ‘movies‘. Those files are typically 10x or 20x as big as a photo, but I only have a handful, so I manage them as a collection.

The files themselves are typically given descriptive names (accident-minivan-01.jpg, home-oleanders-07.jpg) etc. Because I do so much work from the command line, I don’t put spaces in the names. In lieu of a space, I prefer a hyphen (-) to an underscore (_) because it doesn’t require a shift key.

In my next post, I’ll run through the tools I use to manipulate images.

Steve Jobs, 1955-2011

This was my first computer:

Vintage 1985 "Fat Mac"

The 512 kB “Fat Mac.” With an ImageWriter, Microsoft Word and Multiplan (the predecessor of Excel), and MacPascal, it set me back about $2,500. That was 1985 money, so it would be somewhere around $5,000 today.)

I was living in Albuquerque and my roommate, who drank deep of the Kool-ade, had been so affected by Ridley Scott’s 1984 “Big Brother” commercial that he ran out and bought one of the original 128 kB Macs. (If I recall, he bought some Apple stock too. I wish I’d done that when I bought my second Mac, an iBook, in 2003.)

Anyway, a couple of years later, I was working at Bell Labs in New Jersey, and Steve Jobs wasn’t working at Apple any more. He came to Murray Hill to give a presentation of the NeXT computer. I didn’t work at Murray Hill — that was the real Bell Labs, where they got Nobel Prizes in Astrophysics and worked on slug brains. I just worked for AT&T’s R&D unit. But I got to see the presentation way down in South Jersey via the magic of teleconferencing.

By today’s standards, NeXT mail wasn’t all that hot: it was basically email with MIME attachments. But I don’t think he was trying to sell Unix workstations to Bell Labs. (Who would be stupid enough to give up a 3B2 with a BLT running Plan 9 for a mere NeXT box? Ahem. Although, to this day, I’m not personally convinced that email improved when it grew to include anything beyond ASCII text.)

What Steve was doing, I think, was giving AT&T some (desperately-needed) business advice. I admire his chutzpah: a kid in his 30’s, who’d just been sacked by his board, telling AT&T how to do business. But that’s what he was doing.

He was telling them that AT&T Mail was a disaster, particularly compared to what he was selling. But more than that, he was telling them to stick to their core competency. Instead of chasing him (or ignoring him and Inventing-It-Here, as Bell Labs was, ahem, wont to do), he said that AT&T should sell him connectivity. Just give him pipes to move his bits around, that’s what he wanted.

People talk about Steve’s “reality distortion field.” But that day, nobody was buying what he was selling.

That’s a hard message to sell to companies like AT&T. There’s some weird virus that infects marketing people at telecoms that makes them think it’s possible to add value to every bit that passes through their network. Indeed, that it’s not only possible, but their company is also capable of doing it!

Yes, yes, it’s a preposterous notion, but nevertheless, telecom marketers are all infected with it. Twenty-five years later, they still have it. They just can’t stand the idea of simply doing their core business well. They’re terrified of becoming a commodity.

Steve Jobs wasn’t worried about becoming commoditized. None of the businesses he built into category killers are commodities. Pixar is head and shoulders above everyone else in the business. The Mac stands out and commands a price premium in a world of commodity computers. Ditto the iPod, the iPhone, and lately the iPad.

Business is infected with the opposite approach. One of my managers at Bell Labs told me to quit improving a piece of software this way: “You’re polishing a turd.” Steve Jobs knew that you couldn’t make a great company by shipping turds, so he kept polishing products until there wasn’t anything turdlike about them.

Good for him. It will be interesting to see if anyone learns the lesson.

Smart Playlists Just Got Dumber

I mentioned recently how handy it can be to create complex “Smart Playlists” in iTunes. Suppose you want to make a smart play list like this one:

iTunes offers boolean logic for constructing Smart Playlists.

It says the songs in this new playlist have to be “My Non Dogs.” (My Non-dogs is another playlist that includes songs that are either unrated or rated 3 stars or above.) But besides not being dogs, this playlist’s songs also need to be performed either by David Byrne or by the Talking Heads. In other words, iTunes gives us a friendly way to construct a query using boolean algebra.

Prior to iTunes 10.4, that was easy enough. There were little buttons at the end of the pane. A ‘-‘ button deletes the rule; a ‘+’ button adds a new rule; a ‘…’ button makes a rule with multiple conditions, as above:

iTune's old '...' buttons

The problem is that iTunes 10.4 got rid of the ‘…’ buttons:

iTunes 10.4 no longer has '...' buttons.

Smart playlists can still use boolean algebra: all my old lists still work. The only problem is trying to make a new one. How do you push a button that’s not there?

The answer is to hold down the option key. Then the ‘+’ buttons become ‘…’ buttons:

In iTunes 10.4, hold down 'option' to turn the '+' buttons into '...' buttons

I should point out that taking a screenshot is a lot more difficult when you’re holding the option key. The only way I could figure out to do it was by doing a “Timed Screen Grab” using the Grab utility:

The 'Grab' utility is located in '/Applications/Utilities/'

Resistance is Futile (iPad 2 edition)

This is pretty much how I feel, too, especially the final thought:

Motorola and Samsung…they’re both large companies with a lot of buying power and strong brand recognition. The problem is, they don’t understand the game that Apple’s playing in the mobile space, so they’re playing it wrong. They’re so caught up in catching up that they’re not even trying to innovate in this space. Maybe HP or Rim will figure it out, but I’m not going to hold my breath.

Which is unfortunate. If Apple’s doing this kind of amazing stuff without any viable competition, can you imagine what they’d be doing with strong, viable competitors nipping at their heels?

I’ve been struck by how much better Apple products are than their competitors. Who, honestly, would pick a Dell or an HP laptop over a MacBook? And that’s the space where Apple is least advantaged and has a clear premium price.

In other markets (music players and phones) the Apple “premium” is much less clear. For tablets, it’s negative: the superior product is actually less expensive.

Why is this so hard? Surely there are smart, design-oriented marketing people out there who don’t work at Apple. Why don’t some of these hapless technology companies turn them loose. I’ve worked at some of those companies, and, sure, the engineers need firm direction to produce something that doesn’t stink. But why can’t people look at Apple and say, “Let’s try it that way for a change, instead of continuing to flounder like we’ve always done?”