Apple and Google sitting in a tree, f-i-g-h…erm…t-i-ng

This really came out of a throwaway comment I made on Daniel, but it seems popular to pick apart every last iota of Steveness from the WWDC keynote, and I’m nothing if not popular. So here we go.

What is WebClip? In fact, that’s not really the question I want to be asking. We know what WebClip is; it’s a technology which lets users see only the bits of web pages that those users want to see. The real question is what does that mean? Well, I know which bits of a web page I usually want to see; they’re the bits which aren’t adverts.

I’m going to go out on a bit of a limb, and guess that the way WebClip works (I’m not a WWDC bod so I don’t have any more access to the new stuff than anyone else; in fact I haven’t even downloaded the Safari 3 beta) is by observing which DOM elements are within the clipped region, and downloading only media relevant to those elements. If that’s the case, then you can ignore the fact that the ads on the page don’t get seen; they don’t even get downloaded. Therefore if I’m reading, say, the Dilbert strip in a WebClip, I’m effectively getting free Dilbert, even more free than the free website because I’m not upping their ad impression count.

One thing I noticed about the various sites that Steve clipped is that as far as I can remember, none of them features ‘Ads by Google’. It would be quite embarrassing for Apple’s CEO to demonstrate how to reduce revenue for one of Apple’s most prominent board members in a world-broadcast keynote talk. As over 99% of Google’s revenue is from online ads, and Eric Schmidt (CEO of Google) is on the Apple board, that is exactly what Steve was showing us, though. There’ll be a doughnut fight back at Infinite Loop over that, I expect.

Posted in Business, leopard | Leave a comment

Miniwindows

Maybe it’s just me who gets annoyed by teeny-tiny miniaturised views which are completely illegible. Even so, I’ve just uploaded an article I wrote on Miniwindows which can be used in any OpenStep implementation such as Cocoa or GNUstep. It’s based on the Hillegass TypingTutor example, but doesn’t really use any code from that and isn’t (I hope) otherwise reliant on that context, so it should be possible to see what’s going on even if you haven’t read Hillegass. Which you should ;-)

Posted in cocoa, gnustep, openstep | Leave a comment

Moving on

There has been some cat-escaping-bagness, which is mainly my fault, but now that it’s all official I’m going to ‘announce’ it myself: I’ve got a new job! From the end of July, I’ll be working at Sophos as Senior Software Engineer, Mac (the post is still up at the linky in the title, for the moment).

This looks like being an exciting time – I’ve been enjoying the ObjC hacking I do with Brainstorm and this will be an opportunity to do even more of that, and the move from services to user-installed apps will bring its own changes and new experiences.

Erm, that really is all for now. More info as it becomes available, and all that.

Posted in cocoa, personal | 3 Comments

A bit of backup script

Good news – there’s a handy tool in OS X called wait4path which can help when writing timed scripts to backup to removable media.

Bad news – it [at least in Tiger….] works slightly esoterically – if a path is already present, it will still wait for another mount kevent before exiting. It should therefore be used in a script like this:


#!/bin/sh

if [ ! -d /Volumes/Backups ]; then
echo "waiting for backup volume..."
/bin/wait4path /Volumes/Backups
fi

# do some backups

Note, however, that if you do this in a crontab job it could potentially wait for a very long time, so you should wrap all that with a /var/run style semaphore.

Posted in darwin, sysadmin | Leave a comment

Official Google Mac Blog: Measuring performance of distributed notifications

Official Google Mac Blog: Measuring performance of distributed notifications on the performance of Google Update: “Just how expensive is it? How many notifications can you broadcast per second? As with all Google client products, we want to be good citizens and not bog down the client machine.”

A noble sentiment, but dear Google, answer me this: just how many times per second is each app going to be checking for updates? When does this become an important factor, and not a question of premature optimisation? They decided to go for distributed notifications instead of distributed objects, which seems reasonable – not because of the overhead issues (in fact a DO is probably a lot cheaper, if written properly), but because of the kind of information they’re trying to get through this IPC.

Posted in whatevs | 3 Comments

Bye bye data, hello…the same data

Of course it happens to everyone, and yesterday evening it happened to me…my home directory became inaccessible. What seems to have happened is that the filevault image containing my ~ became corrupted upon unmounting (though notably, I didn’t do the ‘recover space’ thing the last time I logged out before the failure, so it should just have been a straightforward unmount). so the simplest recovery route was to delete the user, re-create it then recover my data from the backups. I don’t keep backups of the Library area so lost a few preference files, and of course have had to trawl around my email looking for licence keys and the like.

