RubySource: Why should a .NET developer look into Ruby or Ruby on Rails?

.NET developers have several tools at their hands: multiple languages, a huge framework, stacks for many different types of applications (web, desktop, mobile…), plus a growing OSS ecosystem. So why exactly would a .NET developer look into Ruby and Rails? For those who did look into, what did they like or didn’t like? Read on, and you’ll find answers to these questions and more.

Besides sharing my own personal experiences, I’ve asked several current or former .NET developers who ventured into Rails land to share their experiences as well:

  • Jonathan Birkholz, aka JB
  • Michael Koby
    • Michael built Just for Bands on Rails, a website for bands to manage their business.
  • Ben Scheirman
    • Ben has worked on several Rails applications at ChaiOne, and has spoken at Ruby and Rails conferences.
  • Tim Tyrrell
    • Tim has been building Rails applications and presenting and Ruby and Rails conferences.
  • Corey Haines
    • Corey has been all over the place (literally!), pairing with developers as a “Journeyman” and helping them improve their craft. He has also started the Code Retreats, and is the creator of MercuryApp, a Rails application that helps people and teams track everything they need and reflecting upon it in order to improve.
  • Derick Bailey
    • Derick is the creator of Albacore, which is a “suite of Rake tasks to automate the process of building a .NET based system”; a great example of how to apply things learned from Ruby to your .NET kung-fu. Derick is also a prolific blogger, writing very detailed and informative posts on how to extend Rails and bend it to your needs.
  • Jak Charlton
    • Jak has been writing posts based on his experiences with Ruby and Rails.
  • Scott Bellware
    • Scott has ben giving training on Rails for several years, has presented about it at several conferences all over the world, has written several articles related to Ruby, Rails, BDD, Agile, Lean, and related subjects.
      This post contains quotes from what I got from them, and I’ve also published their full answers here in case you’re interested.

After almost a decade of doing .NET development, I felt a need to venture in different waters. Since several .NET people whose opinion I value had been happy doing Rails work, I decided to give it a shot, and I really liked it. Apparently, this has been a common trend to several people:

“I kept hearing buzz around 2005 about Rails. I looked into it but initially didn’t get it. I didn’t understand MVC (I was a WebForms guy at the time) and Ruby was totally different than C#. I couldn’t imagine it taking off like it did. Fast forward 3 years later, after watching more and more people start using it, I decided to start giving it a serious try. ” – Ben

“For me, it was a way to learn something new – to explore new communities and technologies – and hopefully learn something that I could bring back to my .NET development (which I did). I was immediately impressed with how quickly I could get a rails website up and running with basic CRUD screens, using the scaffolding. It wasn’t until I learned rails, that MVC in a web application made sense.” – Derick

“As you start to push a statically typed language like C#, you start finding yourself writing more and more code that really has no purpose other than to support the type system. To say this is frustrating is putting it mildly. Huge amounts of ‘redundant’ code like interfaces, casting, perverse dependency injection purely for testing” – Jak

“Beyond the buzz, it was the migration of people whose opinions I respect telling me I needed to take a look. Having spent most of my career creating smart client applications I knew very little about web frameworks. The only web experience I had to speak of was WebForms and really that doesn’t count. So when I had a small volunteer web project for a local charity I decided to take a look at rails.” – JB

“I had heard about both Ruby and Rails for a while before I decided to look into it more thoroughly. I had gone through the ‘Learn Ruby in 20 Minutes’ that’s on the Ruby language’s homepage, and liked it. The conciseness of the language is what really got me excited.” – Michael

“Working in a soul crushing corporate IT department really got me looking in a ‘less enterprisey’ direction. Since I was enamored with the unit testing culture of software, Ruby and Rails seemed like the obvious direction to take.” – Tim

“From 2004, I started seeing a lot more Ruby showing up as the language of choice at the annual Agile conference, along with other smaller conferences. I would spend time pairing with people in it and really enjoyed it.” – Corey

