Wednesday, May 19, 2010

Beware of this code. I have only proved it correct, not tested it.

Reimo found a bug in my bit shift implementation today. It took nearly 3 hours to figure out what it was about. And it was a nice one - not something stupid, but rather something that did actually take some ingenuity to piece together. Basically, one sub protocol was faulty - but with probability 1 over 2^32 so the bug would not have occurred.. except I had used the protocol in a way that magnified that error to one half under certain cases.. Thankfully, Reimo found these cases and figured out the pattern of how to reproduce the error. If he had not, I would have easily spent a week without figuring it out. And I am fairly sure it would have passed academic peer review in the paper without any problems.

Today was the first day in Aarhus that the temperature rose above 20 degrees. It was a nice early summers day.. about time, considering how envious I have been over the weather in Estonia for quite some time already.

I have wanted to talk about cycling here for quite a while.

First of all my bike. On the plus side, it is very light. It has wide wheels but due to its lightness, I still quite often just glide past other cyclists who are actually pedalling while I am not. On a minus side, Its gear system is fairly bust so only the central gear can really be used.. and it only works when the bike is going fairly slowly.. so in effect, there is an upper limit on the speed at which I can pedal myself up to.. which is not nice since it is somewhat lower than I would like.

Now, most roads have bike lanes on both sides of the road. I have gotten so used to them that I now get confused whenever there isn't one. There is a negative side to that too - namely, to make a left turn, you have to go along with the pedestrian traffic, which usually means waiting for two lights instead of just one (as it is for cars).

The lanes see a fair bit of use, however. I have waited with 10 cyclists for a light to go green.. And I usually drive past at least 5 on my way to the university. The lanes are fairly tight in some places and the passing maneuvre might be fairly tricky on some occasions. Also, the lanes are used by scooters.. so one does have to be careful when trying to pass someone as he might otherwise well get reared by a scooter.. which is not nice..

I discovered that on my way back home (which is mostly downhill), I can get down to the next intersection precisely for the time the light is green if I pedal myself to full speed before the slope and then bend down to a low position and just speed downhill. This of course assuming my leather jacket does not start flapping in the wind.. otherwise, I just barely miss it.

Also, when my grandfather heared I was in Denmark and was driving a bicycle, he remmembered something from his youth. When he was a small boy, his father, a sea captain, frequently visited Denmark. Since they did not really have bicycles in Estonia yet, it was quite common for sailors to steal them from Denmark (where the streets were full of them) and bring them back home. So for all we know, Estonian sailors might be to blame for the bicycle locks being invented and becoming commonplace :P

No comments:

Post a Comment