ReBuildAll Blog
Thoughts (mostly) on .NET development

Ludum Dare #25   (CubeHead)   
Long time no posts here. Will have to try and revive this blog. Maybe after I finished my Ludum Dare game :) The game is written in HTML5 and Javascript. As per LD rules, source code will be available after it has been submitted.

You can read more about my entry here:
More info here

Visit the Ludum Dare pages if you are interested in playing or want to grab the source.
Villanus Haerfest

As mentioned above, the game uses HTML5 and Javascript. I recommend Chrome, but IE9+ or FF should work also.

The PlayStation leap year of 2010   (CubeHead)   
I read yesterday about a problem with some of the Sony PlayStation 3 consoles. While I am not affected - having no such console in my possession - I was wondering what caused it. Today, I also read the explanation of what caused the problem. From the PlayStation blog:

We are aware that the internal clock functionality in the PS3 units other than the slim model, recognized the year 2010 as a leap year. ...

Now I wonder how on earth can something like this bug be programmed? I mean the algorithm is pretty straight forward. Even if you neglect to take the exceptions into account, recognizing 2010 as a leap year seems like ... well ... stupid?

The rule is BTW, if year evenly dividable by 4, its a leap year, except if dividable by 100, when its not, except if dividable by 400, when it still is. I remember it very well, because we have coded that in first year of university :) It was even used to demonstrate the ?: operator of the C programming language.

Anyhow, neither 10 nor 2010 satisfies this of course, and this is not a really hard algorithm. Even if you overlook the 100 and 400 rules, I simply cannot imagine how can you code this wrong? Any ideas? :)

(Actually what is even worse than the existence of this bug is the following. Because the PS3 Slim was not affected, obviously someone fixed this error later on, and still earlier models were not updated! Or maybe they just replaced parts - either software or hardware - with new ones in the Slim model, and those were already working? Who knows ...)