Daylight hours in C#

I was writing some code to find out what the daylight hours were.  Thanks to www.earthtools.org I was able to do this quite easily using their webservice.

Here is the code that I came up with, you pass in latitude and longditude plus the day and the month to get an answer.  It works like this:

class Program
{
    static void Main(string[] args)
    {
        sunReader reader = new sunReader();
        sun data = reader.getDaylightInfo(52.1992, 0.1274,
            DateTime.Now.Day, DateTime.Now.Month);

        Console.WriteLine("Cambridge Dawn: " + data.Dawn);
        Console.WriteLine("Cambridge Dusk: " + data.Dusk);
        Console.ReadKey();
    }
}

I have tried to follow the restrictions from earthtools.org, so this example has some very basic caching (saving results to disk).  But it seems to work good enough for the hobbyist type stuff I'm using it for...

An hour of code

I was writing some movement detection code in C# that watches the image from my webcam.  I tried it out on myself whilst writing some code in Costa one morning.  Each time I moved sufficiently, the code saved a copy of the image, this is what I got:

An hour of code

So ... now I know what I actually look like when I'm coding.

Sorrento Rainbow

When we visited Sorrento last week, we snapped this rainbow that appeared at the end of the main street, nice!

Sorrento Rainbow