I can certainly relate to these quotes. Despite the fact that I had awesome friends in the .NET community, unfortunately that community doesn’t have much impact in the direction that Microsoft takes with their projects. The Rails community, on the other hand, totally drives the direction of the stack based on real world needs.

As I was first getting into Rails, I was impressed at how much I could do with minimal Rails or Ruby knowledge. As it relies heavily on convention over configuration, one can get a lot done if the conventions are followed. This sense of accomplishment for someone who didn’t know much about either the language or the stack was something I liked a lot. I also like the testing tools (such as RSpec and Cucumber), with which I felt I could write my tests with a lot less friction then what I was used to in the .NET space.

Those were the things that grabbed me at first, and I started appreciating other ones as I gained more experience.

At this point, I can’t really think of anything I don’t like about it. There may be a couple of things that maybe I just don’t quite understand yet, or that feels weird to me after so many years of working with another stack, but it’s nothing relevant.

When I asked my buddies what they liked or not about Ruby and Rails, I got a lot of overlapping answers, as well as certain things that were important to ones but not as important to others:

Ruby

“I literally *love Ruby. It’s crazy, flexible, concise, and beautiful.” – Ben*

“I like the conciseness of Ruby. ” – Michael

Gems

“Gems make application componentization not only possible, but so easy that EVERYONE does it. Usually when you have a problem there is somebody that has already had that problem, solved it, and packaged it in a gem for you to use.” – Ben

“I’ve saved hours of my time by searching for gems that can help deliver a feature before I just sat down and coded it myself. Another important part of the gems is they normally come with great documentation and cheat sheets. So I can ‘gem install and in a short period of time get the gem performing the work I need. And if the documentation is lacking, I can just open the gem up and dive through the code myself. ” – JB

Tools

“I like command-line driven stuff. I type pretty fast and it fits in with my workflow.” – Ben

“Switching from a GUI-centric development environment of Visual Studio tools to an extremely lightweight and mostly command-line focused environment has just been a breath of fresh air.” – Tim

Testing

“I love that testing is just what you do – not an optional afterthought.” – Jak

“I particularly like the innovation in the testing and TDD realms in the Ruby and Rails communities. There is a lot of discussion around different practices and techniques. I don’t really see the same level of discussion in other communities.” – Corey

“I like how testing is so woven in to both the Ruby and Rails communities.” – Tim

Simplicity

“It’s easy to get a site up and running and build real value into the site, quickly. More importantly, though, it gets out of my way. I don’t have time or patience to deal with tools and technology that continuously get in my way. Tools should not dictate how we work, but should be formed to work in a manner that supports us. Rails and the community around it, do exactly that. It’s very easy to change the way rails behaves and how you work with it. This points to the two things that I love the most: the ruby language and the ruby community. It’s the ruby language and the community surrounding it that really give rails it’s power. – Derick

“I love the simplicity. I love that convention over configuration is deeply ingrained into everything. I love that things ‘just work’. I love that it keeps out of my way, and lets me write code that has business value.” – Jak

“Rails truly is a framework that gets out of your way and allows you to get work done in a very low ceremony fashion. I like the ‘convention of configuration’ aspect of Rails. It gives me less to think about when building applications.” – Tim

It’s not only rainbows and unicorns

Some of the guys mentioned that “Rails isn’t only rainbows and unicorns”. Something that has consistently come up is the speed at how things change in and around Rails. Since the community drives the development, things tend to move fast…

“Sometimes it’s hard to see where something went wrong, because there’s a lot of convention magic going on. Especially when living on the edge. Gems don’t always stay in sync, Rails is changing constantly, so you have to have a lot of patience if you’re going to be working on the latest greatest.” – Ben

“The rate of change in the ruby and rails communities is staggering, and there’s a very large ‘shiny new toy’ syndrome in the community. This has the benefit of constantly moving the technology forward, but often results in days of headache trying to figure out incompatibility issues between different versions of different gems. Tools like Bundler are meant to help address this issue, and largely do. However, they are often part of the problem, as well.” – Derick

