So, for a class this semester I have to use Ruby. Specifically, Ruby on Rails. I have two major questions: Who the **** designed this piece of ****, and why the **** does anyone like it?
Here's why it sucks, in a nutshell:
(There are more reasons but really these are sufficient.)
1. Mutable strings. WTF?
2. Capitalization has semantics--capitalizing the first letter of a variable tells Ruby that you mean a class.
3. "until" and "unless" and other ridiculous syntactic sugar, because it's so much better to have a million keywords than simply understand the simple boolean operator of "not".
4. Control flow operators are actually expressions. What? You mean I can attach them to the end of any statement? Oh boy, that couldn't be confusing in the slightest. No chance for abuse there, nope.
5. Bare words: %w(stuff). No. Just no. Use quotes.
6. Implicit function calls without (). So, in ruby, functions (actually methods here) are values, like many functional languages. So you can pass methods around, but be careful! Ruby tries to figure out when you're trying to pass a method and when you're trying to pass the return result of a method, but since it has implicit calls without (), you can never quite be sure. Yay.
Now for the real kicker: PLURALIZATION HAS SEMANTICS. Yes, pluralizing a variable name has semantic meaning in Ruby on Rails. It has this excessively complicated "inflection" system for trying to figure out the correct plural form of the name of whatever class you create. If I have class Dog, then the associated table is called Dogs. But what if I have a table called Goose? Is it Geese? Gooses? Turns out rails knows the plural of Goose so it is in fact Geese. But what about fish? Octopus? Is that Octopuses or Octopi? Who knows! Better try it and find out!
Check this out:
God help you if you are writing an app for a foreign language audience:
Advice from one Rails nut: "do it in English instead!" Thanks a lot, *******.
What if I want to name my class Media? That's a plural form!
Too bad! Change the name, because ActiveRecord is dumb.
I want to find whoever thought this was good idea and string him up. This is insane. And what's worse is that people who use Ruby on Rails are completely religiously infatuated with it. Won't hear a word against it. They say it's the Next Big Thing. It's terrible.
Here's why it sucks, in a nutshell:
(There are more reasons but really these are sufficient.)
1. Mutable strings. WTF?
2. Capitalization has semantics--capitalizing the first letter of a variable tells Ruby that you mean a class.
3. "until" and "unless" and other ridiculous syntactic sugar, because it's so much better to have a million keywords than simply understand the simple boolean operator of "not".
4. Control flow operators are actually expressions. What? You mean I can attach them to the end of any statement? Oh boy, that couldn't be confusing in the slightest. No chance for abuse there, nope.
5. Bare words: %w(stuff). No. Just no. Use quotes.
6. Implicit function calls without (). So, in ruby, functions (actually methods here) are values, like many functional languages. So you can pass methods around, but be careful! Ruby tries to figure out when you're trying to pass a method and when you're trying to pass the return result of a method, but since it has implicit calls without (), you can never quite be sure. Yay.
Now for the real kicker: PLURALIZATION HAS SEMANTICS. Yes, pluralizing a variable name has semantic meaning in Ruby on Rails. It has this excessively complicated "inflection" system for trying to figure out the correct plural form of the name of whatever class you create. If I have class Dog, then the associated table is called Dogs. But what if I have a table called Goose? Is it Geese? Gooses? Turns out rails knows the plural of Goose so it is in fact Geese. But what about fish? Octopus? Is that Octopuses or Octopi? Who knows! Better try it and find out!
Check this out:
God help you if you are writing an app for a foreign language audience:
Advice from one Rails nut: "do it in English instead!" Thanks a lot, *******.
What if I want to name my class Media? That's a plural form!
Too bad! Change the name, because ActiveRecord is dumb.
I want to find whoever thought this was good idea and string him up. This is insane. And what's worse is that people who use Ruby on Rails are completely religiously infatuated with it. Won't hear a word against it. They say it's the Next Big Thing. It's terrible.
Comment