June 2, 2014

How C# leads to boring jobs

I have been recently defending C# against F#. I have claimed VS Express to be better than Xamarin Studio. I am a long-term fan of C#'s progressive language features that shine in comparison to java's slow motion language evolution. Yet I claim C# is boring in business. Not because of the language itself. It's because of the ecosystem that surrounds it.

I believe Microsoft is the poisonous ingredient in C#'s salad mix of ecosystem components. Microsoft is building .NET ecosystem that eventually turns every fast-moving C# project into bureaucratic institution. Don't believe me? Read on.

Microsoft charges for every release of Visual Studio. Cost-conscious companies buy one version of VS and then stay with it for 15 years. I've worked in one such company and I've seen the argument against upgrade. Once you are on an old version of VS, you soon start lagging in everything else that's connected to it.

There are alternatives to Visual Studio, but they are not a drop-in replacement for VS. They are all very different from VS, which requires commitment to particular vendor, which cautious corporate customers won't do, because they know Microsoft will steer the language and the framework to favor Visual Studio.

Even if you are lucky to have the latest Visual Studio, you find yourself implementing internal libraries that java developers get for free from open source community. Microsoft's presence alienates open source developers, because they find themselves working for free to sponsor Microsoft's business. NuGet makes it easier to contribute, but it doesn't replace the motivation to do so. .NET is doomed to be a marginal community with comparatively small pool of open source libraries.

Yes, .NET has more healthy community of commercial component vendors that java. But commercial vendors can never replace the open source community. Commercial libraries are bloody expensive and it will never change. The bill for commercial components grows high really quick. Most managers never approve a single library. Equipping the team with full range of commercial libraries and getting them regularly updated is impossible.

One would hope for open source components to grow organically and to eventually replace Microsoft's toolchain, especially in companies that do their ROI calculations and refuse to buy tools and libraries that cannot pay for themselves. But this cannot ever happen, because Microsoft's business model is baked deeply into the .NET framework and even the C# language. Let's look at some examples.

XAML is designed for Blend even though most people write their XAML by hand. C# is a static language, which makes it cheaper for Microsoft to implement and easier to handle in IDEs rather than through libraries. Advanced frameworks requiring code generators must take the form of an IDE plugin rather than being a library or a library-like type factory. That's why the lack of extensions in VS Express is not just a loss of comfort but rather a loss of expressive power. The whole thing is designed for Windows, which is quickly becoming an unacceptable tradeoff.

And then there's the culture. Microsoft's approach is to be the community leader. In Microsoft's view, Microsoft provides developer tools and all general-purpose software while software developers implement applications to serve market niches and individual customers. This second class status leads many application developers to abandon the fine art of programming in favor of mindless application of whatever tools are recommended by Microsoft.

It also breeds a new kind of developers who won't do anything unless they get training, tools, and support that are directly applicable to the task. Just think what will these developers do to the organizations unfortunate enough to employ them.

All these thoughts lead me to recommend java in all future projects. It's indeed crippled in language features when compared to C#, but it has a wider range of open source libraries. Its IDEs can be upgraded without asking management for permission first. Java will happily integrate with everything.

The perceived lack of features in java language might even turn out to be a false claim after all. Java has recently received lambda expressions and limited extension methods, which are two essential features that used to make many java APIs impossible or thoroughly ugly. And scala is long overdue for my review as it might have matured since I have looked at it for the first time several years back.

No comments:

Post a Comment