Archive for February, 2006

Feb 28 2006

Long Way Round

Published by under Motorbikes

Some time last year I got a free DVD with my regular motorbike magazine, BIKE. The DVD was episode one of Long Way Round, in which Ewan McGregor and Charlie Boorman set off from London on two BMW R1150 GS Adventure bikes on a 20, 000 mile journey to New York, via Europe, Ukraine, Russia, Kazakhstan, Mongolia, Siberia, Alaska and Canada.At the time I got the DVD I wasn’t too interested and I didn’t have the time to watch it.

Last night I finally, after about six months, got around to watching it. I must say that I wasn’t too excited at the prospect of watching it but that is the last DVD in my collection that I haven’t watch (apart from Bikini Drive-In – but I wasn’t in the mood for that). Half way through the DVD and I was wanting to be there, going on that journey. By the end of the DVD I was so hooked on it I also watched the extra “unseen” footage. In fact, I also just gone and bought the full box-set on Amazon.

Now all I need to do I try and not watch it until I move into my new flat (more on that soon) so that I can watch it on my lovely 50″ TV.

4 responses so far

Feb 24 2006

Return of Monaco.ttf

Published by under General

It seems that everyday I get people coming to my site looking for the Monaco font. It was original found at http://www.pa.msu.edu/ftp/pub/misc/tek-phaser/ttfonts/MONACO.TTF (as I have been informed by DamienG) but seems to have misteriously disappeared from there.

It seems that it had also vanished from my site, as everyone trying to download the font from my site was getting a 404 Not Found error. This is because some time ago I had a move around of files on my site.

I am pleased to say that the file has now been returned to its original location and is also available at its new location:

56 responses so far

Feb 08 2006

Six Degrees Of Wikipedia

Published by under Bookmarks

I found another toy on the internet, Six Degrees of Wikipedia. It is a tool you can use to find the shortest path between two wikipedia articles. It takes its name from “Six Degrees of Seperation“.

Today I finally managed to find two topics which were seperated by six degress: Six_degress_of_seperation to Algea. Within a couple tries Damien, on the other hand, had managed to find six degrees of seperation between Alan Sugar and Bob the builder.

But he wasn’t going to stop there, another couple of goes and he found that there is no link (within the maximum of ten degrees) between hash table and Orlando Bloom. Then again, Damien has been editing wikipedia articles for some time now and has a fair idea of how the linking works.

Topics in the post:

No responses yet

Feb 07 2006

Fun With Faster

Published by under Bookmarks

I recently blogged about Fastr, the tag guessing game based on Flickr. Well, today I was playing again and getting rather good scores even if I do say so myself, when I noticed that on of the other players names was a link (something about free laptops).

So I decided to figure out how it was done. I didn’t take that long. All you have to do is instead of putting a normal play name into the textbox, insert a html link, e.g. <a href="http://www.gringod.com">GrinGod</a>

Thats all there is to it… next I’m going to see what else I can do with the play name ;)

No responses yet

Feb 01 2006

Double Imprecision In .Net

Published by under .NET

I’ve spouted on about this previously on my blog but I thought it was about time I posted some code that demonstrates some of the problems we’re up against. The problem seems to be that under certain circumstances the .Net Double data type loose its precision and gives you a number that you weren’t expecting. The chances are that the error will be out by 0.00000000000001, but that might be enough to cause an error.

The simplest way to prove this error is with a simple loop:

Dim x As Double = 0.00
While (x < 7.00)
    Console.Writeline(x)
    x += 0.01
End While

What you would normally expect is a linear progression from 0.00 to 7.00:

0.00
0.01
...
6.09
7.00

However, when the code is run you will find that somewhere in the output is some results like this:

2.28
2.29
2.29999999999999
2.30999999999999

This, as I am sure you will agree, is an unexpected result and could result in errors. If you try this exercise again but using Decimal instead of Double you will find that you get the results you expect. I’m sure there are people out there that will say that all you need to is simple rounding to get rid of the error. Sorry, but it doesn’t quite work like that and the following code will prove it:

Dim x As Double = 0.00
Dim y As Decimal = 0.00
While (x < 7.00)
    If (Math.Round(x) = Math.Round(y)) Then
        Console.Writeline("Error found")
    End If
    x += 0.01
    y += 0.01
End While

If you run this could you should get at least one error message, and probably more.

Is there a solution to this problem? Of a sort, yes. I have found that using the Decimal data type does not give the same rounding problems. Decimal also solves problems that I have had in the past with the Math.Floor() function. However, several people have told me that using the Decimal data types does incur a slight memory cost over using the Double data type. The question you need to ask yourself is “What is more important: memory or precision?“. Personally I now always use the Decimal data type. Maybe one day I’ll get around to doing some benchmarks to find out if there is a performance hit when using Decimal rather than Double… But that’s a job for another day.

3 responses so far

Feb 01 2006

Bandit Bellypan

Published by under GSF600 (Bandit)

Last Friday I received the bellypan that I ordered from BanditMania. The bellypan that I ordered was a Roca bellypan with halogen headlights. As far as I know Roca is a french after market parts manufacturer distributed by S2 Concept and I believe BanditMania is the only UK importer.

Fitting the belly pan was a simple affair. I required the replacement of several engine mount bolts in order to hold the bellypan brackets. The hardest part was wiring the halogen lamps. The instructions were to wire them up to the full-beam circuit on the bike but I decided that it would look more distinctive if they were on permanently. So I wired the lamps up to the parking light, which is on permanently. routing the wires up past the exhausts and the engine was rather interesting but it is now all in place and firmly zip-tied so it doesn’t touch any hot parts.

Now that its all fitted I must say that it does look rather good. I would recommend every bandit owner gets one of these bellypans but that would make mine less unique. I know of one other person on the island that has one of these bellypans (which is where I got the idea) but as far as I know he doesn’t normally take his bandit out.

Hopefully if it is sunny one lunch time I will be able to get the bandit out to take some photos of it. If Phrixus felt like taking some night-time pictures of it (to better show off the halogen lamps) I would complain!

One response so far