Insights and outlooks on software development


On Why Ruby

Friday, March 29, 2013 by Thomas L

So Jeff Atwood (of Coding Horror fame) wrote a post he called "Why Ruby" a week ago. In that post (go read it, it's great!) he lists a number of arguments why his new venture, Discourse, is written in Ruby, and not C#, which he is most used to.

"Why Ruby" was as I understand written from the outset of trying to spread usage and draw committers to the open-source software Discourse. I thought I should add my thoughts on why I choose to use Ruby for my start-up Finn Medicinen and why I prefer using Ruby when consulting/contracting on others' systems.

First off, let me explain where I'm coming from. Since I started my first job after university, around 2003/2004 sometime, I've primarily used .NET based languages at work. Mostly C#, but I've also come across VB.NET. I haven't used the language which actually looks most interesting on the CLR stack, F#. This is probably since I started using Ruby before F# was launched, and I've been totally in love of the language. On the current "About Me" page on this blog, a post written in 2008, I wrote "I work with .NET, but I have an affair on the side with Ruby". As I stand right now, I've actually ditched .NET and married my previous lover. This is why.

The language and its consistency. Since you've come across my blog, I suppose you're a programmer. If so, you've probably seen the Ruby language, and boy, is it a beauty! The object model is incredibly consistent. You can do "a string".length, just as you can do [1,2,3].length. I know, the example is a bit contrieved, but it's striking how consistent the core and the libraries are. In Python, being a language rather similar to Ruby, you can smell the heritage of it being a procedural language from the get-go with OO added after the fact. To get the length of an Array in Python, you do len([1,2,3,4,5]) instead - the functionality is there, but it breaks with the mental model of objects having instance methods; you instead have to use the global function 'len'.

The community. I spoke to a friend the other day, regarding why we, two start-up founders, did choose Ruby (on Rails) without having a broad and deep experience in it, instead of .NET (for me) and Java (for him). My reasoning was that I can get a boatload of things without having to implement it myself. DB migrations that work smoothly out-of-the-box? Check. Solid HTML screen-scraping utilities? Check. Heck, a great web framework ScottGu and the others at DevDiv are using man-years to reimplement in C#? Check. When you do .NET development, you're lucky if you find one OSS library for the thing you're implementing. When using Ruby, you're instead have to choose from the five you've found just by googling quickly. (And I'd rather have to many than too few.) If you don't believe me, check this list to see an example of how popular Ruby is for developing open-source software.

The innovation. As I look around me at the start-up world, both in Malmö and more broadly in the world, I see lots of great software being built in Ruby. This might be due to me being biased by meeting with the Malmö Ruby devs at Malmö-Ruby, but still. Being able to be a part of the forefront of software and business development is fun. Cranking out Sharepoint sites and drag-dropping controls to a ASP.NET Webforms page? No thanks.

The culture. In my C# years, I've had to fight with everyone and his/her mother to make sure the software we build include automatic tests. In the Ruby world, a suite of automated regression tests that you can use for keeping safe are more or less standard. Devs actually beg for forgiveness if their test suite isn't in a good state. That's a culture I like.

The deployment. Deploying to Windows servers is a chore. I know, it's getting better with PowerShell and whatnot, but command-line scripting and automated deploys are so much easier to do in the land of *nix. Using capistrano to ssh to a number of servers and update without touching the mouse is a boon.

Ok, this list was more or less a brain-dump of what I think of Ruby at the moment. There are of course lots of things I don't like with Ruby and, particularly, Rails. But for me, at this point of my career, I'm glad I'm using Ruby.

What's your take? The comments section is open!

Filed under having  

0 kommentarer: