Thursday, January 23, 2014

Ruby: Lord of the Flies Programming

Ah, Ruby.

A friend who is learning computer programming right now asked me about my dislike of Ruby:
Can you explain (in high level language) why you dislike Ruby/Rails?  I
have no opinion one way or the other.  I'm just curious, why  so many
bootcamps teach RoR over, say, Python.  It seems to me that RoR is VERY popular right now.  Why do you think that is?

Here's my answer:

To answer your question, the reason (in my very opinionated opinion) why so many people are teaching RoR is simply all the hype.  There's no good technical reason to use Ruby for anything, but that doesn't stop people.

You get people who don't have the education to realize how badly Ruby sucks as a language (more on that below) and they think "wow, this is great, look at all the web app I can make in RoR"  and without good counter examples they develop a warped idea of the actual utility of the system.

Now, to be sure, Rails was a way better way to make (quick and dirty, simple) web apps than what people were doing up to then.  Rails was something of a revelation.

Rails was so good (compared to what went before it) that it was immediately copied in other languages (Hello Django!)   But now that we have web app frameworks in other, less insane languages there's NO reason to learn or use Ruby (unless you want to work at a place that insists on using it, or you're just curious.)

So, why does Ruby suck as a language?

The basic problem with Ruby is that is is NOT a computer language.  The folks who made Ruby were ignorant of the history and vast body of work that has gone into the study and construction of formal languages.

They were so innocent of this knowledge that Ruby DOES NOT HAVE A GRAMMAR!!  

This is an insane thing to do: creating a computer "language" without a formal grammar.  Essentially Ruby was made by children.

How bad is this?

It is very very bad.

Essentially Ruby was made by INSANE children.  "Lord of the Flies" kind of stuff.

But does that stop anyone from hyping it or using it?  Pardon me while I go shoot myself.  Bleah!

Rails is Ruby's only "killer app" and that's why anyone outside of Japan (and language geeks) have ever even heard of Ruby.

But now we have Django, Flask, etc.. so you don't have to use Ruby.

(Also, I just don't like all the little symbols.  Python (for example) went the other direction and eliminated many of the typical syntax constructions, or simplified them.  Made it much nicer.  Ruby plows head first into the Perl-ish garbage with a vengeance.)

1 comment:

scjody said...

The other rationale for choosing Rails these days is the number of good third party libraries for it compared to less popular frameworks like Django. I've used Django extensively and dabbled in Rails enough to see the truth here. Also, there seem to be more well-integrated frameworks for client side testing and the like.

All in all I'd still choose Django - I agree that the underlying language is much better. But Rails is still a sensible choice in a lot of cases.