Thursday, September 24, 2009

Linux Family Tree

Ian Murdoch did a very careful, nice, family tree at

I butchered it to get it into a form I found easier to read, losing a little information in the process and probabily introducing errors.

If you're interested, it's at

Labels: , ,

Thursday, February 26, 2009


How was it possible for paul renner to draw these achingly beautiful futura capitals and ally them to this wart of a question mark?


Wednesday, December 17, 2008

Guessable API

I'm coming to the conclusion that I approve of (and therefore aspire to build) guessable APIs.

Easier said than done.

Tuesday, October 09, 2007

Pasting Pictures from Keynote to Pages (Bizarre)

Years of working with Microsoft Office has taught me that even when writing a (Word) document, the best policy is to use Excel for tables (and to paste them in as 'Pictures (Enhanced Metafile)' and PowerPoint for pictures (again, pasting in as enhanced-metafile pictures). I automatically transferred this paradigm to iWork '08. It can be made to work, but it doesn't seem to be straightforward.

This is the picture I drew in Keynote. It's OK. (I've shrunk it so it doesn't get messed up by all the stuff on the right of the blog.)

Evolution of Retention Strategies (Keynote)

I tried pasting it into Pages two different ways. The first way was grouped. This was the result. (You may have to scroll down a bit to see it.)

Grouped Keynote Imaged Pasted into Pages

Clearly, the text has all resized itself (despite the fact I changed it to be 'at design size' in Keynote before pasting it in). Everywhere there is a plus sign in a square, like this ⊞, something is broken). And it doesn't look like you can do much with it when it's grouped in Pages. So I tried pasting it in ungrouped. This is the result.

Ungrouped Keynote Imaged Pasted into Pages

This is just bizarre.

I next wondered whether in fact the picture was slightly too wide and that was causing the problem. (I thought I'd done it at design size, which obviously I ideally wouldn't need to, but I'd only done this by eye. So I tried reducing it a bit further, till I was really confident it would fit. This was better, but bizarrely still not right:

Reduced Grouped Keynote Imaged Pasted into Pages

The text second grey box, which should say 'Untargeted retention', is broken. It was 14pt in Keynote and I found even reducing it to 13pt didn't fix this. But if I took it down to 12pt, things were finally OK. Like this:

Reduced Grouped Keynote Imaged With Further Reduced Text Pasted into Pages

Obviously, there may be other options I haven't discovered yet, but so far this looks a bit erratic. I can certainly forgive Pages for screwing up when the picture is wider than the text (especially if there's a way of telling it just to let it be wider), but the strangeness with the text in the box, and even more with the ungrouped image, seems wrong. And I think I would like there to be a way to paste it in as an image (as opposed to a vector drawing that can be manipulated), other than by explicitly converting it to a PNG, a GIF or whatever. If there is, I haven't found this yet.

This raises another point in passing: it doesn't look as if Keynote has a way of reducing the font size 'a notch' for a set of text boxes with different size text. This is useful when you resize a a graphic and all the text needs to go down something like proportionately. As far as I can see (so far), you specify absolute sizes in Keynote, and can only change a set of text boxes all to a common new size. That will be annoying at times.