“What can be frustrating to others is the speed of upgrades with rails. Rails can move fast and if you have a Rails 2.0 application, finding help on the basics and tutorials can be difficult because the Internet has already moved on to Rails 3 or 3.1.” – JB

“What I don’t like is the speed at which the community moves. As good a developer as I like to think I am, some things still take me a while to grasp and sometimes I feel that once I have a grasp on something it’s changed in the latest version.” – Michael

Is fast changing pace of Rails always a bad thing?

“Although the speed is fast, the changes are great. When working with rails I often think, ‘man why do I need to do X, shouldn’t rails do this for me?’ Then a few months later I see that the next version of rails will include those features. This is a pleasant surprise from my .NET experience where often the upgrades would solve problems I wasn’t having. To quote Ricky Gervais, ‘the best non-solution to a problem that doesn’t exist’” – JB

Is there anything I miss from .NET? I think LINQ is probably the biggest thing. There a couple of LINQ-ish features in Ruby, but it’s not quite the same thing. Other than that, I certainly do NOT miss TFS.. at all!! Even though .NET developers can certainly use other source control systems (and some do), the vast majority just sticks with TFS because “it’s the Microsoft way”.

At first I thought I’d miss my nice little add-ons for Visual Studio: CodeRush and ReSharper. I have to say I don’t miss it much. I get most of the refactorings, project navigation tools, and auto-completion that I need in RubyMine.

There are several other things I don’t miss, but it would overlap too much with what the guys brought up:

“C# is still a pretty cool language, but I don’t miss the .NET framework really at all.” – Ben

“I loved C# so I miss that. I guess I should look into RubyMine more, but I do miss ReSharper. I just need my refactoring goodness mixed into Vim.” – JB

“I would like to say that I really don’t miss intellisense and ReSharper as much as I anticipated.” – Tim

“Something that would be nice is a good IDE for doing Ruby/Rails development as that seems to be the biggest hurdle for .NET folks coming over to Ruby/Rails. The lack of a Visual Studio like IDE seems to case pain for some people, and as a dev tool Visual Studio is pretty good.” – Michael

“I definitely do not missing working in Visual Studio or Windows on a daily basis.” – Tim

“I don’t miss the boilerplate of everything that you have to know to even be considered an ‘intermediate’ developer in .NET these days. If you don’t know IoC, TDD, SOLID, and a dozen other principles and patterns, you’re not staying up to date with what it takes to create good architecture in .NET. Many of these patterns and practices are still necessary in Ruby and Rails, but the language and the frameworks tend to bake this knowledge in as first class citizens instead of requiring you to bolt it on, as an after thought.” – Derick

“I don’t miss TFS, architects who think you should pass around datasets, enterprises stuck on old technologies, Microsoft-slavery, developers who can’t be bothered to read a book and get a little outside their comfort zone to learn something new and amazing.” – Ben

“I don’t miss the all-in-one tooling that Microsoft technologies and teams tend to gravitate towards. Tools like TFS and Visual Studio may have great business appeal because of the tight integration between them all, but the reality of day to day work is a different story. These tools lead to very rigid processes, where the tools are dictating how people work and interact. They solve larger business issues to an extent, but create significantly more issues than they solve by preventing change and hampering a team’s ability to handle special cases and needs that don’t fall within the standard guidelines of these tightly integrated tools.” – Derick

“I don’t miss the ‘Microsoft said …’ mentality of most .NET developers. I can’t stand it and I don’t understand it. It’s as if people are afraid to learn or question anything, which flies in the face of everything that I’ve ever been taught. People need to look outside of what they are currently doing to understand what else is out there, if for no other reason than to understand why they are doing what they are doing.” – Derick

