November 2001

« October 2001 | Main Index | Archives | December 2001 »


I invented a new term at work today:

Code Tonsils: n. pl. Those parts of a program that were once useful, but now the application has been refactored and no longer requires them. Code tonsils are annoying - you spend precious time healing them when they become infected. If you recognise code tonsils, you should surgically remove them.

Four of us were sitting in the board room, watching the building across the road. They've knocked down most of the bottom floor, it's neat looking in to see what the hell's holding the building up. Anyway, I'm not entirely sure how this conversation started.

David Roze
So that makes us Observers?
Charles Miller
Maybe... looks out the window at the guy working the tractor No, if we were Observers, we'd have to register with the Observable so they'd know to send us events. It's more a publish-subscribe architecture? They just put their actions out, without knowing who is going to be consuming them.
David Pinn
Then that would be the Mediator pattern

I later decided that the building must be written in C++. If it was written in Java it wouldn't need to be destroyed manually, you'd just vacate it and wait for it to be garbage-collected.

I have the theme tune to Captain Pugwash stuck in my head. (Oh, and that's an Urban legend, I had to look it up, but the characters are Willy, Barnabas and Tom the Cabin Boy)

Good Deeds

  • 12:49 AM
On Sunday afternoon, I was walking up the road to the laundromat when I found a wallet lying on the sidewalk. I looked at it. I looked around for the owner. I looked at it again. I looked around for hidden cameras in case this was some Current Affairs show doing an honesty test. I looked around for the owner again. Finally, I picked it up. Inside there was about seventy dollars in cash, and about a hundred and fifty different credit-cards.

I spent the rest of the day grumbling about this. When you pick up someone's wallet, you're taking responsibility that you don't need. I had to search for the guy's phone number. I eventually found his girlfriend's mobile number in the wallet and left a message, knowing that it'd be really annoying for him if he cancelled every one of those cards. I left a note on the car nearest to the wallet.

This morning, the owner popped by the office to pick it up. The dude works for Nestle. I now have more free chocolate than you have ever dreamed of.

I'm ironing to Nine Inch Nails, standing there humming "Bow down before the one you serve" while I get my shirt flat enough to go to work. I wonder how Trent Reznor would feel to know he's ironing music?

Then again, Trent's probably far too rich to do his own ironing, so he can just piss off.

For a while, Radiohead's Creep was one of my favourite songs.
It was duly taken to the band, but no-one seemed that bothered. "When it was recorded," says drummer Phil Selway, "we didn't even know it was being taped - we were just warming up for another track by it. The reason it sounds so powerful is because it's completely unselfconscious."
What arguably took 'Creep' into an unforeseen dimension were the moments when Jonny Greenwood made that alarming crunching guitar noise. Tellingly, it was an utter accident. "That's the sound of Jonny trying to fuck the song up," laughs Ed O'Brien. "He really didn't like it the first time we played it, so he tried spoiling it. And it made the song."

It's amazing how much we owe to accidents :)

Posted on the blog while Livejournal was down...

(6:17:46 PM) I've just been spammed. I'm not sure which is worse - the offense of receiving unsolicited advertising, or the fact that the first line of the message was "WE DEEPLY APOLOGIZE IF THIS E-MIAL COST YOU ANY INCONVENIENT"

(2:31:12 PM) From NewsForge: MS admits IE security lapse. A month or so ago, Microsoft was telling us that the responsible thing to do was to not publicise security flaws in its software. Now we see what they do if the flaw is kept secret from the public and only reported to Microsoft - they deny they even heard of it.

According to the advert on TV, the nominations for 2002 Australian of the Year are now open. I was going to ask everyone to nominate me, but I've changed my mind and think everyone should nominate azhreia, because she deserves it, I don't.

A note to DVD-makers. Interactive Menus and Scene Access are not Special Features

I was watching Merlin on TV. I watched about five minutes of it, the script was awful, the acting dire, and the special effects worthy of 1970's vintage BBC shows. I turned over to watch The Sound of Music instead, and resolved to go out and buy the DVD of Excalibur.

I'm wondering if it's possible to write poetry in XML.

Photoshop Tennis is really pretty cool to watch.

Just in case you ever get lost in Australia, the Commonwealth Government has made this important service available.

I've just been ordered to turn off Ricki Lake by my best friend, who generally knows what's good for me far better than I do. Tonight's topic was "Straight women who can't resist lesbian studs".

What amazes me is the people who sit in the sound-proof booth for the first half of the show, waiting to be brought out to discover the real reason they're there. I mean, anyone who knows anything about these talk shows has to know the moment they go in there, you're not there for the reason you were told last week.

After five minutes of sitting there with the headphones on, knowing your girlfriend/boyfriend is out the front, you've got to be starting to think "Ohmy God, she's sleeping with my grandparents."

It all started at 12:30 this afternoon, when I told David Pinn (with whom I was pair-programming at the time) that it was time to Sandwich());. Unfortunately, this wasn't the end of it, I'm going to detail below the train of thought I had on the way down to get my chicken and salad roll, as I tried to work out how best to model my lunch activities.