On the more positive side, Pages does have a built in keystroke for pasting-in text without formatting (or rather, taking on the formatting that it would have had if you'd typed it in instead). I use this all the time, and it's painful in Word. In Pages, you just do OPTION-COMMAND-SHIFT-v. OK, it's not the snappiest, but it works and is "just there".


Stupid, Stupid PowerPoint

I mentioned in a previous post that Microsoft PowerPoint had improved, but was still painful to use. This reminded me of one of its most painful (and elementary) user interface errors in some previous (I think!) version.

A few years ago, I started up PowerPoint on a new installation of Office and it greeted me with a big box in the middle of the screen that offered three choices. I don't remember exactly what they were, but they were something like 'Open an existing PowerPoint Presentation', 'Create a New PowerPoint Presentation', 'Run the Tutorial'. (I admit that such screens drive me mad, but accept that they have a valuable role for novice users who don't really know what to do with an empty document or a bare menu bar. So as long as there's a reasonably obvious way to turn the dialogue off forever more . . .) The weird thing was, I tried clicking on 'Create a New Powerpoint Presentation' (repeatedly), and nothing happened.

This is incredibly confusing and off-putting behaviour. I don't know how long it took me to take my eyes off the prominent box in the middle of the screen asking me what I wanted to do, but it felt like a long time. As some readers will already know, when I did, I eventually noticed Clippy at the bottom left asking whether I would like to 'Begin using PowerPoint now'.

Words fail me at this point, though curiously they didn't at the time!


iWork '08: Numbers Rocks!

I've been trying iWork '08. I never really bothered too much with previous versions, because

  1. I was locked into a world in which I pretty much had to use Microsoft Office for reasonably realiable interchange of documents with colleagues (though reasonably is the operative word here; it was our frequent experience that documents were not really interchangeable between different versions of Office even on PCs, were rarely interchangeable between Macs and PCs if they included graphics (or, of course, any fonts other than Arial and Times) and were not even always interchanged correctly between colleagues using ostensibly the same version of Office on Windows machines!)
  2. the most praised part of iWork was Keynote, and many conference organizers like speakers to provide slides for use on a resident PC-PowerPoint combo; the last thing you want is to turn up and find that your slides aren't as prepared.

However, with iWork '08 came not only enhancements to Keynote and Pages, but a new spreadsheet (Numbers) supporting a fundamentally new paradigm—multiple grids on a single sheet. This was simply too interesting, especially now that I've left my old company and have more freedom to choose the best tools rather than the most widely used. I had to try it.

I dived straight into Numbers and this single innovation of allowing different grids on a single sheet has immediately freed me from a world of pain. With (Microsoft) Office, for simple layouts I would just use Excel, making frequent use of merged cells to allow different alignments down the page, but this was always unsatisfactory. For anything complex, I would always be reduced to doing they layout in Word (never trivial, since Word always thinks it knows what I want better than I do), pasting in individual tables tortuously with 'Paste Picture (Enhanced Metafile)', as the only way of getting the picture to look anything like it did in Excel. (In passing, what is 'Paste Picture (Windows Metafile)' good for? It seems to translate as 'Paste in such a way that it will look hideous in your document'.)

For my initial uses, Numbers has been marvellous. I reproduced an invoice that I had previously done in Excel in a fraction of the time, managing in the process to achieve exactly the layout I had wanted but had only been able to approximate in Excel. Being an invoice, this exercised only fairly basic functionality (simple calculations, simple formatting, a graphical template, alignment, page footer), so I have no idea how Numbers will perform when heavier number-crunching is required. But so far, it has been a joy. It did take me a couple of minutes to figure out how to get rid of the (very faint grey) gridlines that Numbers seems to add when you import an Excel spreadsheet, but after that it has been plain sailing.

What's remarkable about this, to my mind, is that I rate Excel as head and shoulders above the other components of Microsoft Office. In fact, Excel is by far the best Microsoft product I've ever used. By and large, it works and stays out of the way once you turn off its most annoying features. I rate PowerPoint next best of the office bunch, vastly improved over the years. Although I think it's hard to use, the fact is that if you spend enough time with it, you can usually get PowerPoint to do what you want (though I've never found a way of stopping it capitalizing first words of bullet lists other than manually correcting its corrections). Like Word, it is sensationally inept at nested lists, and its handling of colour schemes is enough to test a pacifist's commitment to non-violence, but it gets the job done. Only Word and Outlook truly show Microsoft at its idiotic, interfering, clueless worst.

I shall be most interested over the coming weeks to see how I get on trying out Numbers, Keynote and Pages in anger. I'm sure there will be problems and limitations, some infuriating, but so far, after brief exposure to each, things are looking amazingly good.


Wednesday, September 05, 2007

Crashes Exporting vCards from Palm Desktop on the Mac

Summary: Exporting from Palm Desktop 4.2.2 in vCal format crashes if an address type is set to None.

I've used Palms for a long time. I'm on my fourth, this one a Palm T|X, but previously it was a Sony Clié, and before that a Palm Vx and before that a Palm V. And I've synchronized these with many different things, on different operating systems. There's a lot of data there, and some of it is pretty long-lived, and who knows what's messed with it. Still, it functions fine in the Palm. At the moment I'm running Palm Desktop v4.2.2 on an Intel PowerMac.

Anyway, one thing I quite often seem to need to do is to export my addresses into vCards. At the time of writing, I have 852 entries, in about 20 categories. And the problem is, it crashes for some categories. This has been driving me mad as I've had to do manual binary searches to find the offending record in each category. And even, when I do, there's never anything obviously wrong with it.

Well, I think I've finally found out what's causing the problem.

It seems that my Palm Desktop crashes when it trie to export a vcard with an address whose type (on the drop-down above the address) is set to None. Fix that, and all is well.

Why would the type be set to None? Search me.

Saturday, February 10, 2007

How I Learned to Stop Worrying and Love the Mac

My first contact with the Mac came pretty soon after its launch. I was a machine code hacker schoolkid at the time, but worked during holidays for my local education authority, in a unit run by a rather far-sighted guy called Bill Tagg. Bill got hold of a Mac and sent it home for a week with each person working for him saying “This is the future of computing. Absorb it.” At that time, my main experience was on a CP/M machine (Research Machines 380Z, mostly hacking Z80 machine code), and the Acorn BBC Micro, which was an amazingly advanced machine for its time, based on the 6502 (for which I also wrote scads of code). The Mac struck me as beautiful and wonderful and I recommended it to lots of people―but it wasn't for me. It seemed to me that Apple had just done too good a job of making it easy to do what they wanted you to be able to do, and somewhere between difficult and impossible to do anything that they didn't want you to do. Other than that, the only thing I really didn't like about it was the fact that to eject a disk you had to drag it into the trash. (What is it with that?)

