, Saturday, 28 November 2009 4:48 PM (Category: Apple
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.
, Saturday, 28 November 2009 4:01 PM (Category: Linux
I've just spent some time turning LPs into AIFF files on my Mac laptop. I transferred the files to my Linux box so I could convert to WAV and split them into tracks for conversion to MP3. I usually use Audacity to do the conversion and splitting, and went to use it. Unfortunately, I had upgraded to Slackware 13.0 since the last time I used Audacity. Oh well, I just have to put Audacity on again.
I went to the Audacity package I had for Slackware 12.2 and installed it, but no, some libraries were missing. Time to get a new version of Audacity. I went to linuxpackages.net to get the latest package. This is an unofficial site that stores packages for Slackware. Unfortunately, it appears to be defunct. Nothing there.
Oh well, why don't I go to the official Slackware package site and see if they have Audacity. That would be http://packages.slackware.it. Oh dear, they say "The old package browser was broken -- instead of trying to fix it I am creating a new one from scratch. I’ll be using the Django framework. I’m also looking into Solr and Haystack to see if they can be of some use here. It’s not going to take a lot of time and I will publish the working portions of the Package Browser as I finish and test them. Also, we’ll have some other thing to announce in a few days, so stay tuned ;-)" I don't know how long that's been there, but I can't get access to any packages right now.
I use Google and come up with a SlackBuild site and that gives me some confusion. Ah, they don't supply packages, they supply scripts to make packages from source? Or something? Anyway, I get the list of Audacity dependencies I need.
Time to do it from scratch and compile and install Audacity and its dependencies.
I get the dependences - libsndfile and wxWidgets and compile and install them. Then I configure Audacity. It complains about wxWidgets and some other wx thing. I uninstall wxWidgets, download wxAll and compile and install it. Back to Audacity and I get the same complaint. What the hell? I read the message again. Ah, I have installed version 1.6 of wxAll and Audacity is a bit behind and can't handle 1.6, it has to be 1.4. Dang, the wx site doesn't have 1.4 any more, but old versions are available on sourceforge, so I get it, back out the new version and compile and install the older version. Back to Audacity and this time configure passes with flying colours. Now to make. And WTF? Compilation errors everywhere. It will not compile. Temper tantrum time. I hate this shit. I give up.
So I installed Audacity on my MacBook. Well, I downloaded it. Then I wondered how to install it. There were no instructions for the Mac and it wasn't obvious. Hmm, create a new directory under Applications called Audacity and copy all the files in. That looks okay. I ran it. It crashed. I ran it several more times and it continued to crash. I was ready to do damage to something, but walked away, did something else, then came back. I ran it again and it worked. Why? I don't know.
I am sick of all this crap.
, Tuesday, 10 November 2009 10:15 PM (Category: Programming
I went to my first Ruby Users Group meeting tonight. It was a detailed intro overview for new folk. First half summarised the language, the second half showed pair programming and building a web app using Ruby On Rails. The Ruby language part interested me most. I've dabbled with it, and now I'll put more effort into it. Some of the constructs are extremely powerful. I'll be going to these meetings once a month from now on.
And I found out that they have started an Objective-C users group, and they meet once a month too. I'll join that too.
Why is it that Ruby developers are also Objective-C developers? Do Ruby and iPhones go together?
, Tuesday, 10 November 2009 12:23 AM (Category: Linux
Ever since I installed Slackware 13.0, I've been using Amarok 2.1. This has been a struggle.
I've been used to Amarok 1.4 and it's been fun to use. It let me find my music, find patterns in the music, and it just let me enjoy it. My needs are not great. I want a music player to play the music I have on disc, and show me ways of combining it. I don't want to listen to Internet radio, I don't want to do podcasts, I don't want to connect to my iPods (that's what I use the Mac for, and that silly iTunes), I don't want to play cdroms. Amarok 1.4 did a lot of this extra stuff that I am not interested in, but it also let me play my music in ways I liked. The most impressive feature was the duo of Smart Playlists and Dynamic Playlists.
I used those two features to create fun ways of listening to music. I could set up a Smart Playlist of "Rock and Jazz with a date greater than or equal to 2000". Or just Folk Music. Then I would create a Dynamic Playlist to point to one of the Smart Playlists and it would play random tracks from that list. If I added more cds to the collection, they were automatically included because they met the criteria of the Smart Playlist. The Amarok home page describes how to set up the Smart and Dynamic playlists.
Then they released Amarok 2.1. And wasn't that pretty. It looks really nice. But it's slower. It loads my collection much slower than version 1.4. It does really weird things very slowly when the collection changes and it has to refresh its memory map. Sometimes, when all it's doing is playing a track, it decides to do "something", I don't know what, and it jams all my CPUs up to 100%, and thrashes the hard disk. When it does this, all I can do is walk away and get a cup of tea and wait for it to finish whatever it was doing and relinquish control. It's expanded all the things I don't care about. More Internet radio and great support for Last.fm, and more support for podcasting and cds and stuff. Great. I can ignore it.
But they dropped the things I used the most - Smart and Dynamic Playlists. There is something called a Dynamic Playlist and it does something but I don't know what. I do know that it does not do what I want. And, oh look, they've removed the Help that was built into Amarok.
So it's slower and it doesn't do what it used to do that I liked? Okay. I have no loyalty. I'll go looking for alternatives. At the very least I can always fall back to XMMS (which Patrick has decided to include in Slackware again). That's fast and lightweight, but the Smart and Dynamic Playlists are done in your head.
I went looking for alternatives and found this website. I am working my way through these applications and seeing if any of them will suit me.
Right now, I am using aTunes. This is a Java application. And it runs considerably faster than Amarok. I would never have believed that a Java app would run faster than a native Linux app, but there you are. It does. It's as ugly as most Java programs, but I'm rapidly getting used to it. It almost does what I want with Smart Playlists, but not quite. It's better, for my needs, than Amarok so I am going to keep using it while I experiment with other Linux music players.
And just in case the Amarok programmers ran out of time to include Smart and Dynamic Playlists, and hadn't quite optimised it, and hadn't written the Help, and now that it's been released they will have time to add these extra features back in, I will continue to monitor Amarok's progress and hope they get it together again.
, Sunday, 08 November 2009 10:37 PM (Category: Hardware
When I upgraded Anne's Mac Mini to Snow Leopard, I bought her a Western Digital MyBook 1T external drive for her backups. I plugged it in, it worked, it was great. For two months.
Then Anne noticed that backups were not happening any more. I checked it out, there was a disk problem. I ran Disk Utility on the drive, and it said there was a problem and it couldn't fix it. I took it to my Linux box, repartitioned it, put a file system on it, and it couldn't make the file system. The MyBook was no longer any good. I removed the hard disk from the case, put it in an external case and tried again, just in case the electronics of the MyBook was at fault and I could make use of the drive. Same problem. I trashed the MyBook.
I replaced it with a Western Digital MyBook Essential 500 gig. I didn't get another 1T drive as I don't really trust 1T drives much. I've seen too many problems with them. I plugged the new one into Anne's Mac Mini, and the drive was recognised, which surprised me. The box said it was formatted for Windows and would need to be reformatted to work with Macs. Things have advanced and reformatting was not necessary. However, this also appeared:
I ejected it. It disappeared. Two seconds later it popped back up. I did this twice more. It wouldn't go away. I opened it and Finder showed this:
Extra programs and manuals for the drive. This is strange. Maybe it was a second partition with the drive? I used Disk Utility and tried to remove the partition. No go. It was a virtual cdrom. I even took the drive to my Linux box and repartitioned it, and put a new file system on it. Back on the Mac, it still pushed this virtual cdrom onto the desktop. Most people would have shrugged and ignored it way before now, but it seriously bugs me. I control this computer. I do not want a hard disk to push something onto the desktop that I cannot remove. I do not want to use their backup software, I am quite happy with Apple's Time Machine. This sort of behaviour by a hard disk manufacturer makes me see red. I do not want this to happen. A quick Google search shows that yes, this happens, and no, you cannot remove it.
My first impulse was to return the drive. When I cooled down a bit, I decided to continue using it for Anne's backups, but never buy another Western Digital MyBook again. They have been very convenient packages, and I have bought 4 or 5 of them a year for a few years. But now I've had one drive fail in two months, and the replacement drive do things I don't want, well, I'm not going to buy from them again.
Instead, I'll buy external hard disk cases and internal hard disks and I'll make my own little packages. I can get the gear quite cheaply at NewEgg, and if anything goes wrong, I can replace the drive or the case instead of throwing the whole thing in the bin. So in this household, we now say NO to Western Digital MyBooks.