For the moment I’ve set up the replacement user without Filevault, and am using encrypted disk images for specific data I’d rather keep thus protected. This makes backups harder – I keep my backup drive unencrypted as it doesn’t come out with me, so I now need to come up with a script to backup my home dir except for the encrypted images, mount the images and back up the content, then unmount them. This means that the backup will need to be manually triggered so that passwords don’t have to be kept anywhere…or I write my own backup tool, which uses passwords stored in a keychain kept outside the target user account; and I need to make sure that keychain is also recoverable ;-).

A lot of my data was completely unaffected – work stuff is typically stored in subversion on their servers (as well as another local copy on my work laptop), my email is all on remote servers, my calendar is served by thaesofereode.info and so on. There are some improvements I could make – I could probably use an LDAP server and abxldap to remotify my contact list, and thaesofereode.info offers subversion hosting which I’m currently not making use of. But it happens that next Tuesday, I’ll be talking about data security at the Oxford Mac Users Group, so I will expand on this tale in full and gory detail ;-). St. Cross College, Tuesday 8th May, 7:30 pm.

Update 20070503T1653Z+0000: actually, things look a little more serious than simply a trashed sparseimage:

mabinogi:~/Desktop leeg$ hdiutil attach OmniDazzle-1.0.1.dmg
load_hdi: timed out waiting for driver to load
load_hdi: timed out waiting for driver to load
load_hdi: timed out waiting for driver to load
load_hdi: timed out waiting for driver to load
load_hdi: timed out waiting for driver to load
[…]
2007-05-03 15:41:35.535 diskimages-helper[718] ERROR: unable to load disk image driver – 0xE00002C0/-536870208 – Device not configured.

Good news is that when that gets fixed, my old homedir will start working again. Bad news is: um, it looks fairly messed up to me :-(

Posted in backup, filevault, oxmug | 1 Comment

All the more reason to like FOSDEM

So it seems that my half-attendance at FOSDEM paid off more than I could have hoped, as I won a year’s subscription to GNU/Linux magazine. The publication is francophonic, so this will be a good chance to improve my command of la langue des grenouilles ;-).

Posted in FOSDEM | 3 Comments

Summer of code

GNUstep has been approved for this year’s Google Summer of Code. The title link goes to the GNUstep wiki page outlining possible projects, but I’m sure that if a student had another idea you’d be welcome to talk about it on the gnustep-discuss mailing list, and probably get a mentor!

Posted in gnustep, Google, SoC | Leave a comment

Mail::Box++

When most perl developers (I believe there still are one or two in existence) talk of the "cool one-liner" that they wrote, what they actually mean is that they grabbed a crapload of packages from CPAN, invoked a few use directives and then, finally, could write one line of their own code which happens to invoke a few hundred lines of someone else’s code, which they have neither read nor tested.

Modulo testing, my short script (below) to convert mbox mailboxes to maildirs is exactly like that. While it has three lines of meat, these call upon the (from what I can tell, fantastic) Mail::Box module to do the heavy lifting. That package itself is less svelte, with 775 lines of perl. Which is the interface to a C bundle, which is (single-arch) 92k. But never mind, I still wrote a three-liner ;-)

#!/usr/bin/perl -w

use strict;

use Mail::Box::Manager;

@ARGV = ("~/mail", "~/Maildir") unless @ARGV;


# open the existing (mbox) folders
my $mgr = new Mail::Box::Manager;
my ($srcPath, $dstPath) = @ARGV;
# expand tildes and stuff
$srcPath = glob $srcPath;
$dstPath = glob $dstPath;

opendir MBOXDIR, $srcPath or die "couldn't open source path: $!";

foreach my $file (grep !/^./, readdir MBOXDIR)
{
my $mbox = $mgr->open(folder => "$srcPath/$file",
folderdir => "$srcPath");
# open a maildir to store the result
my $maildir = $mgr->open(folder => "$dstPath/$file",
type => "Mail::Box::Maildir",
access => 'rw',
folderdir => "$dstPath",
create => 1);

$mgr->copyMessage($maildir, $mbox->messages);
}
Posted in perl, sysadmin | Leave a comment

FOSDEM / GNUstep photos

Just came in on . Many photos of the GNUstep booth, dev room and of course the famous GNUstep dinner.

Posted in brussels, FOSDEM, gnustep, pictures | Leave a comment