I am reminded why I hate Ant

Whenever I come across a build.xml file, I think "oh no, newbies!" and wonder if there isn't some other code I could be looking at/using. Sun's JDIC is a prime example of Ant madness. That project has the worst build system I've come across, and that includes people who write .bat files or type javac *.java each time.

Last night, I was building GNU cp-tools. They use Ant. I have to edit build.xml to specify 1.4 source before it will build at all, but my editor's clever/stupid enough to use build.xml if it can't find a makefile, so I basically forget I'm having to use Ant, and just hit C-B to build like always.

Forget about Ant, that is, until I get my first NoSuchMethodError and it takes me a few seconds to realize that Ant's just screwed me. It's been carefully wasting time each build, working out which files have changed, so it only asks for those files to be recompiled, as if that made any sense.

So if I remove/rename/change the signature of a method, I have to manually clean before building. In 2004.

Likewise if I remove/rename/change the signature/change the value of a constant field. Changing the value is the worst because the VM can't notice at run-time if you're using inconsistent values of a constant field. When they're inlined, they're inlined without any indication of where they came from. That's Java's fault, not Ant's, but the proper defense is to either really understand Java dependencies or always build from scratch (which is cheaper anyway up to a few hundred classes).

So: Ant's slower, less powerful, less useful for other tasks, arguably at least as hard to write instructions for (at least make(1) uses a relatively small and simple set of primitives, rather than a different ad hoc solution for each problem, which may not include the problem you're facing), and it behaves incorrectly for the one language it's supposed to understand!


You couldn't come up with something this bad if you were one of the authors of MS Outlook and deliberately set out to do a bad job. Maybe that's it... Surely Ant must be part of an MS ploy to discredit Java?


England? Where's that at?

I remember years ago being astonished to meet someone who'd not only never read nor seen any of Shakespeare's plays, they didn't even recognize the name. I explained to myself that, well, I couldn't name a single Brazilian author, so why should a Brazilian know of Shakespeare?

