Saturday 29 March 2008

The toys of software construction


The complete set of .Net Framework tools can be found here. Although most of them are built into Visual studio or disguised by it, There are a plenty of them which can come in handy at deployment and security.

Saturday 15 March 2008

Snake - 'Beta' for Compact Framework 2.0

Feeling bored that I didn't have a snake game on my phone, I wrote one for it. It just took me a day to write it and another day to polish and refactor code. There's nothing great about the features. It's just a simple snake game like the onez you 'used' to get in nokia 3310 phones, which is almost extinct nowadays.

However on the technology side,

there are two things i could accomplish.

1] I wrote a double buffering mechanism without utilizing any libraries or using DirectX. Yes!, This sample runs on plain and elegant 'winforms'. I've also used a separate mechanism to control the frame rate of the game / render loop () :-).

2] I used Asynchronous programming to smoothly fire off a pseudo-random generator , while the render loop continues in the same thread.

snake - 'beta' (simply because there aren't any great features and i don't intend to put any, unless i find myself awake on a summer night at 3am and completely jobless)

Sunday 9 March 2008

'System.IO.FileNotFoundException' while loading from Resource File (Pocket PC)

You get this exception when u try to read a bitmap from a resource file in compact framework. Even though the app. works fine, the exceptions can scare you , as it did for me, it seem to puzzle me and constantly psyched me, making me feel that i was doing something terribly insane ,therefore challenging my intellect.

A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.dll




After painstaking analysis and innumerable Google searches i find the problem was with the CF CLR . the CLR tries to load two satellite assemblies and fails before it loads them from the current assembly (manifest resource). It's actually an issue with the .NET CF and the bug can be found here. Hmm, now i can go to bed peacefully..CF Team kiss my chaddees , bloddy hell innit?