Arnt Gulbrandsen
About meAbout this blog
2011-07-30

Truth is beauty, beauty is truth

I'm throwing away old books. The room with all the old bookshelves is getting a new life, and in the process of moving the books to the new shelves in a different room, some books… don't come along.

One such is Beautiful code, an anthology to support Amnesty International. I bought it for one chapter, Code in motion, in which Christopher Seiwald and Laura Wingerd elaborate on Christopher's earlier Seven pillars of pretty code (go read it, it's good).

I want to throw the book away. The other chapters are just so much filler. But I can't bring myself to throw away the figures on pages 534 and 535, those are too valuable. Must have those.

Some of the code I've written since 1992 (when my first significant contribution was accepted into an open source project) is still there, bits of it heavily used. The parts of my code that goes on working without much change shares one characteristic: It reads clearly and easily. It's well-documented, well-commented and there's hardly any nesting.

I spy a causal relationship: Truth is beauty, beauty is truth.

2011-07-29

IPsec VPN between Mikrotik RouterOS and an Amazon VPC

This post describes how I configure IPsec tunnels between Mikrotik routers and VPCs (virtual private clouds) hosted at Amazon AWS. (more…)

2011-07-28

catch( Exception e ) { throw new Exception( e ); }

Some Java book I read long ago, I think it was Thinking in Java, explains that one of the benefits of Java exceptions is that you can shift error handling away from the normal path, leaving the implementation of the common case clearer and better.

Fine. There's just one catch: You have to catch the exceptions and handle the error somewhere. (more…)

2011-07-25

Amazon Prime: The game

The Amazon Prime game is an odd kind of game: The players are Amazon and myself, but the winner is usually either DHL or UPS.

The rules are as follows: (more…)

2011-07-18

No suing Magura

I have a new bicycle. A marvellous new bicycle. It has front and back lights that work well enough to not annoy me, a gear shift that's just as good (as well it should be) and brakes that stop me when I want to stop, even when I'm pedalling 160kg.

Why is this marvellous?

But the true wonder is the manuals. (more…)

2011-07-07

TV-b-gone SHP

Leaving the offices of customer.com today, I pressed the button half a dozen times. (For some reason, customer.com's planners thought it best to litter the offices with giant TVs, most turned on, all muted. There's a corporate espresso bar with seventeen corporate television sets. Really makes one wonder.) Walking to the hotel, I pressed the button a few more times.

Just as I was entering, I saw one last TV, reached for my tv-b-gone and... nothing. An employee had turned the TV off as part of closing for the day.

I'm not sure how I feel. Puzzled to have seen someone turn a television set off. Happy to have seen it happen. And somehow cheated.

Update: What a pity the TV-b-gone is too slow for drive-by actionism.