I was surprised tonight, though, to meet someone who didn't know where England was. I've taken to saying "England" because "Britain" and "the UK" have a habit of being repeated back as "England?". (I've always disliked "England" because it seems so parochial. As if I'm distancing myself from our neighbors. I dislike "UK" both because it's not our ISO 3166 two-letter country code – we should be .gb – and because of its royalist implication, which offends me. I may be a citizen/subject of the United Kingdom, but I'm damned if I'm going to describe myself as such.)

Anyway, "England", I explained, "is in Europe". The look on her face said "Europe? Where's that at?", but she didn't put it in to words, and I didn't volunteer anything.

Weeks back, some old guy confidently informed his wife that I was from Montana. I wish I knew enough about local stereotypes to know if I should have been offended.


Would you like to reboot now?

There's never a good time to reboot. Why do so few of my programs try to remember their state? The web browser is perhaps the most frustrating because there's no obvious reason why this couldn't be implemented.

I excuse myself as co-author of the best Unix terminal emulator for its failure to remember any state. It simply isn't possible in general. I can't even think of specific cases where it would be possible.

My editor does a decent job of remembering what files I'm editing, and where the caret is, though it doesn't remember scroll positions. I should fix that.

iTunes doesn't remember what I'm listening to. Preview doesn't remember what I'm looking at. Adium doesn't remember what conversations I'm having.

I've been waiting over a decade for this and expect that when it finally does come, it'll come to everything overnight. I remember my excitement at Mac OS' perfect (and fast) sleep/wake. Though putting a Unix machine to sleep isn't necessarily a good idea when its cron(1) doesn't know enough to try to catch up with jobs it missed.

In the meantime, Mac OS X Update 10.3.7 can continue to wait.


"After the Sunset"

The idea of being stuck on some under-developed, over-hot, tourist-infested island fills me with, if not quite fear, then definitely loathing.

If I were a criminal retiring to spend my immense wealth, I'd be thinking "Sweden" or "Switzerland". Somewhere with classy furniture and a taste for simplicity. Landlocked would be good.

Switzerland it is, then.

I most definitely wouldn't head for the Caribbean. Not even if Salma Hayek suggested it. So for once, the use of the Caribbean as movie shorthand for "paradise" worked for me, because the point was that Brosnan was supposed to be unsatisfied. As someone who'd rather starve than eat lobster, rather suffer vitamin D deficiency than go out in the sun, and who thinks a big display and a lot of processing power is what turns a house into a home, I was going mad just watching him languish.

On a similar note, I was amused to hear a skier in Warren Miller's Impact saying something that could have come from the mouth of a computer geek. It went something like "if I ever get bored of all this, I'll maybe go to Bermuda and get myself a rad tan; until then, I guess I'll stay pale".

Mac OS X Debugging Magic

For some time I've been meaning to collect together notes about stuff I've come across that's useful when debugging problems on Mac OS. Stuff that isn't obvious and well-known to a developer from a different Unix. Now I don't have to, because Apple have published TN2124: Mac OS X Debugging Magic which contains just about everything I'd found, plus more.

The only thing I can think of that isn't mentioned there is giving -Wl,-Y -Wl,n options to GCC so Apple's ld(1) shows more information about the first n undefined symbols. Mac OS' linker isn't nearly as loquacious as Linux's, and won't by default tell you which files the symbol appears in; something I often find useful.

Although it sounds useful, I don't understand the INIT_Processes=1 hint, and Google doesn't seem to know anything about it either.


My parents were claiming that they'd been unable to hear a DVD when logged in as one user, but had logged out and logged in as another, and everything had been fine.

"Yeah, right," I thought.

Much later, I realized that the "mute" key is next to the "eject" key. I bet that they hit mute at the same time as eject, didn't see the alpha-blended icon for mute because they were busying inserting the DVD, and came back to a muted machine with no visible indication that it was muted.

They say they tried to increase the volume, but my bet is that they did so with the application's volume controls (they mentioned having tried to use iTunes also). I've never understood why applications like an mp3 player and a DVD player should have their own volume controls in addition to the system ones, and my parents seem to stop searching for volume controls when they come across the most local ones. (The applications don't change their volume indicators to reflect the fact that the system's audio hardware has been muted, nor does the "volume" they show correspond to the system's volume setting.)

Ed thinks that iTunes having a volume control makes sense if you're using AirTunes. Then the system volume controls the system speakers and iTunes controls the speakers the music comes out of. I can see his point there, but maybe the iTunes volume slider should only appear with the AirTunes speaker selection combo box.

The idea of two separate volume controls makes me realize that most of the time, I use the mute key as if it was an "iTunes play/pause" key. Often I'd prefer to still be able to hear the "new mail" clink, even though I don't want to hear music right now.

Maybe I shouldn't have laughed so hard at all those wintel keyboards with their "mail", "web", and "search" buttons? Perhaps the only thing wrong with those buttons was that the last programs I wanted to appear were MS Outlook, MS IE, and so on? If the function keys corresponded to the applications in the Dock, I might actually have a use for them. The applications I always have running would always have the same keys, so I'd know that F2 would get me Safari (which needs a Camino-like "New Window" on its Dock menu), F3 Mail, and F4 iTunes.


  • Applications shouldn't have their own volume controls. (But if they're going to do so, they should reflect the actual situation.)

  • The mute icon should stay up until you un-mute, unlike the general volume indication.

  • The mute key should have a light, like "caps lock" does.

  • The mute icon/key glyph should probably have a line through it, as on most other devices.

A related idea that springs to mind is the possibility of having a light on the eject key for machines with trays, so you can see that the tray's open even if you can't see the tray. (It's good that the machine shuts the tray for you if you put it to sleep, but what if I leave my machine on all the time?)

While I was messing with the keyboard, I'd make it more similar to the PowerBook keyboard. I'd replace F13 (why does that get a capital letter?) with "eject", I'd replace F14/F15/F16 with volume down/volume up/mute (does that order strike you as strange?), and then i'd lose the whole numeric keypad area. I could use that space for my mouse. (Why not just use a Happy Hacker keyboard? Because Apple keyboards look really nice, and because I'd miss the volume/eject keys. I actually use them a lot. Mainly just mute and eject.)

To be honest, I'd actually lose the caps lock key. And not just so I could re-use the LED for the mute key, either. I realize I mostly know computer users sophisticated enough to have used a Unix shell at some point in their lives, but I've only ever known one person who used the caps lock key. She used it ubiquitously to type capital letters, so "Hi" would be the sequence caps lock/h/caps lock/i.

She has a PhD, so I'm pretty sure she could learn to use the shift key if she had to.


GIMP Splash

One of the few applications I know that takes as long to start as a typical present-day OS, GIMP is well known for, well, its "limping gait".

The latest attempt to do something about this problem? A competition to find a prettier splash screen.

Words (almost) fail me. Welcome to the 21st century.

Maybe if we had splash screens so interesting people could stare at them for hours, we wouldn't need to bother writing applications at all. Users could spend all their available time marveling at the splash screens instead.

I was thinking we could call it "television".