April 25, 2013

Why to learn Ruby

First of all, the mandatory disclaimer: I'm a Java developer and I have been one since 2006, I have some experience with it and I can tell that most of the things I tried have worked fine.

Now, why if I have a stable knowledge on an existing programming language, and its frameworks, and its related tools, and its book and literature, want to learn a new language such as Ruby?

- Well, the answer is simple, because sometimes you have to choose the right tool for your current context. 

Here are the some reasons that make Java kind of hard to work when developing something:
- It's compiled, so if I want to do something quick such as a prototype... it takes some effort.
- It's verbose, yes it is, especially if you compare it with languages such as Scala or Ruby.
- You need an IDE for it, perhaps this is not that bad after all, but sometimes you don't need to do something big or have a full-featured software behind your little project.
- Functional programming support is missing, I think new Java proposals have been taking this issue, but it's still missing in the mainstream.

Now a short list of some Ruby features I really enjoy:
- Interpreted/Dynamic, you can type and run without problems.
- Wonderful syntax, even though I don't like the 'end' keyword, it is really nice to read code written with this syntax.

- Functional programming support, I'm not sure how far it goes into this support, but blocks, mixins and some other features are quite interesting.
- Dependency management, you have Gems and packages in a Maven or Ivy style.
- Build tool, rake is quite good.
- Literature, there are lots of data about it in the net, it has a huge community and many experts around the world.

That's the short list regarding my current choice on Ruby Learning, and I don't regret it. I have some projects to do in dozens of hours, they could not be possibly made without Ruby and wonderful frameworks such as Sinatra, Rails or DataMapper.

You should learn a new language once on a while, because as the market is moving skills are required everywhere, and seeing what other people is doing will help you understand how good or bad you are
at doing things. Personally I have found many mistakes in my code and my concepts by checking what other people have done, and by finding them I have improved a little bit, week by week and month by month. That's the thing, keep yourself moving forward, always, and hopefully always improving :-)