Cargo Cult on Rails
August 20th, 2009
I’ve been coding in Ruby for a long time, and I love the language. It has all the object-oriented power of Smalltalk, the functional power of Lisp, and the concision of Perl. It is so powerful that it enables programmers to devise entirely new ways of writing software, and that is the hallmark of a good language.
The trouble is that some of these new ways of programming aren’t good ways of programming. Over the last five years we’ve seen the ascent of Ruby on Rails and the Rails Way of doing things. I’ll be the first to admit that Rails revolutionized web development. But it has taught an entire generation of web developers to think like a cargo cult, and that’s not good.
Convention Over Thinking
Rails’ mantra of convention over configuration is brilliant. I love it. But somewhere along the line the message got skewed and people started thinking that everything should be a convention. Every web app should be written exactly the same, and the only thing that changes is the bits between the browser and the RDBMS. Rails is the glue that holds it together, and you just need to describe the data.
The trouble is, that kind of thinking is just plain wrong. As the folks at Twitter discovered, not every problem is a nail that can be hammered. Sometimes they’re screws, or bolts, and they need different tools to fasten them down. That’s why writing software is hard. It requires thinking. If you’re not thinking to see if the conventions are actually correct for your application, then you’re doing it wrong.
Rockstars and Groupies
The Rails community seems to love its rockstar programmers. Big personalities like DHH, Ezra, and Yehuda are practically worshipped. When they speak their minds its taken by many as gospel truth. Because conventions are so important, they need somebody to tell them what the conventions are, so the rails groupies flock to their rockstars to be told how to write their applications.
People, that’s just sick. You need to be thinking for yourselves. Who cares what DHH thinks? What do you think? Your application should not look like some celebrity programmer tells you it should. Your application should be custom-built to solve the problems in your domain. You are the expert in your domain, so look no further than yourself.
Framework-Driven Development
What it comes down to is that Rails developers are just that: Rails developers. They’re not software developers, at least not most of them. Their entire software devlopment world is built up around this framework. They only know how to do things the Rails Way. Their framework dictates how their systems are designed instead of the problems the systems are designed to solve.
The real irony here is that this is exactly the kind of problem Rails was running away from. Five years ago, you couldn’t write a Java-based web-app if you were just some developer who happened to know Java. You had to be a Struts developer or a J2EE developer because you needed to know the deep inner workings of the framework you were going to use. Now Rails is the same way.
Congratulations, Rails, you’ve turned into your parents.
August 21st, 2009 at 1:35 am
Hey, we still have PHP! Yeah! (starts slow clap).
November 17th, 2009 at 6:13 am
i’m not a rails dev (yet), but …
“Who cares what DHH thinks?”
i’m the first to admit that there are a lot of programmers out there who are better than i am. sometimes, they’re even _smarter_ than me. sometimes there’s code i’m interested in but can’t wrap my head around it regardless how hard i’m trying.
i learned a lot from them and hopefully will continue to do so. DHH is probably smarter than your garden variety rails dev; at least he did something right (otherwise he wouldn’t have had the idea for RoR), so yes: when he tells you something, *it might be true*.
“What it comes down to is that Rails developers are just that: Rails developers. They’re not software developers, at least not most of them.”
but this is true for almost everything and -one. think about all the half trained java monkeys (ha, everybody likes to pick on java monkeys. makes me feel better about doing *whisper* php).
and …
- lots of web devs are just that (to be honest, i activley dislike coding things that have UIs other than browsers and the cli).
- lots of embedded system devs are just that.
- lots of database programmers (think PL/SQL) are just that.
- most game devs may not be that, because they have to master just about everthing. they’re probably the exception to the rule.
rails is a tool. you need to know programming to use it. most other things i – or we – have to work with are exactly the same thing.
your advice practically is: “so, you’ve mastered rails? congratulations! now go learn something different.” but it comes out a bit confusing.
November 17th, 2009 at 8:23 am
I would like to post a comment, but I’m not sure how I feel about this yet. I need DHH or Ezra to blog a response to this first. After which, you can be sure that I will be very opinionated.
November 17th, 2009 at 9:22 am
It has all the .. functional power of Lisp
No it does not.
November 17th, 2009 at 10:01 am
[...] Sam Tesla, Alieniloquent. This pretty much sums up what I love about Ruby on Rails and what I hate about [...]
November 17th, 2009 at 1:31 pm
Ruby is an adequate hack and very good one for its original purpose, i.e., systems scripting. I don’t think it has all the qualities you ascribe to it though (”all the functional power of Lisp” etc)
It is good for scripting and Puppet is a testament to that. I wish more sys admins used ruby. Ruby developers (the rails set) on the other hand, seem to have developed an ill advised and un-called for illusion of grandeur that just refuses to go away.
All in all, the advent of Rails was pretty much a wash. It brought flash-in-the-pan fame to ruby, but also destroyed its soul. It will only be a shell of what it could have been by the time hansson and boys are done with it.
November 17th, 2009 at 6:31 pm
@schnalle: I was about to take issue to the concept that all developers were just whatever their specialty was, when you mentioned game developers…and yes, game developers, at least serious ones, end up having to master just about everything.
Some even do Rails…though I didn’t get farther than PHP (for random small web projects unrelated to video games). I know Ruby, but not Rails…and my first taste of Rails was unpleasant, in that it needed a huge directory tree to start a minor project. Very inelegant, IMHO.
November 19th, 2009 at 12:11 am
[...] dictates how their systems are designed instead of the problems the systems are designed to solve. Samuel Tesla If you are single and you want to do startups, stay single. Stay single for a while, startups can [...]
November 19th, 2009 at 2:18 pm
It’s quite easy.
Everyone who thinks one tool / framework / language fits for everything has not enough kowledge to be seriously called a software developer !
November 19th, 2009 at 2:37 pm
Talking in absolutes without any proof to back it up makes you look ignorant: “Rails developers are just that: Rails developers. They’re not software developers, at least not most of them.” Prove this.
I personally use C++, Java, .NET (C#), Python and Ruby. Everyone I know that uses Ruby or Rails uses at least 2 other languages. By uses, I mean has designed and built “productized” systems with the language. So they are tried and true developers.
What do you do besides wasting your time talking about crap that does not matter? Anything?
I agree that there is somewhat unchecked devotion to the “Rails rock stars.” However, most developers will never be as talented as the rock stars, so they clone and extend what these guys do. Not such a bad thing. At least they are not cloning and extending trash code. These guys did a really good job with Rails and continue to improve it. Again I ask, what have you done?
November 20th, 2009 at 2:19 am
In my opinion the real issue was in how Rails was sold: a blog in no time.
Of course a professional developer knows that pretty soon the convention will not fit your need and that you’ll have to go back to serious coding, including system issues, pain with deployment and bugs in the framework.
Still, if I hadn’t had at hand the easy approach of Rails (convention + scaffolding + Active Record) there are projects that I wouldn’t have started at home in the evening.
About rockstars and conventions: if the way you code depends on this or that sentence in an article or if you stick to a convention because you are lazy or you don’t know any better you are simply not working as you should, professional or not. You are the issue, not the language nor the framework.
BTW there are many good books out there that explain how to manage difficult problems in Ruby and Rails, including security, performance and more.
If you are not a pro, you can buy them and learn.
November 20th, 2009 at 3:51 pm
Comparisons with Lisp aside, I don’t think you can easily dismiss what Samuel is saying here.
As one of “those” Rails developers I have a problem with the way my job has become an endless series of small-scale, churn and burn projects. Gone has any sense of architectural development, a deep understanding of the core libraries.. all these things are unnecessary when the big decisions are made for you.
Some say this is a good thing – that eliminating the discussions on key architecture and adopting the conventions of an existing framework leads to faster and cleaner development. In part I agree, but as someone who has spent most of their career building applications with a larger breadth that the average e-commerce site I feel I’ve lost something.
So I agree with Samuel. I don’t feel like a software developer anymore, I feel like someone who fills in the blanks with code. I don’t resent Rails – but I do find myself yearning for something more.
December 1st, 2009 at 9:02 am
[...] dictates how their systems are designed instead of the problems the systems are designed to solve. Samuel Tesla If you are single and you want to do startups, stay single. Stay single for a while, startups [...]