(Update: Wow I got a record number of comments to this blog. Answers to some common themes at the end of the post)
Who are those who are benefiting from Ruby on Rails? Answer: O’Reilly Publishing, the authors Bruce Tate and Dave Thomas and a handful of consultants.
At last year’s conference, Tim O’Reilly had carefully analysed his book sales and was desperate to identify the next big thing. Same for the pragmatic programmers and for consulting companies wishing to push the next big thing. C# had been and is a disappointment. Despite a huge push it refuses to move up the Tiobe programming index.
I get the feeling that everyone needs a next big thing, and if there is not one, they create it. So what has happened to Java, after the spate of Beyond Java books? Answer: according to tiobe it has risen higher. So what is declining? VB.net and Perl. Not Java.
So am I ignorant of Ruby on Rails? We have two production applications running on Ruby. And how is it. Well, despite being perhaps no more than 5% of the functionality of our applications, Ruby on Rails is the number one consumer of Oracle CPU and logical gets. Why? Rails does not support prepared statements, so Oracle has to reparse every time. This is something that Java has had for years and years. And ActiveRecord seems not to have learnt Hibernate’s lession; that OR tools suck for performance and need caching tricks to make them work well. Also, our Rails apps running in (now unmaintained) fast-cgi regularly go awry and fork more processes. Each one creates a new connection to Oracle. So, the opposite of connection pooling; connection denial of service. And does Ruby support Unicode. Not really. And is Rails threadsafe? No. So, is it Enterprise Ready. Absolutely, according to those with a clear vested interest in supporting the next big thing.
Are these problems solvable? Yes, in a fashion. For example, I have been told that lighthttpd and Mongrel should be used rather than fast-cgi. And MySQL should be used rather than Oracle.
And does it matter that Ruby is 15 times slower than Java. Of course not. How could it! Just buy more hardware. And more hosting costs. And more System Administrator salaries.
After all, the productivity benefits of Ruby are so much greater than Java you will save all of the money in development. Or do you. Our experience was that Ruby on Rails took longer than Java would have. And what about maintenance. Well we just refactor as things change. Or do we? There are no Ruby tools that support refactoring. And nor are they are expected due to the difficulties of implementing refactoring tools for Dynamic Languages, or so I am advised.
And what about support. Well there is the Ruby mailing list. Which is quite active. That should be good enough for anyone.
And what about Python? Python is arguably a more mature dynamic language with a much larger developer community and number of libraries. Why does it suck? Underscores and “self”, according to one of the leading Ruby advocated. Wow, that sounds really bad. Doesn’t Martin Fowler’s Refactoring book recommend _ for fields? Must be deprecated. Oh and what about Django? Now this really sets the Rails people off. Why? Because it is Rails like. A rifpoff they say. Yes, but where do the Rails ideas come from. From my point of view it exactly what I have been doing in Java for years and years. So if Ruby can rip off from Java (most welcome BTW) why cannot Django ripoff Ruby on Rails? Answer, because the vested interests have decided there is money to be made from promoting Ruby, not Python.
In short, anyone who questions the benefits of Ruby on Rails is not with the program. You know, once upon a time, being open source meant being better because of improvements spurred by constructive criticism. Its about time the Ruby on Rails community accepted some.
Anyone for Haskell? Or J2EE 5?
(Answers to common comments:
1. Where are the line breaks?
Ah, sorry for that. This was a late night post, after a drinking session. Forgot to check “Convert Line Breaks” in the Text Formatting option. Also, I have been using Writely lately to blog, until it broke 🙂
2. Thanks for saying what everyone is afraid to?
No problem.
3. Why are you so ignorant?
I am capable of learning. Really. Enlighten me.
4. Why are there no references to back up your claims?
Some of the claims are explored more fully in other blog posts. The one about Ruby performance is based on freely available benchmarks. How important is it? The database is normally the slowest part, but it depends on your app.
5. Who was the nasty Railroader who claims django is a rip off?
I personally did not realise that django predated Rails. The Railroader was very tetchy about any success django might be having. He described django as “Rails-like”. The rip off part I think was was a false connection I made. I do however think that the django crowd have realised the importance of hype. So perhaps to that extent they have learnt something from the Rails crowd.
6. What about Haskell?
Sadly no one that posted was that interested in Haskell. Our speaker yesterday said it takes a year to get into it, so maybe that is why.
66 comments
Comments are closed.
Criticism is a good thing for sure. Only there is no criticism in this incoherent rant 🙁
For a change, why not to calculate, how much money was thrown for Java marketing, consulting, and books?
Interesting, I seen Oreilly’s talk before and really don’t think he can create these trends, he just follows them, sure he can add to the hype machine, but that’s like saying bush can start wars to contribute to haliburton, hold on…never mind… anyway, I think mostly developers are always looking for the silver bullet, and ruby is it right now best for many things, no doubt Python is second best. Also because python has been around little longer there’s some really nice libraries and some of these performance issues are little more solved, for example I was just looking at twisted, it’s a networking library for python, very cool, and I haven’t seen anything as extensive for ruby yet, but again its not about the language, it’s just about libraries, which are about mind share, as more people ruby more/better libraries will come.
I do believe that the hype and the fanboyism in the RoR community is not only pervasive, it is really hurting the growth of the framework.
–oxXXxo–
Every time someone talks about _any_ warts in the system or the crass commercialism being unleashed on the majority of the ‘community’ the fanboys really start pouncing on them.
–oxXXxo–
If you would notice there is a subtle shift in the way the traditional Ruby community is distancing itself from the obnoxious RoR BDFL and his fanboys.
–oxXXxo–
There was a very successful Ruby conference in Japan only a week or so before the RailsConf. Matz did not come to the first Rails conference. And for good reason. The RoR BDFL could have made a total a$$ of himself by once again showing everyone a big “FuCK YOU!” slide.
–oxXXxo–
If this is not a slap in the face, I don’t know what would be.
–oxXXxo–
I literally stopped listening to the DHH’s keynote when he started railing (pun originally not intended) against composite primary keys.
–oxXXxo–
Nevermind the fact that gigantic infrastructure dollars are invested in pre-rails systems. But rails would like to have your 40,000 table schema all run off of a frikkin _ID_ column per table..
–oxXXxo–
What this tells me is that RoR has transformed itself from a quasi “open-source” framework to a highschoolish clique with a bunch of fanboys with impending identity crises all hanging on for dear life to this strand leading to la-la land. Obviously there are the obligatory reverse-sugar-daddys who would like to give the group legitimacy by throwing their weight behind it. In exchange of course for sweet speaking deals and residual incomes from hastily written, shoddily published and already-obsolete “pragmatic” books.
–oxXXxo–
Note the recently announced synchronized audio+slides combo package for a small sum of USD 100! And the subsequent pouncing that was recieved by those who dared to squeak a little bit about the heavy price tag for a community which generally consists of tinkerers or broke students.
–oxXXxo–
Pet fanboy response? “Well, I make X dollars an hour, so I can afford it, why can’t you?” Nevermind the fact that only a small minority of railers actually make _any_ money, and whatever they have, they are expected to spend on stupid books and conference audios and 1500 dollar ‘seminars’ where you’re supposed to learn how you can be productive with this awesome “free” framework which is so easy and stuff. And I say, if that is the case, you shouldn’t really need that stupid book or overpriced training anyway.
–oxXXxo–
(NOTE: –oxXXxo– is paragraph boundary)
Hype? By book publishers? Say it ain’t so!
Java, on the other hand, was a strictly grass-roots effort, led by developers who were sick of working with tools that didn’t make things better. Oh, wait, no–that’s Rails. Java was the language with the billion-dollar corporation behind it, pitching it as the solution for every problem–write once, run anywhere, right?
It’s amazing how little publicity it takes for something to be “overhyped.” Think of it this way–how many IBM J2EE contractors could you hire with the yearly profits of Pragmatic and O’Reilly’s Ruby book sales? And if a handful of small software houses and independent contractors constitutes the building of a “huge support economy” by “vested interests” then what the hell would you call the C++ market? You’re going to run out of superlatives.
I mean, point to the marketing budget for Rails. Where is the money for an “advertising blitz?” Where are the ads in the trade magazines? Hell, where is the new Rails Monthly? This would be funny if you guys didn’t believe in it so much. There’s no infrastructure for the things you’re talking about, and all of the players you’re talking about as “vested interests” have at most minor or mid-level presences in the tech industry. Christ, figure out how much Dave Thomas is making and then compare that to Jonathan Schwartz’s yearly take-home. Are you even listening to yourselves?
Now for the helpful bit. Regarding your production problems:
Most of your complaints are actually pretty common, and they’ve been successfully addressed by other people. You may want to actually ask for help on the Rails mailing list the next time you have a problem with Rails. Saving up your frustration for a blog post gets you traffic but not solutions.
I’m quite confused. Are you talking about the same Ruby and Rails that I use everyday? That I just used to roll out a massive application (well, relatively massive). I hade over 20,000 lines of php that I was able to compress into less that 3,000 using Ruby and Rails. If that’s not impressive, I don’t know what is.
I think the big problem is that the things your value are not the things we value. I moved from C# to Ruby when I found Ruby to be a breath of fresh air. I’ve not used Java, but I do know that C# has more language features than Java. Ruby can do things C# can’t even imagine. It can do the same amount of work in fewer lines of code, which means ‘tada!’ easier to maintain.
You have confessed that you’ve not actually tried it. Your knowledge seems to come from second or thirdhand sources. So try it out. You’ll find it very impressive, I believe.
Implementing refactoring tools for Dynamic Languages is no problem. It’s only a problem if you ignore 30 years of experience.
http://www.refactory.com/RefactoringBrowser/
Fair points! Personaly, I use Ruby because I like Ruby. It suits my purposes and I enjoy it’s style and flexibility. It’s not a silver bullet.
If you don’t like it, don’t use it. If you are using it because somebody told you to, cause it’s the best thing, and it doesn’t live up to it… switch? If you invested a lot of time into it without doing your own research and testing and are feeling let down… Who is to blame?
And if you did your own, found it lacking and moved on, and are annoyed that others find it useful and are touting it’s features… Why do you care? Of course the Hype and Propoganda are intended to generate interest and therefor a market, profit. Isn’t that the whole point?
Saying that Rails is no good is not very different an attitude from preaching the Rails use. It is just a tool and has it’s advantages and disadvantages as any other.
Java is great but so is PHP; Oracle is magnificiet and MySQL is terrific; RoR is miraculous and Django is super-duper; thing is, they coexist.
And they all advance the technology.
Thanks for this article. I’m not actively against Ruby, but after I had started learning Ruby, I realised that Python, while syntactically slightly less compact than Ruby, has a far larger application spectrum behind it and is definitely much more mature. I too was a bit blinded by the Ruby hype, but it is no different to the PHP hype of a few years ago, and I prefer to not have to think too much about how much of a mess so many things have been with PHP.
So I switched to Python as my Perl ersatz for small web applications and scripting tasks.
As for comparing statically typed Java to dynamically typed scripting languages, well, it is as you say exactly those statically typed objects that enable powerful tools like Eclipse. Java is absolute overkill for small applications, but its maturity and huge support industry makes it, along with .Net really the only tool for large critical applications.
LoL, great post.
Josh: “It can do the same amount of work in fewer lines of code, which means ‘tada!’ easier to maintain”
False. Terser program code can be harder to maintain. (see most perl scripts)
Coda Hale: “share-nothing architecture”
Or if the glass is half-empty, you might call it a “recompute everything on every single request architecture”
“ActiveRecord/memcached plugin…”
Oooh that’s great. Instead of putting the result of my expensive computation in something so primitive as say my computer’s memory, I’ll open up a network socket and send it across the network to a non-distributed single point of failure using a primitive and feature-poor “caching” API which does very little that a cache API should do leaving it all up to the client library to write its own stuff.
memcached is trumpetted as the knight in shining armour that saves PHP, Ruby etc in the performance domain. Even the crappiest Java cacheing solution is orders of magnitude faster. Very high traffic websites live or die based on one thing: cacheing. In Java app servers, cacheing is trivial. Drop in your chosen jar, set some properties (do you want distributed cacheing etc) and that’s it.
Bob Aman: “If I need performance, I use C.”
Don’t you mean if you need manual memory management, buffer-overflow security nightmares and lovely platform specific code?
I love Ruby,Python et al. As Greg discovered though, using them in real world high traffic sites can be painful disappointment when compared to such dull outmoded technology as Java.
It will be great when JDK 6 is production quality and we can script more closely within the VM. Switched on Java developers have been using beanshell, Rhino, groovy and so on for lightweight programming against arbitray Java libraries in the VM for years.
Everybody will benefit if Ruby, Python etc run well on the Java VM. For me, the VM was always the coolest thing about Java, the JDK itself being pretty dire in places.
The ultimate high performance web app would then use a Hibernate mapped domain model, with Java’s proven stable JDBC drivers, solid threaded servlet/JSP request processing, and the top layer of framework code and scriptlets written in Ruby.
Rails would then assume its true significance: Just Another Web Framework. Nothing more, nothing less.
A few years ago I decided to seriously learn another language. The choice was between Perl, Python and Ruby. I had always liked the charm of Perl, but the syntax was just too much. I had tried Python before, but was struggling with “whitespace issues”. After looking a bit at Ruby I decided to give Python another go and haven’t looked back since. I guess I just didn’t like the Ruby syntax (too much borrowed from Perl).
I really have no idea why Ruby is getting all this attention. I can’t help being just a bit dissapointed and I can’t remember Python ever getting the same amount of attention as Ruby is getting now – and it’s been around for alot longer. I doubt there is anything you can do in Ruby that Python can’t do just as well.
Is Ruby so much better? Surly a language should be expected to be used for more than just web development, because let’s face it – most people who learn Ruby today use it with Rails.
No, if you’re interested in writing and READING code then Python is a safe bet. I am 99% sure I can read any Python code without much effort because of the mandatory whitespace in the code. It took a bit of getting used to, but now I feel right at home. I don’t think you can say the same thing about Perl or Ruby.
Lee, I agree that Python’s block formatting makes it very readable compared to most languages (I never thought I would approve of whitespace significance in a language but it actually works well IMHO).
To me, Python’s core APIs seem a bit confusing though. Why len(str) instead of str.len()? Why separator.split( target ) instead of target.split( separator )? I get confused about the use of dict() and tuple/list distinctions. The % syntax string interpolation seems archaic (yes I know there is the template module) and harder than Perl or Ruby’s “$foo” and “#{foo}”. Not major issues and I’m sure I’d get used to all this if I programmed in Python more regularly.
Personally I really like Ruby’s similarity to Perl (but then, I’m a Perl fan). Tightly integrated regex support is a major plus as far as I am concerned.
On a side note, I came across a Perl module to allow Python code within Perl, and also a Perl hacker who’d overridden some Perl internals to allow Ruby style message passing. So you could write things like “2.times { block; }” and “2.plus(2)” in Perl.
What really bothers me about this post is not the bashing of Ruby or of Rails. That’s commonplace and if you’re going to complain instead of moving on or trying to help fix the problems, then that’s your problem. Congratulations on your 15 minutes of fame.
What’s most disturbing is that you blame Tim O’Reilly for the hype on RoR. The Rails meme had reached meteoric scale way before O’Reilly posted to the Radar about the growth of Ruby book sales. And that’s not even hype, that’s just reporting the facts of the sales and trying to interpret them.
37Signals just worked the market correctly and got the meme going themselves. Do they stand to gain from RoR being hyped? Only through notoriety because Rails is open source. Yeah, they sell books too, but they’re much happier with their self-published book than their books through publishers.
Your post is so full of assumptions and leaps that the legitimacy you do have is crushed under the weight of them all. Write this post again and focus your arguments.
>> But rails would like to have your 40,000 table schema all run off of a frikkin _ID_ column per table.
40,000 tables? How many organizations have a schema with 40K tables???
That’s exactly why Rails is so popular. It doesn’t cater to the 0.01% out there that MUST use something else. If you’re in the 99.99% that don’t have 40,000 tables in your schema, then Ruby/Rails is for you. Got 40,000+ tables? Then I’m afraid you and the other members of the 0.01% will have to continue coding in Java.
Um, maybe it’s me, but using the terms “huge support economy building around RoR” and “with it lots of vested interests in keeping the hype machine well fed” is sort of funny given the overlarge support economy built around Java (not to mention that it still continues to be overhyped as the only tool for all problems). The corker is “so hype is really the only lasting competitive advantage” applies to Java more than any other single technology I can think of.
For what it’s worth, EJB still sucks for the problems that RoR, Django, et al., are suited for because it’s too damned bulky (and yes, I’ve worked with Java for a *very* long time). Funnier still is that EJB1/2/3 are not backward-compatible so you get to rewrite your code again and again.
I made the observation to a colleague the other day that I’m sure that Java has a certain set of problems that it’s appropriate for but apparently the work I do with enterprise systems with web front ends is not among that set of problems. Wanna know a dirty secret? Java is one of the primary reasons that jobs are outsourced to the Far East and Eastern Europe. They have plenty of developers skilled in those technologies and they’ll work for a remarkably lower wage (not to mention the tax benefits for the company that is outsourcing work which is the real reason they do so).
YMMV…..
BTW, for those who know nothing of Rails there are ways to change the primary key from ‘id’ to something else. Of course, one would have to RTFM to know that………
Howdy Greg,
I’m very interested in Haskell, having done loads of it at uni, but I think that’s just a dream 😛
I agree with much of what you’ve said, having evaluated RoR and come up with too many issues (unicode being the showstopper at the time, although perhaps it isn’t now), and am about to embark on a new enterprise app using JEE5, JBoss and JBoss Seam.
However, I do think the Prepared Statement issue is a red herring. Oracle has a CURSOR_SHARING setting which may help if you set it to “force”, and although you say Java has had PrepStats for years (which is true), earlier JDBC drivers (pre 1.4 I think?) didn’t do prepared statement caching, so you only really got benefit if you kept your PreparedStatement objects open and rolled-yr-own PS cache. This particular issue is one that will be easily fixed in the RoR world (unlike unicode).
Thanks for being “brave” enough to get flamed down by those who buy into all the hype just to be cool.
Disclaimer: I probably would recommend RoR for mickey mouse web apps, but they aren’t the kind of apps I’m interested in writing.