Ask HN: What's the big deal about Ruby and/or Rails?

11 points by rexreed ↗ HN
It's not a rhetorical question, I'm really, honestly, trying to understand what the big deal is about Ruby. I'm not trying to start a "my programming language / framework / environment / technology is better than yours" fight, so I'm not looking for opinions on why Ruby might be better or worse than (pick your poison). I'm just trying to understand why and how Ruby is getting so much momentum, and whether it really matters, or is just one of those meme things that happens in a close community like tech startups.

7 comments

[ 3.1 ms ] story [ 25.0 ms ] thread
I suspect it's because of Rails and the commercial potential of the web these days (Groupon, etc.).

As an aside, it seems like a pretty nice GP language in its own right. I had to write some shell scripts for a Windows box and picked Ruby largely on a whim. Two months later, and I've got a stack of Ruby books and I'm going user group meetings.

Regarding "I'm going to user group meetings".

I'm not a Ruby user, as I work primarily with statistical computing and machine learning, but Ruby has a really impressive set of regional user groups. Except for R, there aren't really any other languages which have a significant number of well organized regional user groups. It's great for users of a language to get together and share info and provide guidance to new users.

The community is amazing. I've been to groups for other languages, but they aren't as hands on or useful as the Ruby meetings. The Ruby group in my area does monthly 'hack nights' where experienced rubyists pair up with noobs and implement a small project. That kind of interaction keeps me motivated and lets me pickup standard practices and tools much faster.
Because it's easy to learn, has good community support, and powerful metaprogramming features. In a nutshell it's easy to think and create in ruby.

Also significant is that the tradeoffs you must live with (speed, lousy debugging/refactoring tools) to get ruby's benefits just don't matter for a huge swath of web projects.

Ruby is optimized for a very common, very pragmatic set of problems.

I believe it's not as big a deal now as it was when it first arrived. At that time the idea of an MVC web framework wasn't new. Django was also in development and PHP had several crap web frameworks available. So, there weren't very many web frameworks and what was out there wasn't very good. Rails hit the scene and brought the idea of web frameworks to the masses of web developers. Even today after all those years there are PHP frameworks which try to mimic Rails and fall short. The alternatives of today are largely good enough though, especially for more specialized cases.

I think you are a step behind. These days you should probably be asking "what's the big deal with Node.js?" ;)

regarding Ruby:

Ruby is dynamic. Kind of like Perl, Python and PHP, but meta-programming features make it feel even more powerful.

Ruby is object-oriented. Even more than, let's say, Java. No primitive data types. Even things like regular expressions and pieces of program code are objects. This makes the language feel very consistent.

Ruby is beautiful. The syntax and consistency appeal to many developers for a variety of reasons. For me it's the fact, that if you adhere to some common sense rules of naming your variables and methods you get extremely readable code.

Ruby has some unique and interesting features. Such as code blocks (kind of closures).

Combined this means that you can accomplish a lot with very small amounts of actual code. Still, this code remains extremely readable and thus maintanable.

For many developers, Ruby ist the last language they ever want to learn. But to be honest, I think it is not for everyone. You should try it and see if it feels "right" for you. Do not worry, if you don't get it, and maybe try Python instead.

regarding Rails:

Today, I guess Rails is nothing special anymore. These days you can choose from a variety of quality web frameworks in whatever language you are comfortable with (and most of those probably borrow some ideas from Rails).

To understand what really set Rails apart you have to imagine the world of web development in 2004, when Rails was first released. Back then you had to either use PHP, which has a bad reputation for many reasons I do not want to delve into, or some ridiculously complex Java framework.

Rails was (and still is) a wonderful framework that takes the tediousness out of many repetitive web development tasks. Furthermore it gives your project a structure, trying to lead you to write well-structured, testable and maintainable code.

Oh, and of course Rails is written in Ruby. Rails introduced many people to the Ruby programming language. I think it is the combination that makes it both so powerful and likeable.

Ruby is probably the most zen thought interpreted OO programming language.

    Example: http://news.ycombinator.com/x?fnid=IpkcxQEdui
Rails is probably the most zen thought web framework.

    Compare Rails#has_many with Django#foreign_key , which feels more natural?
The sum renders the benefit of cognitive discharge that lets you focus on important stuff and not tinker on details.

The rest is huge community, huge documentation, large mature ecosystem (mostly web stuff, python's SciPy pretty much way-ahead, all tough ruby can do science too), lots of best practices from the start, github-lead, mature implementations etc