Friday 27 July 2007

The Back of Your Head

When I was a child, my mother had two mirrors inside opposing doors of her wardrobe. When you opened both doors at an angle of roughly 90° (facing each other), you could see what the back of your head looked like.

Even more intriguing was the Droste effect that resulted from the recursive bouncing back and forth of light between the mirrors. There were infinitely many me's getting progressively smaller! I also remember staring at my mother's tins of Royal baking powder. Each tin had a picture of an identical, but smaller tin on it. And on this tin, there was a picture of another tin. I remember squinting my eyes to see the picture on this third really tiny tin. Although I could not see it, I was convinced it must there.

These were my first encounters with recursion. I would meet it many times more. For instance, on the cover of Pink Floyd's album Ummagumma. (Apart from repeating, the band members also switch positions in every nested photo.) Of course, recursion is also found in computer science. Here it refers to the practice of defining a function such that its definition contains a call to the same function.

The past week I kept coming across programming problems for which recursion gives an elegant, easy to implement solution. Every time I do, I cannot help giving a little whoop. My colleagues assure me that this is very uncool. After all, we all have seen recursion many times before. I disagree. Every now and again, I think it is good to delight in opening that wardrobe to see what the back of your head looks like. Even if you have seen it many times before.

Sunday 22 July 2007

Walking the Dog - Part II

Apparently I am way out of touch. In a previous post, I wrote about the revelation I had regarding contemporary dog owners in European cities.

Yesterday, I was again doing my rounds in the neighbourhood park with my baby boy. On my way there a cyclist towing a doggy trailer flashed past. "Oh look, a cyclist towing a doggy trailer... Hold on, a cyclist towing what?!" This was no home-made effort either. No sir, this was a commercially made kennel-on-wheels. I put myself at ease by reasoning that if huskies have been pulling sleighs for hundreds of years, then this dog is just getting some justice for his northern cousins.

No sooner had I forgotten about the trailer encounter than one of those dog-in-a-baby-carriage-ladies appeared. Not being naïve enough to be thrown again by this sort of thing, I didn't winch. Only, it wasn't a baby carriage. Her canine companion was getting a free ride in a pushchair specially made for dogs. As with the trailer, there is a company out there that earns revenue making buggies for dogs. Fascinating. Right?

When I got home, I told my wife about my amazing discoveries. She said she had recently seen an television item about a dog boutique. In the very city we live in! Go figure, doggy couture. Here is a million dollar idea: a dog breed with a Burberry plaid or Yves Saint Laurent chequered coat.

Getting the Work Done

Last Friday my wife needed the car, so I worked from home. With me I had some source code for a research prototype that I had been working on. I got up bright and early, started up my C++ compiler and started "working".

There was just one problem, at home I have a different compiler than the one I use at the office. The source code that compiled without any problem at work now suddenly gave me linking errors. I quickly went through the list of usual suspects (circular inclusions of headers, outdated object files etc). To no avail. A few hours later I was still scratching (banging?) my head and loudly sighing in self-pity. (Of course, at least to some degree, by now it had also become an issue of pride and outsmarting the compiler.)

My wife came in and asked "what's wrong?"
"I'm not getting any work done,"
I said.
"What do you mean? You've been sitting there since 7 this morning."
I grunted in frustration, "Yeah, but I can't get it to compile and I can't find the problem."
"Well, you're still working."
"But I'm not getting any work done!"
"But honey, searching for and solving problems IS getting the work done."


I finally did solve the problem (with a workaround). But I'm still not convinced that dealing with different compiler idiosyncrasies is "getting the work done". Maybe I am just too impatient (another point my wife never fails to emphasize).

Sunday 15 July 2007

Scones

Last weekend I suddenly had an irresistible urge for scones. Having lost my mother's recipe, I googled "scone recipe". The first result was a link to BBC Food. Once again my favourite broadcasting corporation delivers!

About forty minutes later we were feasting on scones hot from the oven. The only minor issue was that we did not have any cream. As any scone lover would attest, scones are best enjoyed with jam and clotted/whipped cream (and washed down with tea).

The photo at the top left is of yesterday's (double) batch. This time I made sure that there was ample cream.

Monday 9 July 2007

The Times they are A-Changin'

Well, the times certainly are changing. When he brought out a cover version of A Hard Rain's Gonna Fall, Brian Ferry did the world a terrible injustice by releasing what is in my opinion one of the worst Dylan covers to date. Fortunately, on his most recent album there is one of the best covers of The Times they are A-Changin' I have ever heard. I guess we'll call it quits then.

Saturday 7 July 2007

Skwish

A few weeks ago I bought myself... Wait! Let me start over. A few weeks ago I bought my son an awesome toy: a Skwish. The Skwish is based on the principle of tensegrity - a term first coined by Buckminster Fuller - and was designed by Tom Flemons, founder of Intension Designs.

The term tensegrity is a contraction of "tensional integrity" and refers to structures that get their strength by a clever (and often elegant) combination of tension and compression elements. Man, I can't wait to explain this to my boy when he gets older! This is what I will tell him:

The toy is made from wood and elastic cord. There are six wooden rods grouped into three pairs. The rods in every pair are parallel to each other and every pair is positioned orthogonally to every other pair in 3D. Elastic cord keeps the rods in position (tension). The rods, in turn, keep the cord from collapsing into a shapeless heap (compresion). This results in a structure that is quite agile; you can pull and twist it, but it will always rebound to its original shape.

Every rod is capped on both ends by two ellipses and is threaded trough another that is free to move over its length. This makes a nice sound that my son likes. The colours used for the rods and beads are not incidental either. Quick analysis shows that the designer uses the three primary (red, yellow, blue) and three secondary colours (green, violet, orange). Every pair of parallel rods and their spheres are coated in complimentary colours (pairs of opposite colours on the color wheel; red:green, yellow:violet, blue:orange).

I hope my son has as much fun with his Skwish as I did. As long as he knows that when he grows tired of it (how could he?!) it goes back on my shelf.

Thursday 5 July 2007

30 Cents

At work there are two quick ways for me to get a cup of coffee.

About five meters from my office door there is a coffee vending machine. You put 30 cents into the coin slot and about 15 seconds later it presents you with a cup of the most vile "coffee" I have ever tasted. The term "muddy water" comes to mind.

I can also run up two flights of stairs to the canteen on floor eight. There you take a paper cup, put it under a spout and press the button labelled "Koffie". About 10 seconds later you can take your cup and proceed to the cash register. Once you're there - provided you have correct change - you just plonk your 30 cents on the counter and yell "Doei!" Usually, you're answered with another "DOEI!" from somewhere in the back.

When I opt for the first, I usually regret it. When I opt for the second, I leave sipping my beverage feeling very satisfied. Perhaps because I grew up in a large city where no one ever trusted me to "just leave the money on the counter". (The coffee is not bad either.)

Monday 2 July 2007

Mentors - Part III

My PhD adviser gave me the following word of advice today:

"You're a father now. That means at home, you're last in line. You're at the bottom of the pecking order. Get used to it."

I guess that is another quality of a mentor - when necessary, they can be brutally honest ;-)