Mac help
#9 Henry, Saturday, 28 November 2009 4:48 PM (Category: Apple)
(Tags: mac conversion)

I recently advised a rowing friend to buy a Mac when he asked me what computer to buy. I get asked this question a lot, and usually I can reply "Buy a Mac" because I know what they use a computer for and a Mac would suit them very well. Almost always, they ignore me and buy the cheapest Windows computer they can and then have all sorts of problems with it.

But no, Joe went and bought a Mac. The Apple store took all the data on his Windows machine and transferred it to his new iMac, and they set up his GMail account for him. He took it home and he's been using it. But he has extra needs.

He had a label maker program on his PC and it's getting close to Christmas and he needs the data transferred to the Mac. As I had advised him to get a Mac, it was now my responsibility to get it working for him.

His seven-year old PC was still running, so I started the label maker program and opened his address database. Nothing. It was corrupt. Ah, this was the reason why he wanted a new computer. His database had been appearing and disappearing for a few years. I wasn't quite sure what this meant, but he has been having problems. Did he have a backup? He had some 3.5" floppy disk backups from 2002. And an external hard disk that backed up files automatically. Unfortunately, it didn't do anything smart with backups, it just copied the current file to the hard disk, overwriting previous versions. The backup database file was corrupt too.

I spent an hour searching his floppy disks, his hard disk, and his backup disk. In the end I found a data file without the index file on a throwaway directory on the backup hard disk. It was dated 2007, but it was still better than nothing. I copied that file to a temp directory, added an index file from the corrupt database, and tried to open it with the labelmaker program. It barfed a little, but I think it rebuilt the index, because after a while, the data became available. So I exported it, and found the options for CSV (comma separated values) curiously worded. The file exported, I transferred it to the Mac and then wondered what to do.

We used Apple's list of software, and we Googled, and we looked for what we could find. We eventually decided to buy a label maker program from iWinSoft. This appeared to be all over the Internet, and the descriptions were deliciously opaque English. But it appeared as if it would do the job, and it cost $35. Joe bought it, and we installed it, and it looked okay. Bizarrely, the layout and the wording used in the program brought me to believe that the old label maker program on Windows had mutated many years later to this Macintosh program. I swear it's the same program many years later.

Anyway, I imported the file from the Windows version and we looked at the data. We had twice as many records as we should have, and every second record was blank. I knew what that was. The end-of-line problem. I dropped to the command line, and edited the import file with Vim and yes, it said "DOS format". That's easy to fix ":set ff=unix" and save. I loaded it in again to the label maker and this time it worked much better. The right number of records loaded. But some records had some parts of the street name missing, and an extra field that pushed the city down. I had a close look at the raw data and this was happening to fields that had a comma in the field. This is really stupid. The fields were saved with quotes around them and separated by commas. This is done so you can have commas inside the field. This is standard data transfer. I've worked with this sort of data for years, converting data for acquisitions. It isn't difficult to get it right. You really have to do stupid stuff to get it wrong. But it was wrong. And there were too many to ignore.

So I whipped up a little Perl script that read through the file, extracted the fields, removed commas from them and then wrote them out again in CSV format. I loaded it in again, and this time it worked perfectly. Success. Joe was really happy. He was still missing 100 addresses between 2007 and now, but he had 700 addresses to start from. That's better than finding and typing 800 addresses from scratch.

One thing I do like about the Mac, is that when the GUI doesn't work, you can drop down to the command line and get your hands dirty with commands and shell scripts and Perl and Python. And it's a real Unix down there with all the tools you need.

I was ready to leave, but no, there was one more task. The Apple store had not been able to set up his main email account. Could I do it? I've had a lot of trouble using Apple's Mail program, but I had to give it a go. It took an hour of investigation and experimentation to find the inbound and outbound mail servers and get them to work. Then we had to fiddle with it to make it all work correctly with the From address. In the end, it was working perfectly.

When I finally left four hours later, I had to wonder how anyone gets on the Internet today. Sometimes it's a real struggle, and that's even a struggle for me. The world has moved on and Microsoft and Apple have started using stupid and cutesy names for things to try and make it possible for the average Joe and Jane to get online and use their computer, and it doesn't help them and it confuses the hell out of me about what they mean. Jargon might be unintelligible for Joe and Jane, but it has a precise meaning for people who are familiar with it. Skip the jargon and you confuse everyone.

But this session ended well and everyone was happy. Except for Anne who did not know where I was and was wondering why I was 5 hours late back from rowing.