A ‘When Rails Fails’ Follow-up

About 18 hours ago I posted When Rails Fails, in which I showed what happens if you make simple mistakes in your Ruby on Rails code. The response was pretty massive. 30 comments were left on the post itself, and more discussion takes place on reddit and hacker news, plus I received some messages on twitter. Most memorable is this one.

Criticism of the article falls into a number of categories.

Category #1: Denial

You are talking crap, those error messages are pretty good!

It saddens me that these error messages are perceived as “pretty good”. It tells you something about the state of tools today. If we go back to more basic programming, for instance in Java. You write code which contains errors. You compile the code, the compiler tells you “this objects has no such method at …”. “That class does not exist at…”, “variable not declared at …” You may hate Java and everything it stands for, but admit it, having this type of error messages is pretty convenient, isn’t it? Wouldn’t you prefer clear to-the-point domain-specific error messages over a stack trace with an obscure error message? If you say that the error message makes perfect sense, that’s only because you’ve encountered it before and remember how to resolve it, not that the error message is in fact clear.

When I mistype the name of a controller in routes.rb and the error I get is “uninitialized constant HommeController”, that is a bad error message. Better would be “At line … you refer to controller ‘homme’, but no such controller exists.” Are you honestly going to argue with that? You may say, “sure that would be great, but this is enough for me, I can handle these types of error messages.” And sure, you may find these errors acceptable and trade off well with the advantages of Rails as a whole, but do not tell me these error messages are perfectly fine.

Category #2: You think this is bad, try a Java framework!

Tell me about it. I have no intention of singling out Ruby on Rails here. I’m in no way a Rails hater. Rails was simply my first example to uncover there is a problem here. Later today I’ll publish a similar post about the Java Seam framework. Update: Here it is: When JBoss Seam Fails.

Category #3: You are simply a bad programmer!

I can’t help but immediately judge the author to be one of those NNPP’s who spends days tripping over ridiculously simple issues because they never really grokked how to debug in the general sense. I’m not claiming the author is an NNPP, I’m just saying when you get hung up on the basics like this that’s the impression that is conveyed.


I hate rails for several reasons but either you just started programming, or you are trolling.

I like these, especially since I clearly pointed out:

To test this out, I followed Rails’ “Getting Started” guide and made “accidental” mistakes along the way, to see how the system would react.

I made these mistakes “accidentally” (note the quotes). Quotes imply sarcasm here. And I’m not even going to defend my programming abilities.

Category #4: Poor attention to detail is going to bite you in the ass as a programmer no matter what technology you’re using

True, but it is the tool’s job to help you as much as possible when you do screw up, which you inevitably will. Rails (as shown) does a fairly bad job at that. However, not everybody seems to agree, from the comments:

Wrong. It’s not the framework’s job to do anything. Rails isn’t for lazy people.

It’s not the framework’s job to do anything? Are you serious? Why do you use it? Isn’t the point of Rails to do less work, to make web development fun, to make work more productive? Isn’t making mistakes part of that?

Category #5: Where are your tests?

Would my error messages be less obscure if I uncovered them by writing unit tests? At most it would make localizing errors easier.

Category #6: If you don’t like it, go use Java! Screw you!

Very mature. When I post my article about Java Seam today I expect far less response, or at least far less radical responses like these. People tend to get religious about their programming language. Today Ruby on Rails is their God, so whomever says a bad thing about it, shall be damned. And screw you too, for that matter.

Category #7: Let me help you

There were a number of people that offered me help, teaching me how to debug these issues even offering to contact me and help me out. I appreciate that a lot. It’s sweet. And it’s great that there are such friendly Rails people. I am not a struggling Rails developer however. I am interested in Rails, because we’re developing WebDSL, a Rails competitor. I’m looking at various web frameworks and observed that simple programming mistakes are often fairly difficult to track down. In WebDSL we attempt to solve this problem. I appreciate the intent, though.