Sunday, August 5, 2012

Child Stoker In Front Tandem

The tandem is finished! It has been tested on a trip through Denmark and Sweden and it worked very well! This bike has become our workhorse with daily distances varying from 10 to 40kms.

Brush painted - I quite like the rough surface of Hammerite paint.

Saturday, April 28, 2012

Child-In-Front Tandem

I started drawing up a new tandem. The tandem takes a captain at the rear and a child stoker at the front. It is meant as a replacement for the stokid python, and should solve one mayor problem: with Vincent in the front we'll be able to watch over him.

Thursday, April 12, 2012

Awaitable Queues Part 2: Unbounded Awaitable Queue

As a first attempt to write an awaitable queue, the queue is unbounded. The producer side of the queue is then synchronous and we can concentrate on making consumer side awaitable. The code for the can be found at the end of this post.

Wednesday, April 11, 2012

Awaitable Queues Part 1: API

This is an experiment to see how an efficient asynchronous queue could be implemented. The natural way to implement an asynchronous queue would be using Tasks. But using Task objects can be wasteful as this would mean one or two Task & TaskCompletionSource objects allocations per queued element. Allocations are fast, but that is only because payment for allocations is done down the line when the garbage collector needs to collect the objects.

The await keyword of c# can be applied to any object (not only Tasks), and because these objects can be reused it should be possible to build a less wasteful version of an asynchronous queue.

Saturday, April 7, 2012

Accident on the Stokid Python

Missing spokes....

We are having a pause riding the stokid as we got into an accident (20/3/2012): Vincent was racing his "motorcycle" on the rear of the bike by lying low over his steer. To be even more "aerodynamic" he lifted his feet up to rest on the seat stay tubes.

Unfortunately his right foot got taken by the turning wheel and he got painfully stuck between frame and spokes. His leg was so pressed in, that I had to cut the spokes away from the wheel to get him loose - luckily a gardener passed by and the man had the right tools on him. He kindly transported us to the hospital.

Stokid Python painted

Wednesday, February 29, 2012

To Roll or to Panic, that is the Question

A Sunday Roll

Last Sunday, Bent, Tine and I decided to paddle a tour on Odense Fjord. The weather was fantastic and Tine told me the water was about 2°C. This might sound very cold, but I am equipped with a neoprene long john and dry jacket, and as an exception I even had my neoprene gloves on (instead of the pogies I usually use). I tried falling in similar water temperatures and it is not all that bad.

The tour was relaxed, and with the February sun warming us we were having a great time.

At the end of the tour I wanted to try out rolling my kayak in the canal in front of the club house. It would be my first time I'd roll outside of the swimming pool and the first time to do it in my own kayak. I found it such an exciting prospect that I was willing to overcome the coldness of the water. I felt like I had 50% chance for the roll to succeed and expected that I would need to do a wet exit.

Friday, February 24, 2012

My danish rye bread recipe

Here is a recipe of basic danish rye bread ----there are so many recipes around; everybody seem to have developed their own. But anyway, this one is mine and truly the best one! (only joking!)

Thursday, February 16, 2012

Locking Style for Concurrent Programs (c#)

As a job I do a lot of asynchronous programming. I have been working intensively with multi threading some 6 years now (before that I did programming on Unix in c++).

As a consequence of the problems I encountered during this 6 year period, the way I use locks has changed a lot. The most recurring problems were:
  • deadlocks.
  • pumping on the UI thread. When the UI-thread waits on a lock, the runtime can decide to start pumping on that call stack!!! This way *any* code can be called from nearly any point in your code. This can easily cause deadlocks or other (crazy) faulty programs because of unexpected reentry.
  • performance: I used to take my locks over longer periods of time. For example during doing I/O or remoting to get some kind of serialization behavior. Instead it has shown to be a better idea to schedule work where possible, as it is often not important when something really happens.
I adopted a certain style when writing code with locks, in effect limiting the way in which locks are used. They are now used only to protect against concurrent access of fields and possibly to order the task scheduling. This style forces me to use other (higher level) constructs for coordination. This style has served me well in writing cleaner concurrent code.

Monday, February 6, 2012

Replacing the seat in my nelo inuk

When I bought my nelo inuk kayak, I knew very well, that the factory seat was too narrow for my wide hips. I could just about fit in between the vertical edges, but could only rotate little bit in the seat.

So I decided to replace that seat with a high back racing seat. Peter Unold did the same thing a few years ago, and he used a board as a base for the seat. This increases the seat height, making the boat more tippy. I tried to install mine without changing seat height.