Over the next 20–25 years I used computers pretty much every working day, mostly Unix machines at first, (Suns and Silicon Graphics on the desktop, and a regular zoo of Unix servers) later augmented with a long sequence of Windows laptops. But during all the time that elapsed between perhaps 1983, when I gave up on my BBC micro, and 2003, when I bought an iMac, it never occurred to me to buy a computer for myself.

At some point, Apple announced OS X, and I heard it going to be based on BSD Unix. That was interesting. But being Apple, I was pretty sure they'd remove shell access or something, and didn't really think too much about it. Then they launched the iMac G4—the white one with the hemispherical base and attached screen that looked a bit like an anglepoise lamp—and it was probably the most appealing-looking computer I'd ever seen. (My wife thinks it's ugly.) But still, they'd have it all locked down, right?

One day, I had half an hour to kill in John Lewis, a department store, in Edinburgh. I went to the computer section and found an iMac and started clicking about, for the first time in years. Straight away, there were two welcome experiences. First, the pointer followed the mouse properly. Secondly, the mouse had zero buttons: you clicked with the whole mouse. Genius. My son learnt to use the zero-button mouse fully 18 months before he could master one with actual button.)

Then I clicked around and found the Applications folder. I clicked a little more and found the Utilities folder, just in case there was a shell there. I looked under S (for shell); no dice. I checked B too (for Bash or Bourne), and C (for C-Shell) and T (for tcsh) and kind-of K (for ksh, though that might not have done it for me) and was just about to give up when I noticed something called 'Terminal'.

I clicked it, and a shell came up—tcsh, in fact. Interesting.

So I typed bash…and bash came up. Very interesting.

So I typed emacs (how insanely great would that be?)…and Emacs came up—in the terminal window, admittedly, but hell, it was a proper Emacs 21 or somesuch. Just there.

My memory gets slightly hazy at this point. I suspect I typed python and/or perl next, and they worked too, but I'm not sure. Within 60 seconds of the Emacs moment, I was buying one.

Imagine, a real Unix, with a Mac GUI, and an industrial design that meant a thing of beauty was going to sit on my desk. (And really the only severely painful thing since has been case insensitivity in file names…but even there, I have to concede Apple's right for the masses.)

Now don't get me wrong. Not everything is wonderful on the Mac. The Finder sucks like everyone says (though strangely I have no problem with the Dock, as long as it's augmented by something like TigerLaunch). I think way Apple failed to acknowledge or entice the Konfabulator team when they launched the Dashboard was off, and never understood the thing about hiding widgets away in a separate screen anyway (what's with that?). isync is terrible (or at least it was…I haven't used it for years). Swapping documents between the real world and the Mac is sometimes painful, and you can never be sure hardware will just work with a Mac (my wife's excellent Sony Handicam with its non-standard MicroMV format won't talk to iMovie directly, for example), and even syncing a Palm is no walk in the park. And what is this insanity about not letting you pull a disk or a flash drive out without getting the systems permission? But really, overall, these are small gripes, along with that dragging disks into the trash thing. (But at least the Trash Can turns into an eject icon these days, and you can control-click the disk instead).

Three years on, that iMac was full, and slow, and still USB1.1 (though lots of bonus points for Firewire), and not really expandable. So now I'm on a Twin dual-core 2.66GHz PowerMac, and damn it if almost everything didn't work ninety minutes after plugging the old and new together with Firewire and saying “Go”. And the iMac? My six-year old son is in love with it, and we'll probably get another 3 years out of it.

Thursday, May 18, 2006

Java 1.5 update broke my xalan

Slightly against my better judgement, I allowed the mac to update Java from 1.4 to 1.5 the other day. Everything seemed OK at first. Then I tried using xalan for some XSL Transformations and they failed.

I'm a bit puzzled by this, as the copy of xalan I'm pointing to is from fop (0.20.4), which I have installed. I could understand that if I had been using the copy of xalan supplied with Java 1.4 and upgraded, its behaviour might have changed --- especially since xalan isn't supplied with Java 1.5. But it seems odd for the behaviour of xalan, sitting in a fixed jar file to change.

Anyway, what happened was that some XSLT code that I've used successfully with lots of different XSLT processors (xalan, xt, xsltproc etc.) suddenly barfed with the following error:

XSLT Error (javax.xml.transform.TransformerException):
Can not convert #RTREEFRAG to a NodeList!

After googling, it seems that the abandoned XSLT 1.1 and the new-ish XSLT 2.0 have both removed the XSLT 1.0 result tree fragments, which was the former type of parameters and variables.

In my case, the solution, rather oddly, was to convert this:

 <xsl:call-template name="showlink">
     <xsl:with-param name="link">
         <value-of select="."/>

to this:

 <xsl:call-template name="showlink">
     <xsl:with-param name="link" select="."/>

Clearly, in this case, the working code is shorter, but I'm not looking forward to all the conversions. And I still don't understand why merely upgrading java has somehow changed fop's xalan to xslt-1.1 or xslt-2.0 or whatever.