Keeping an Open Mind

Reading my blog, most will find that I'm a Ruby and Java dude... While I often speak about having an open mind in my blog, for certain things, I have to say that my mind is not always open.

I've always kept my distances from Microsoft .Net. The main reason behind this is that I never felt that I would learn something from .Net. This framework has play catchup with Java for a long time. Now both Java and .Net are more or less equivalent beside the multi-vendor/multi-platform argument.

Recently, I was asked to help some of our teams on a fairly large C#.Net/MS-CRM project. They had huge performance issues and I'm quite good at solving these kind of issues.

While I never touched C# nor .Net before, I was pretty confident that I could at least be able to read and understand the code.

I accepted to give a hand. I picked up the code fairly quickly and after a few days I was proposing changes to the code to improve performance.

The first week, I spent essentially in learning basic C# (very similar to Java) and the .Net APIs.

By the second week, I was actively contributing and improving performance using more advanced C# features and getting comfortable with the APIs.

After that, I was demonstrating some features of the language that other team member did not know existed.

Was I right to keep my distance? Did I Not learned something? No and No.

While C# is very similar to Java, there are many more advanced features of the language that are very different. I have to say that after coding in C#, Java feel like an old language. I came to the conclusion that I like C# better than Java.

Why is that? Because I also like dynamic languages like Ruby. C# with features like lambdas, anonymous types, type inference, partial code block support (with the using(...) keyword), query syntax, object initializers and extension methods make it possible to implements things in a way that is more closely related to Ruby that to Java.

All these things I would like to be included in Java. But beside simple lambdas (with an ugly syntax) support slated for JDK 1.7, most of these features are not on the Java evolution time line.

All is not great with C# and .Net. By wanting to be similar to Java in the beginning, they copied a lot of the bad APIs that Java has. The monopolistic nature of the platform also shows in the IDE space. VisualStudio 2008 (I have 2010 installed but did not played a lot with it) is miles and miles away from NetBeans and Eclipse feature wise. And for a native application it is a lot more sluggish that any of the Java IDE. While you can extend this already expensive product with some other plugins like Resharper to make it more usable, it is still not a very good and usable IDE.

All in all, I glad I accepted this assignment. It did help me to open my mind a little bit more (and astonish some friends with this move to the "dark side"). While I don't feel like an expert in C#, I can now compare the .Net and Java platforms with a lot more insight than before. This will make me more valuable to my clients. This is a very good thing.

Keeping the mind open feels good!

1 comment:

Anonymous said...
This comment has been removed by a blog administrator.

AdSense Links