What’s Wrong with What Matthew Huntbach Finds Wrong with Ruby

Ruby on Rails

A year ago I would have hated seeing an article like this making the rounds on the interweb.

That was before Ruby/Rails had shored up a solid foundation as an acceptable framework (especially among startups) to build your next webapp.

My primary concern was that, if I ever have to work at non-RoR companies down the road… will they let me use Rails?

Ruby/Rails has become popular enough now that I now longer worry about that. Put “Ruby on Rails” in your LinkedIn profile and you will be bombarded semi-weekly with requests for more info about your availability and possible consulting gigs.

What Matthew Huntbach Finds Wrong with Ruby

From what I can gather from the article, it is Matthew’s opinion that Ruby is not elegant, merely ad hoc.

The single example he gives of this is:

In Ruby, if a is [1,2,3] and b is [10,20,30], then a+b is [1,2,3,10,20,30]. Why not [11,22,33]?

Ok - simply a matter of taste, right? I prefer the way Ruby does it. To test the validity of his opinion for broader generalization among programmers, one could survey those new to Ruby and ask them (without their prior knowledge of what actually does happen in this scenario), what they expect to happen when you add two arrays ([1,2] + [10,20]) in Ruby.

Several other common functions could be surveyed as well, to see of Ruby behaves as expected by those new to the language.

If the vast majority of them expect it to behave as it does, then Ruby at least has one trait of elegance — it behaves as expected. Of course, the survey results could fly the other direction, and the author would be right.

From my 1-year of full-time Ruby on Rails programming (and a half year part-time before that), in my experience, 90% of the time Ruby behaves as expected. Your mileage may vary.

Teaching Ruby to Undergrads?

Matthew states re: teaching Ruby to undergraduates:

My take on some of its “clever” or “elegant” features is “how could I teach this to a bunch of first year undergraduates?”. I know from experience, it would be painful.

Ok, that’s cool. I have been out of the academic space for a while, so I can’t really comment too much on this. Though it sounds spurious.

Don’t something like 80%+ of CS undergrads drop out after their first CS 101 weedout course? From all the FizzBuzz talk on the blogs lately about how even many PhD CS students do not really know how to program, it seems like it doesn’t really matter which one of the top languages you choose to teach CS using (Lisp, C, Java, Haskell, Scheme, … heck, why not Ruby?).

People who can program will figure it out, those without the desire or natural inborn talent won’t or will struggle with Ruby (they’d also struggle with just about *any* language, even Basic).

Given the number of random hackers & non-CS graduates hacking up Ruby on Rails apps for their startups these days, I find it hard to believe that Ruby is really all that hard to pickup for programming newbs.

Always Consider the Source

Warren Buffet
Should you listen to Warren Buffet
for investment advice or someone
who cold calls you?

There’s an anecdote in one of the Millionaire Next Door books about one of the millionaires who kept having these financial stock picker “wizards” calling them up and pitching them on ways to make money in the stock market.

This particular millionaire was fine with getting information from someone who truly had been successful in the market and could show him the steps he took to achieve that success.

So he asked the cold-caller to send him a copy of his last 3 years tax returns. Of course, that’s when the stock wizard hedged and decided to find another sucker.

That’s all I’ll say about that — if you want to build webapps that are used by over 100,000 people, I’d listen to 37 Signals, over, say, someone coming from an academic background with less experience building real-world apps. (With all due respect to the author of this particular Ruby article.)

Choice Responses to the Article - Some of the gems

Jason Watkins:

You, like everyone who has parroted versions of this rant since the original “worse is better”, still miss the point. The only thing that’s going on here is you’re hitching your contrarian cart onto the hype bandwagon.

Scripting languages, even horrid ones like Perl, gain popularity because they are good tools for the activities people need to do. The ROI of these languages is tremendous.

It would have been nice if this article had some real content. Your only specific example is quite possibly the least interesting criticism of ruby I’ve seen to date. Far more interesting ones are the differences between object, class object and module or between lambda, proc and block.

And from Yan Pritzker:

Oh come on here people who cares, really? Why get all wound up about something as silly as programming language syntax? Ruby is _fun_. Who cares if it defies your expectations of what the + operator should do. To me, it was perfectly logical to mean set union when used on two arrays, but that’s besides the point.

You see most people using Ruby are using it to solve real world problems, like building the next generation of web applications. These are not times to bicker about syntax, these are times to have fun with your language to get your job done faster. Programming is a means to an end, and if you take it so seriously as to have to deride a dude who created a really creative book with cool artwork and a sense of humor to boot, you’re missing the entire point of what being a programmer means.

What’s your take? I’d love to hear your thoughts (pro and con against Ruby) in the comments!

5 Responses to “What’s Wrong with What Matthew Huntbach Finds Wrong with Ruby”


  1. 1 Matthew Huntbach Mar 19th, 2007 at 10:23 am

    Yet another person who hasn’t managed to grasp the point I was making with my array addition example.

    No, I did NOT say that [1,2,3]+[10,20,30] should be [11,22,33]. I pointed out another article where someone suggested that’s what it should obviously be. I did this not to say this was the main thing I found wrong with Ruby, simply to give a fairly trivial example of what one person finds obvious another might not. I raises this just to urge caution about the argument, used a lot by Rubyists “it’s a good language because it’s obvious what all its constructs do”.

    Good computer scientists ought to understand principles such as abstraction and proof by finding a contradictory case. Therefore, good computer scientists ought to have no trouble understanding the real point I was making here.

    On the point about teaching Ruby to undergraduates, what I was pointing out was, contrary to some of the Ruby hype, that I don’t think, from my experience, that Ruby will make learning to program any easier. The fizzbuzz discussion shows this - if people are having trouble with simple stuff like this, does something like Ruby dropping static typing really make things easier? If they can’t do fizzbuzz, are they really going to understand some of the fundamental aspects of Ruby? Again, I’m simply trying to counter some of the hype about Ruby.

  2. 2 Shanti Braford Mar 19th, 2007 at 7:25 pm

    Hi Matthew,

    Thanks for stopping by.

    You make a good point about FizzBuzz.

    Ruby (and more specificically Rails) doesn’t shine in doing problems like FizzBuzz.

    It’s sweet spot is in building real-world webapps, so yeah, perhaps Ruby should not be used as a language taught in schools. (a point made above)

    “Good computer scientists ought to understand principles such as abstraction and proof by finding a contradictory case. Therefore, good computer scientists ought to have no trouble understanding the real point I was making here.”

    I’ll grant you that. Of course, I’d rather build webapps used by hundreds of thousands of users than be considered a “good computer scientist.”

    But that’s just me, and where I’m coming from on this blog. Cheers!

  3. 3 Matthew Huntbach Mar 28th, 2007 at 7:00 am

    No, you’re still not getting my point.

    Ruby works fine with FizzBuzz.

    Rails is a tool for building WebApps which makes use of Ruby.

    Ruby and Rails are not the same thing.

    When I say “good Computer Scientist” I’m talking about very basic skills in logic and reasoning. What I find frightening about this whole raft of comment across the net on my original article is how many of those commenting on what I write seem to lack basic reasoning skills and thus seem unable to follow what I thought was fairly simple little arguments.

  4. 4 Shanti Braford Apr 5th, 2007 at 4:17 pm

    Matthew - I got your point. Perhaps you didn’t express them very well (your arguments).

  1. 1 Shanti’s Dispatches - Great Comments on a Ruby Detractor’s Article Pingback on Mar 16th, 2007 at 7:28 pm

Leave a Reply