Rails sucks? 61
With astonishing regularity, articles or posts come out claiming that Rails sucks in some way or another. People complain that Rails isn’t as easy to deploy as PHP, that Rails just didn’t do it for project XYZ. They range from the articulate and well thought out to the frankly inane and stupid (and wrong). Recently, there’s also of course been the spectacular nuclear rant by Zed Shaw, which was more a rant against random elements of the community than against Rails, but was still presented as a rant against Rails.
These anti-rails rants come in so regularly, and have been doing so for so long, that some people even bothered to write pre-emptive rant responses, like the Six ground rules for rails sucks articles, written all the way back in 2006. RubyInside even has a Troll of the month category that will provide some fun reading.
Perhaps this means that this article is redundant. Oh well. It does get tedious after a while, to read all these rants, and I felt like writing my response to them too.
Why people say Rails sucks
There’s a large number of reasons why people come to the conclusion that Rails sucks. Here’s a by-no-means-exhaustive list:
- It’s too slow
- It’s not easy to deploy
- It uses up a lot of RAM
- It’s not as easy as PHP
- It’s got weird syntax
- The manual is too long
- The manual is too short
- The creator of Rails is arrogant and eccentric
- It doesn’t work with my specific project
- It doesn’t scale
- It’s got this obscure problem that no one can be bothered to fix
- It’s not thread-safe
What they all boil down to, in effect, is that some people get immensely irritated because Rails does not conform to their idea of perfection. They have some specific requirement that Rails doesn’t support, and they post rants about how “they” (the rails core team) owes them to adapt Rails to their requirements, or how “rails sucks” because it doesn’t do exactly what they need out of the box.
I’m sure you can see the obvious shortcoming of this approach, but let’s break it down, because there’s several aspects to this complaint which make it very, very wrong.
1. Rails owes you nothing
Rails is entirely free. You can run it on any OS you like. You can run it with a free DB or a paying one. You can rip out the bits you like and discard the rest. You can even make changes to it if you want (and with a plugin like Piston, you can keep your changes tracked even as Rails evolves and you update it to the latest edge revision).
No one in the Rails world owes you a thing. In fact, if you’re using Rails, you have a big debt to the Rails world. Most importantly, all of us using (or trying to use) Rails owe DHH a big one for being so kind as to share his framework with the rest of the world. Even if you decide that Rails is not for you, you still have to recognise the influence that Rails has had on web frameworks everywhere - and it’s a very positive influence.
The Rails core team also doesn’t owe you anything. They are all volunteers who work on it for free. You owe them.
So stop thinking that Rails owes you something. Rails owes you nothing. You owe Rails.
2. Rails isn’t perfect
There’s no such thing as a perfect web development framework. All of them (including Rails) suck in one way or another, once you use them for real stuff. There’s no such thing as a perfect language, either. All of them (including Ruby, Lisp, Python, haXe, Erlang, Lua, etc.) suck in some way. In fact, there’s no such thing as a perfect anything - whether in the world of computers or outside of it. Everything is imperfect. If you want perfect, then die. If the Christians are right, you might go to heaven and witness perfection. I wouldn’t bet my life on it though.
There’s a certain maturity in realising this, and it seems that most of the anti-Rails ranters lack that maturity. There’s a point in life where it suddenly dawns on you that no choice is ever perfect, no matter how much you may try or how perfect it may look before you put it in practice, and that you have to satisfy yourself with the best choice, rather than with illusory perfection. For those on whom this never dawns, everything is perpetually dissatisfying.
I’m not saying you should settle for crap. No, strive for the best that you can. Create something even better if you can and have the inclination. But accept that everything has limitations and shortcomings, and that a good choice is one which balances the trade-offs between the available choices to maximise whatever it is you wish to maximise. In some cases, that might mean accepting slower out-of-the-box performance in exchange for quicker development and better maintainability.
Back to the Rails argument, this becomes especially clear once you’re put in the position to decide which language and framework to use for your project - for instance when you are starting a business around that application and it really matters. With that experience, there is a very clear learning point: each framework is imperfect, but your responsibility is to choose the one that makes most sense for your specific project. Once you’ve made your choice, you can even change it, sometimes - but do so with the knowledge that every framework you try will have its own shortcomings.
But, at the end of the day, there’s no point in complaining that Rails isn’t perfect. Yes, it’s not. If that’s news to you, you’ve got a bit of growing up to do.
3. Rails isn’t suited for all applications
There are many situations where Rails isn’t the right choice. If you’re writing a high volume transaction processing system for a bank, don’t write it in Rails. If you’re writing a 3-page web presence for a hairdresser, don’t write it in Rails. Rails is extremely good for a certain class of applications (medium to large web applications), in a certain set of circumstances (particularly well suited when getting something out soon is of paramount importance).
If Rails isn’t right for your project, that doesn’t mean that Rails sucks. It just means that your project isn’t right for Rails.
4. Rails isn’t suited for all people
Rails is a smart and opinionated framework. It’s built to allow smart people to leverage their skills to be many times more productive than many other web development frameworks. And it does so - for me, and for many people I know. It allows these smart people to be very productive, create clear, maintainable code, and have fun while doing it.
This doesn’t mean that you can do it too. And you know what, those people don’t care whether you can do it too. They’ll help you if you ask for help (I know several Rails core developers and they are without exception friendly, polite, helpful people - and that’s not even counting the rest of the Rails community, who are also very helpful). But if you decide Rails is not for you, no one will shed a tear.
This, to me, is actually a positive feature of Rails.
Because you have to be smart to write good Rails code, it’s easy to tell smart developers from not-so-smart ones, because the latter just won’t be able to cope with Rails, whereas the former will often take to it like a fish to water. (see comments) - It’s much harder to fake being a good Rails developer than it is to fake being a good PHP developer.
Not “getting” Rails doesn’t mean you’re stupid, mind you. Some people don’t get Rails simply because they think differently. Others say that Rails is cool, but they prefer something else (e.g. Django or some Lisp or other). That’s fine. If you don’t like to think in the Rails way, no one’s forcing you to use Rails.
Rails may not be for you, for any number of reasons. That doesn’t mean Rails sucks.
5. Rails is extremely flexible
The thing that really gets me about people who rant about how Rails doesn’t do what they need is that Rails is by far the most versatile framework I’ve worked with. When Jakarta Struts didn’t do what I wanted in the Java world, I had to make wild and ugly contortions to get it to work - or even turn around and tell my boss “Sorry, we can’t do this because xyz”.
Every time I have a “different” requirement, I am astonished to find that either there’s already a way designed into Rails that allows me to do it easily, or it’s a neat, well contained three-line hack to get it working. I’ve never seen this in any other framework (including the ones I wrote myself). Everywhere else, there always comes a point where you have to turn around to the client and say “it can’t be done”. That just never seems to happen when developing web applications with Rails.
This applies to all enhancements, from performance improvements to functional extensions. If your ActiveRecord query is too slow and causing a bottleneck, you can bypass it with some inline SQL or even memcache it. If you need to get Rails to produce a custom binary output, you can. If you need custom table names that don’t fit the convention, you can. If you need to override the dynamic finders to do things slightly differently, you can. In most other frameworks, you can’t do anything unless it’s been thought of. Rails is the most open and versatile web development framework I’ve ever worked with.
That’s what really gets me when people say things like “Rails doesn’t scale”. First of all, that statement is based on outdated information, and secondly, Rails code, when written properly, is so clean and easy to work with that locating and optimising bottlenecks is a breeze - much more so than in many other frameworks.
So if Rails doesn’t yet do what you need, don’t complain that it sucks. Do write a bit of code to make it do what you need.
There are many valid reasons to use something other than Rails, but do yourself a favour. If you decide Rails isn’t for you, don’t post a rant about how “it sucks”. You’re only making yourself look dumb by doing so, and while it may be amusing for the rest of us, it’s really not doing yourself any favours.
Feel free to post comments below to tell me that actually, Rails sucks for such and such reason.
Use the following link to trackback from your own site:
[...] http://mobxtreme.com/mobxtreme wrote an interesting post today onHere’s a quick excerpt [...]
[...] online community. The best part is ... it's all 100% free! Check them out here: Join Hey Nielsen! Inter-Sections » Blog Archive » Rails sucks? saved by 1 others mew1157 bookmarked on 01/11/08 | [...]
[...] Rails sucks? [...]