My first thought was to start off with the simplest thing that would possibly work:

public interface SandwichShop {
    public Roll getRoll(Roll roll, Money payment);

There. Simple. You tell them what you want, give them the money, and they hand the roll to you.

The problem is, it's not how the shop works. It'd work in a lot of shops - you grab your CD, hand it over with some money, the cashier hands you a CD that has had compactDisc.setOwner(charles) called on it. Maybe they give you a different CD from the bulk stack behind them, you don't really care so long as the CDs are equivalent. In the sandwich shop, I don't hand over a roll, I tell them what sort of roll I want, and they make it for me on the spot. So instead, it'd be more like I was sending the SandwichShop the message getRoll(RollMetaData rollDescription, Money payment);

But it's more complicated than that. I don't give them all the RollMetaData at once. The shop needs to make a number of callbacks to the customer in order to finish the request. The obvious candidate here is the Visitor Pattern (Design Patterns, Gamma et. al. p331), but it's not quite applicable in this instance. A better layout would be...

public interface SandwichShop {
    public void accept(SandwichShopVisitor v);

public interface SandwichShopVisitor {
    public RollMetaData getOrder();
    public boolean isRollButtered();
    public boolean isFillingSalted();
    public boolean isFillingWithPepper();
    public boolean isRollCutInHalf();
    public Money getPayment();
    public void give(Object o);

This way, the shop can make these callbacks during the roll-making procedure. It can choose not to - often I don't get asked whether I want the roll cut in half at all. But they have the ability to.

The problem with this is that it doesn't scale very well to other shopping situations. For every shop you want to visit, you'll need a new FooShopVisitor interface to implement. For example, if you go to McDonalds, you'll need a wantFriesWithThat() method, and wantAnApplePie(). Even worse, the shop needs the ability to change the callback methods without having to go around and recompile all of their customers. Going around recompiling a few billion McDonalds customers whenever they wanted to change their menu would be really annoying.

A better thing to do would be to have a universal shopping interface. You could model all potential orders using RDF... At this point I started eating my lunch, and thankfully, the rest of this plan was lost.

Noam Chomsky on the War against Terror. If you have the time, (two hours, five minutes) listen to the RealAudio version of the speech, or the mp3 version since it's a lot clearer to hear than to read, (the transcript isn't particularly professionally done) and you get the question/answer session at the end.

Wired writes:

By cobbling together a handful of browser-based bugs with flaws in Passport's authentication system, Slemko developed a technique to steal a person's Microsoft Passport, credit card numbers -- and all, simply by getting the victim to open a Hotmail message.


  • 9:02 AM
I was on the train to work yesterday, and this woman on the seat in front of me was reading a magazine. It was an article about the Melbourne Cup, a horse race that happens around this time of year in Australia that everyone traditionally stops working to watch and bet on.

The article was... Choosing a horse by your horosocope. For each star sign there was a list of things to look for in the name of the horse, and lucky numbers. HELLO? It's one race. There's only going to be one winner. How exactly can it be lucky for Saggitarius to bet on 12, when Taurus has a sure thing on 3?

I wonder if they laughed their asses off while they wrote it.