Tuesday, August 28, 2007

"Ruby off the Rails?" quid pro quo

I came across Ruby off the Rails? by Paul Turner and he issued a challenge at the end of his post, and I bit :)

Read it here (including the comments) then come back for my some-what larger response.

Begin communique:

I agree with you that Microsoft adding more and more languages to the framework is a bad idea. J# anyone? . Their ploy is to lower barrier to entry, so what you end up with is some developers using anything but C#, because, well why bother learning it if you don't have to. Have you tried proposing C#.NET to a VB developer when they can use VB.NET? I have, it's not fun. It might just be me but I question the maintainability of an application written in 7 different languages.

To answer your question:

Read the following with the caveat of using the "right tool for the right job". Obviously if you are targetting a windows desktop app, it is hard to trump WinForms. However i think .NET is licked in every other category.

  1. Portability (Mono still doesn't implement the full .NET 2.0 API)

  2. Expressiveness of language:

  3. 1    for (int i = 0; i < 5; i++) {
    2      Console.Out.Write("c# loop ");
    3    }

    vs.

    1 5.times { print "ruby loop " }

  4. Cost $$$$$$$$$$$$$$$

  5. MSDN documentation is, well crap, contrast:

  6. http://msdn2.microsoft.com/en-us/library/system.io.file(vs.85).aspx
    and
    http://java.sun.com/javase/6/docs/api/java/io/File.html

  7. Closed source / Open standard


I can safely say that you are the first Microsoft proponent that I have come across that knows the difference between open-source and open-standard :). Some people claim that .NET is open-source. No; it's a huge difference. Java is open-source: http://www.sun.com/2006-1113/feature/. Ruby is open-source: http://www.ruby-lang.org/en/LICENSE.txt. But you hit the nail on the head C# is an open standard: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-334.pdf.

This might not be a kicker for a lot of people, but it is to me. I like being able to delve into source and see what's going on and change it to suit me. This is how i found a bug in the Sun implementation of the CachedRowSet, i thought i was going insane but i was able to get in there and figure why it wasn't working and then report it. Kudos for the open-standard, but one up it and go the whole hog.

I was also working as a government employee when I discovered that bug. If the source hadn't been open I would not have been able to temporarily patch it and get on with what I was doing.

I also have to disagree about the 'purity' of keeping SQL code in SQL Server. It's fine if you have resigned yourself to paying for SQL Server subscriptions the rest of your life. But i'd like to bet on a bit of flexibility and write ANSI compliant SQL that i could quite easily drop into Postgres or any other db for that matter. Ofcourse there are extenuating circumstances (performance reasons and the like) to dabble in sql server extensions, but it is a rarity. I wish i also had the energy to go the age old 'dynamic sql vs stored procedures' argument with you too :)

Rather than bemoan the fact that is IronRuby, maybe have a look at it, who knows you might give up your C# day job :)

2 comments:

Anonymous said...

Look alive! The trolls are hungry tonight...

dan said...

Trolls, god bless em'. I suppose language criteria, cost and documentation aren't an issue for them in lollipop land :)