Skip to main content

Posts

Showing posts from March, 2010

6 Extremely Interesting & Creative Silverlight Hobby/Fun projects You can’t miss

In the last couple of moths or so, I’ve come across a number of very exciting Silverlight hobby/fun projects. Most of them are interesting in one way or other, and each of them involve a lot of creativity and innovation, and carries a lot of inspiration. Here is my ‘Top 6’ list for your reference. Farseer Physics EngineFarseer is a nice 2D Physics engine for Microsoft Silverlight and XNA platforms. And hey, this one is not just a ‘fun’ project, Jeff and his team is pretty serious about this. Farseer components will let you add real world effects and behaviors like Spin, Rotate, Move etc, to your objects. You can use Farseer to create pretty advanced effects in your Silverlight games.Where to get?Download from CodeplexVideo Tutorials and SamplesWindows Phone 7 Puzzle GameI simply love this. A very nice Sokoban game for Windows Phone 7, in Silverlight, from Daniel. Apart from the game, the article he has on Code project is a good starter for anyone who want to start developing apps for …

Virtual Tech days 2010: WPF Control Architecture Basics Session – Download Demo Apps and Source

I presented the topic WPF Control Architecture at Microsoft Virtual Tech days 2010, and talked about few cool aspects of WPF Controls. Also, demoed Wingy – A bare bone, less than one hour WPF client built for viewing Bing search results :).Download the source of Wingy and other demos hereSnoop Debugger/Visualizer can be downloaded From hereThe presentation covered the following conceptsContent models in WPF Data Templates and Control Templates Creating user controls and custom controls Creating dependency properties You should be able to download the presentation from Microsoft Virtual tech days website soon.http://www.virtualtechdays.comAnd don’t miss my other WPF and Silverlight Posts :). Check out Silverlight – Behaviours, Triggers and ActionsWex - WPF Extensibility HacksSlex - Silverlight Extensibility HacksHappy Coding, Enjoy.

Key Take Aways and Links from #Mix10 Keynote - Silverlight + Windows Phone 7 + XNA

Watching online the Mix 10 Keynote from Scott Guthrie. Here we go, the key take aways listed below. FeaturesWindows Phone 7 Silverlight runtime is almost identical to the existing Silverlight runtime (well, almost – SL For WM7 still miss things like DLR) . Supports media experiences Supports deep zoom WP7 initially will run a superset of Silverlight 3 with phone-specific extensions like accelerometer. Scott Gu mentioned that Silverlight penetration now at 60% (was 45% during PDC, this is news for me) Windows Phone 7 supports 'traditional' development platforms - Visual Studio 2010, Blend. Windows Phone 7 has got multi touch features, Emulator can be used for testing using Windows 7 multi touch capabilities Windows Phone 7 Development tools are Free (Did I hear that right?, yes see the link below) Visual Studio 2010 for Windows Phone XNA Dev Platform For Windows Phone Expression Blend 4.0 For Windows Phone Windows Phone 7 has support for Accelerometer, Positioning. Aw…

C# 4.0 dynamic keyword for Dummies – Under the hood

In this post, we’ll go back to the basics to uncover few interesting aspects of C# 4.0 dynamic features. Let us start with a simple experiment.Static Typing or Early BindingLet us start with a bare minimum program. Fire up VS2010 and try the following code. It is obvious that this won’t compile. Simply because, the compile/design time checking ensures type safety - and as we don’t have a method named SomeStupidCall in our Human class, we can’t compile the same. So, that is what you get.Duck Typing or Dynamic Typing or Late Binding Now, let us take a step back, and modify the above code like this. Change the type of variable h to ‘dynamic’. And Compile. Here is a little surprise!! You got it compiled!!  By using ‘dynamic’ keyword, you just told the compiler, “dude, don’t bother if SomeStupidCall() is there in the Human type” And now, run the application. The application will break for sure. But hey, that is your fault, not the compiler’s.  By the way, why we call dynamic typing as ‘D…

Euler’s Problem 7 And A PrimeAt Extension Method For C#

This is one of those Back To Basics Post.It is always interesting to work on Euler’s problems. Recently, Roman wanted to bring some fun, and asked us to implement Euler’s Problem 7 in C# in an effective way. Euler’s problem 7 is pretty straight forward – Find the 10001st Prime Number :). So, here we go, here is a pretty minimal implementation with a bit of optimization.public static class PrimeUtils { /// <summary> /// An extension method to find the prime number at n'th position /// </summary> /// <param name="position"></param> /// <returns></returns> public static int PrimeAt(this int position) { var primes = new List<int>() { 2 }; var num = 1; while (primes.Count < position) { bool isPrime = true; num += 2; foreach (int p in primes) { if (num % p == 0)…