Why do people want to program in Ruby anyhow?
I mean, after all, it’s not as though there is any shortage of programming languages available…
You want cross-platform, there’s Java. You want ‘pure’ object orientation, Smalltalk’s the one to go for. You want user-friendly, there’s Visual Basic. You want speed, there’s C++ or Delphi. You want web applications, PHP’s the king of the castle. You want a scripting language, there’s Perl or Python…
Given so much choice, why do so many people still decide that Ruby is their language of preference?
I am genuinely curious to know.
I was wondering the same thing.
I didn’t even realize it WAS a coding language! The website does not TELL YOU!
I thought it was a SCRIPT!
And I got knee-deep into attempting a site, and gave up.
I hate Ruby on Rails because they’re self-important liars over there.
Why Ruby? That is a great question, but for me, my main reason has already been....well... implied. Its the community first of all. I have dabbled in Perl, some Python, and even some PHP, but must say that Ruby is the least rude bunch that I have run across. I only discovered Ruby a couple of weeks ago and was intrigued from the first page of the pickaxe book. Every time I have a question, I log onto #ruby-lang and pose it. No matter how simple the question ( even if I completely missed the answer in the documentation), I have yet to be critisized down to the mental size of a sweet pea.
I started to ask a question one time on #perl, not even a beginner question mind you, and one of the main people on the list gave me a ration of...well..... you know what, making comments to insinuate that the question was about to be lame and not really worth answering. I hate when I am against the wall for an answer and then the "I’m a god and your not so suck it up" community belittle’s you to no end.
Ok, enough ranting about bad community experiences, but you get my point. Beyond that, I just love Ruby. Its simple and easy to learn an absolute joy to code in.
Just picking up on what you said about Ruby being simple to code in. Has anyone found that the more you program in Ruby the more you realise how complex the language really is? Obviously, I have a special perspective on this as we’ve had to come to Ruby from ’two sides’ - that is: first we program in Ruby and secondly, we program tools to support Ruby. That has necessarily meant that we’ve had to explore some of the twisty-turny, gnarly little bumps and offshots of the language that, possibly, many Ruby programmers never see. The end result is that it is now my opinion that, contrary to my initial impressions, Ruby is, in fact, quite a complicated language.
Has anyone else discovered that? Or is this something that I’ve become aware of due to the rather unusual nature of my relationship with Ruby?
Hmm. I do want some (most) of those things. But all the alternatives leave something to be desired:
Java: I don’t care about cross-platform especially Smalltalk: Maybe one day, but I don’t really "get" Smalltalk yet VB: Dead. Sorry, and it was a good living for a long time, but it’s dead. Vb.Net? Thanks but no thanks PHP: Ghastly, syntactically all over the shop Perl: Ghastly, write-only code Python: Close to Ruby, but OO is clunky. Actually, Python’s kind of clunky. And the community’s a bit snooty. (I’m sorry, but that was my experience)
Other languages I’ve worked in that I feel no desire to revisit: Cobol, PL/1, Fortran, C, C++ and a few obscure ones
I keep coming back to C# and Ruby. And I like Ruby best. I want good OO with scripting flexibility. I want performance so I’m looking forward to the .NET compiler so I can hook up C# assemblies in the case that Ruby assemblies are slow. I want web apps, Rails in particular. I want scripting. I want a vibrant, friendly community with some amazingly talented contributors.
I came to Ruby as a planned step on the way to Smalltalk and after four years I have yet to take the next step. I was initially attracted by the number of smart people whose opinions I respected who were enthusiastic, and with almost 30 years of programming behind me, I could see what they liked.
...because I don’t know any other language except smatterings of applesoft basic, pascal, perl, shell scripting collected as oddments to get things done, mainly text processing. Ruby has a nice community, was from perl, object oriented (whatever that means) and billed as a easy to learn language that has readable code for debugging. I couldn’t care less about the RoR hype; I just wanted to find a good basic foundational language that I can start with and not worry about indenting. Hopefully I made a good choice as curious end-user. Thanks for you book and supporting Ruby. I just downloaded it.
Because things like this are not only possible but easy to accomplish: http://www.rubyclr.com/images/code-compare.jpg
Because I can come to someone else’s code and usually be able to read it without necessarily needing a lot (any?) of background with the code.
Because it is new and has a lot of hype. Hype usually translates to $$, if only for a little while. With Ruby I think it will be longer than a little while.
Because new technology is exciting.
Because average programming jobs (ie- Java) are being shipped offshore to places like India.
My reasons for being interested in Ruby:
There’s finally a decent IDE with Intellisense for it! The lack of a good IDE has already put me off D and OCaml. When you’re just trying to learn a language, hunting through tons of documentation isn’t the most exciting thing to do.
It also helps that Ruby is easy to learn because most things work the way you expect them to
Ruby on Rails is absolutely great compared to PHP and PHP frameworks
It has interesting features like metaprogramming
Ruby is growing in popularity, and I guess the buzz tends to attract programmers.
There must be other fine languages which I just haven’t tried though (e.g. Python), so it could be a factor too.
Because, like Gretzky, I skate to where the puck is going to be, not where it is. The trick it to know where it’s going to be.
Throughout my career I’ve changed technologies while the technology I’m working on is on top. I look for a new technology with too things: quality and momentum. I really like Ruby’s quality, and from what I can tell it has a lot of momentum. Plus it fits my development space well.
Of course this approach has some risks, but the payoffs are great. Worse case scenario, I know Java and c# too, so I’m not really worried.
I think now is a great time to invest in Ruby. But like all good investments it takes time to pay off. If you start today, you won’t be one of the grandfathers of Ruby (you’re too late for that), but you will be one of the fathers, or perhaps uncles.
As to why Ruby, over other new languages like Python. That’s a harder question, I think both are really good choices. I prefer the way Ruby does things, and that’s about it.
The older languages you mentioned are something entirely different. Either I already know them, or they are too old, bloated and past their time, ala perl (ducks as perlies pick up rocks)
Number one reason on my list:
1. The framework. This makes it easy to forget about all that database access code
I’ve been a microsoft VB developer for years and find it very hard to beat the object browser, intellisense and many other features of the .net IDE. I’ve also watch the microsoft platform become bloated beyond all reason. Historically it’s also been much easier (and cheaper) to implement open source solutions for web apps.
So is Rails the thing that attracts you to Ruby? If so, would you be happy developing for some other language if it could use Rails (or a similar framework)? And would you program in Ruby even if Rails didn’t exist?
I don’t think Ruby would have had remotely the same trajectory without rails. If Ruby didn’t have the framework I would have been looking harder at PHP or even a spendier, heavier, and often annoying Microsoft solution. I wouldn’t have paid much attention to Java.
I’ve developed classbuilders with .Net based on Rockford Lhotka’s publications. Always found them to be cumbersome and a major pain in the ass to adapt to changing business requirements and structural database changes. One thing they did do, and any good framework should do is track when a business object became ’dirty’ and needed to be saved to the database. As far as I know, Rails doesn’t do that out of the box. If you write params attributes to a model there is no property to determine if it’s been altered from the underlying record. We have implemented a short and sweet fix to this but it’s one of those things I would consider fundamental to a framework.
Ruby has a lot of good things going for it but it certainly isn’t the godsend that so many people want to claim (at least without Rails). Without strong typing, tight variable scoping, and well organized hashes it’s easy to find new ways to make your coworkers pull their hair out when following your code. Having said that, I’m using it as my primary development tool.