I have worked professionally with Ruby on Rails for the past 4 years and definitely consider myself a part of the Ruby community. Before that, however, I was a .NET consultant for many years – in fact I worked with .NET from the early betas and I was very exited about replacing VBScript and classic ASP with C# and ASP.NET. Being at MIX 10 – Microsoft’s conference for developers and designers working with web and mobile technologies – has made me realize both how much the .NET community has changed since I left it – and how much it hasn’t. In this article I outline the differences in culture in the Ruby and .NET development communities as I perceive them, and voice my opinion on what could be changed.

I have a good friend named Oliver Kofoed who is a brilliant .NET developer. Oliver is an entrepreneur and has written the entire backend for Nonoba and Player IO, he has written his own object-relational mapper (ORM), templating system, multiplayer game server, content management system and so on. He has also been toying with several experimental .NET languages over the years (such as Boo) and even worked a bit on one of his own. Oliver is both curious and passionate about development, and he was in fact the one who initially told me about Ruby on Rails – I owe you one, Oliver ;)

I occasionally nudge Oliver about releasing some of his work as open source, but it has yet to happen. I don’t think Oliver mind sharing his stuff with the community, but the fact is that it takes a lot of work to prepare your code for open sourcing, especially if you haven’t build it with that in mind from the beginning. You need to take anything out that’s specific to your own applications, you have to write at least some documentation and you probably also have to make the code a bit more configurable and modular. To make that effort you need to get something in return from the community – you have to be reasonably sure that your efforts will be appreciated and that your peers will respect you for sharing valuable code with them.

The best way to get a name in the Ruby community is to release a piece of open source software that help other people get their work done. Ruby on Rails is a pretty good example of this. In fact, in a typical stack for running a Rails-based website, not a single piece of software is proprietary. From the operating system and programming language, the database and the web server to the web framework, gems and plugins used in the application, everything is free and open source. To be fair, the .NET framework is also free, limited versions of the development IDEs and the SQL server database are free and I believe it is currently even possible to get free hosting on Windows Azure. But none of these things are open source and that makes an important difference in the perception of the importance of open sourcing in the eyes of .NET developers, I believe. When most of your stack is closed source, you don’t see the need to share your own source with anyone else either.

There is of course lots of great open source projects within the .NET community: NUnit, Log4Net, NAnt, NHibernate (I’m not sure why I can only think of ports of open source Java projects right now) and also some great “higher-level” open source projects such as Umbraco. Many of these has existed for a long time, but it’s a relatively new thing that Microsoft has started releasing parts of their own projects as open source with ASP.NET MVC – a web framework that’s essentially a port of Ruby on Rails (minus the ActiveRecord ORM) to .NET done by some of Microsoft’s best developers – as the prime example. This is awesome, and ASP.NET MVC is deservingly winning a lot .NET developers over from the broken notion of “web forms”. I’m not sure how easy it is to build and share plugins for ASP.NET MVC, but hopefully the project will help more .NET developers to realize the value of sharing code. In the Ruby world we have Github for sharing and collaborating on open source projects, and Codeplex might be able to do the same for .NET – or .NET developers could start using git, but that’s a different story.

ASP.NET MVC also endorses test-driven development, which is another key differentiator when comparing the Ruby and .NET communities. To be honest, I think some .NET developers have even harder seeing the value of testing than of open sourcing. They use a static language after all, so the compiler “tests” that all is good, right? Wrong. Even without tests, problems with wrong types and nil-reference exceptions (“null” is called “nil” in Ruby) are usually easily found and fixed in Ruby. What needs to be tested is intend. Business logic. Calculations. Complicated SQL queries. Redirects. The flow of the application. Test-driven development (TDD) forces the developer to think before he acts, and later it gives him the freedom to refactor without the fear of breaking existing functionality. I understand any developer who feel it is a waste of time to write tests after you have written the actual production code – it’s not, but it feels like it. TDD gives the pleasure of accomplishing hundreds of small steps in the fail-pass test cycle every day, and I hope the popularity of the ASP.NET MVC will push .NET developers more in this direction.

I have of course attended all sessions related to Ruby at MIX10 (all three of them), and Microsoft’s prime example of what to use IronRuby (the .NET implementation of Ruby) for seems to be testing. They love to show off RSpec and Cucumber, and yes, those are cool testing frameworks, but will it really make .NET developers write their test code in a language different from the production code? To me, IronRuby is the .NET developer’s chance to spread the love and magic of Ruby in their Microsoft-centric companies, and just like Rails has been the killer app for the traditional C-version of Ruby, I believe this fantastic web framework can also be the driver of a wide adoption of IronRuby. ASP.NET MVC will be the segway for this, because MVC and Rails have so much in common, that when you understand one, you understand them both – provided you also know C# and Ruby, that is.

Yes, I said “the love and magic of Ruby”. If you think it sounds cheesy, that’s because it is, but the fact is that I’ve seen several slides at MIX10 with statements such as “Ruby is love” and “We love Ruby on Rails”. Ruby is a pretty programming language, and Rails is an awesome framework – but really working with Ruby is all about being passionate about programming, being curious about new technology and have a desire to be on the “cutting edge”. I’m not saying that .NET developers are not those things, but I’ll make this claim: The ratio of highly passionate developers actively seeking the cutting edge of software development is higher in the Ruby community than in the .NET community. There is some very simple reasons for this: First of all, the Ruby community is smaller and has a smaller customer base, which leaves less room for … let’s say “average” developers. Second, almost everyone in the Ruby community comes from a different technical background and has made an active choice to switch to Ruby. C# is a language taught in schools, there are certifications and programs, and in some environments I believe you’d hardly even consider the alternatives. This again leaves more room for the “average” developer who is by no means a bad programmer or person, but who is not building and seeking out new things on the cutting edge. To him, programming is more a job than a passion, and he might even do something else with his spare time than sit in front of the computer.

The point I am trying to make is this: Ruby has a community consisting almost entirely of early adopters, while .NET has many followers in the community. This is not necessarily a problem – in fact it can be very pragmatic not to be on the cutting edge. On the other hand, .NET developers are missing out on a lot of the good stuff by waiting for Microsoft to tell them what to do. As an example, my impression from MIX10 is that the javascript framework jQuery is still a very new thing to many .NET developers, while it is something we have used for years in the Ruby community. I was learning about jQuery at a Rails-conference two years ago, and back then I felt I was late in the game. What’s interesting is that Ruby on Rails is in fact pretty tightly integrated with another javascript framework – Prototype (much too tightly in fact, but that has been remedied in Rails 3) – but we were so blown away by the productivity and community surrounding jQuery that we switched anyway. The fact that Rails is open source and that Ruby is a dynamic language that allows any code to be changed, overridden and monkeypatched, allowed someone to quickly release a plugin that modified all places where Rails currently generates Prototype-specific javascript. Sure, ASP.NET MVC is also open source, but if someone wanted to make a fundemental change such as the one in this example, they would probably have to release a separate branch of the framework the with modified code, since a plugin wouldn’t be able to modify the statically typed and compiled code.

The Ruby community is not perfect. Some think we are arrogant. I can think of at least one person about which this is true, and perhaps you think I’m another good example after having read this. I am actually impressed with how humble and down-to-earth the VIP’s of the .NET community seemed to at MIX10. Another thing you could say about us is that we are trying to avoid dealing with real-world problems by going into Ruby. We leave the .NET developers to maintain and extend existing enterprise solutions built on Microsoft technology, while we go out and build entrepreneurial web apps from scratch. Personally, I like being curious, passionate and on the cutting edge, but it might not be for everyone. Are you a passionate developer?

Bookmark and Share