“I don’t miss the culture. The never ending fights against architects and managers when trying to bring in tests, open-source tools, and agile practices. I lived with a crippling despair born from frustration.” – JB

“I don’t miss working with a technology where a majority of developers don’t think outside a tiny little box.” – Tim

“To be honest, there isn’t really anything I miss from .Net.” – Corey

So, are there cases where .NET developers who venture into Rails decide to switch over? Yes, quite a few, actually. In my case, that’s what happened. But how did that happen? Usually the best way to learn anything new is to get as much exposure to it as possible. After a couple of months working on a Rails project in my spare time, I was offered the opportunity to work on it full time. So far, I’ve been enjoying it a lot. Of course there are hurdles here and there, but the overall experience has been rewarding.

I think it’s all about having as much fun as possible, while still getting paid for it. I’ve had several years of fun with Clipper, than FoxPro, than .NET. It was just time for me to start having fun with something else. Again, I heard similar stories from the guys:

“I found that I was able to build applications very quickly and host them just as easily (on Heroku). When projects came up at work that needed similar agility, I recommended Rails.” – Ben

“The opportunity to do something new and exciting, with a fast paced and well organized community was exactly what I was looking for after 9+ years of .net development. I built several small sites to play with Rails and learn. The more I played with it, the more I wanted to play and learn and build something significant. In the 2nd half of 2010, I was given an opportunity to not only jump into Rails work, full-time, but also go out on my own as an independent contractor/consultant.” – Derick

“…although I haven’t switched – I just took a new position with a digital agency who are a strong .NET shop. I use Rails for my own stuff, and it is a welcome relief.” – Jak

“My rails moment happened on the first night. I sat down to learn rails and in a few hours I created an application and had it hosted on Heroku for free. My mind was blown away. I didn’t need to spend time figuring out data migrations, test frameworks, hosting plans, etc. I immediately could focus on what I wanted to focus on: what I wanted my application to do.” – JB

“I had been doing .NET development in some form for close to a decade and I decided it was time to learn something new. The final leap was when my friend and I came up with the plan for Just for Bands. I didn’t really wanna do it in .NET (even using ASP.NET MVC) mainly because I did .NET all day at work and really wanted to learn something new.” – Koby

“I mentally switched a year and a half ago when I thought about my future and realized that I could not think of a single .NET job that would have any appeal to me. I literally was able to switch because the job market is ridiculously good right now in Austin so the opportunities were available for developers with little or no Rails experience.” – Tim

“In 2007, I was really getting fed up with the development experience in C#. I would spend time writing Ruby, then come back to C#, and it was like night and day with the flexibility. I had been doing pretty heavy test-driven development since 2004, and it felt like I was constantly fighting C#. I got tired of the compiler and the language screaming at me about things I would be getting to, such as unimplemented methods. Whenever I had a chance to work in Ruby, the experience was much more smooth. So, I decided to get out of that world. I was learning Ruby, so I took a few months and built a couple application in Rails. I then got approached to take a job at a startup doing Rails.” – Corey

There’s much to be learned by a .NET developer when looking at Ruby or Rails. With C#’s dynamic features, a developer can learn tons from a pure dynamic language such as Ruby. With ASP.NET MVC getting more and more popular, lots can be learned from Rails (which has been around for a longer time, and it evolves a lot faster than ASP.NET MVC will ever be able to). Besides that, there are several things that originated in the Ruby or Rails world and have made their way into .NET, such as CoffeeScript, Sass, Cucumber, Jasmine, etc.

In other words, you don’t need to leave .NET in other to benefit from learning some Ruby and some Rails. But depending on who you ask, you might hear things like this:

“Why is it a pattern that, …people try out Rails, and they just never come back?” – Ben

Or last but not least:

“Feel free to quote me on the move of .NET’ers to Ruby: Too little too late – yet again!” – Scott Bellware

I’ve posted the full unedited responses I got from the guys to my personal blog, in case you’d like to check it out.