- Don’t use a model named Attribute, because “has_many :attributes” will bust your code for reasons I honestly have no interest in
- Instead of the popular string.replace(/foo/g, “bar”) convention for doing find and replace in strings, Ruby uses a funtion called gsub, thereby stealing another 5 minutes+ of my time looking this shit up for no good reason.
- There is some cleverness in RoR, but it is so bound up in brittle naming conventions that I doubt I will ever appreciate it. Especially the automatic assumptions based on pluralization of identifiers… god I hate this nonsense. Compared to this Python’s semantic whitespace is positively charming.
- Even though rand(n) returns a random integer from 0 and n-1, the condition “if rand(2)” will always be true, so you’ll have to write it as “if rand(2)==1″.
- default_scope would be very useful if it could be easily overridden in named_scopes. Unfortunately this is not possible, so a potentially convenient feature becomes an evil hack which you’ll have to remove at some point when it bites you in the ass.
I’ve been working in RoR for a few months now, and on the whole I think it is a pile of crap designed to help you write web apps for 2004. Contrast this with 2 other technologies, Git and jQuery, which I’ve utterly assimilated and embraced within the same period of time. Honestly I’d rather be working in PHP, because it doesn’t impose a methodology on you, nor create a million files for a “hello world” application.