Sunday, 23 September 2007
Rails, the 15 minutes is Almost Up. Meet Erlang.
« ROA and SOA and Service Contracts | Main | Reflections on the Colorado Software Summit 2007 »- No high quality app server
- No language specification.
- Custom runtime VM that isn't supported by any well resourced organization
- Open source is not a substitute for open standards at the language or runtime engine level.
- You can quickly write code than nobody can understand, and several years later, people have done exactly that
- Duck typing doesn't save code, as it requires more unit tests or occasionally blows up on you
- Mixins aren't so great: A class's state and behavior specification shouldn't depend on its runtime history. I shouldn't need unit tests to verify my class can do what I think it's supposed to do - the unit tests waste more time than I save. Java's new static imports are a much better solution.
- Total lack of high quality enterprise features: transaction support is weak, SOAP support is weak, messaging is weak, caching solutions are weak, directory integration is weak, clustering is weak, multithreading is weak, etc...
- What do I do in the real world where my database already exists with 8 years of data in it and I can't design my schema to match the Rails opinions of what's best?
- Dynamic typing and Mixins make it nearly impossible to have tool assisted refactoring and good code completion. They are appropriate for small tasks with a low reuse quotient for 3rd party code (aka non-enterprise development).
- Opinionated software is great, if you are a follower-the-leader type who doesn't want to think about what's really best to solve your problem.
- Overuse of DSL's and embedding DSL's in regular code basically assure difficulty in maintenance. Your DSL's aren't as obvoius as you think. The reason everybody hates XML in java is not because it's XML (they don't complain about XHTML or RSS do they?) it's because they are really DSL's, but at least with editor support.
- Ruby is unbelievably slow. Slow. Slow. Slow. Don't say it doesn't matter because the database is slower, because it does matter. Ruby is like 6-7 times slower than Java. 2-3 times slower than Python and Perl.
- Reliability and scalability are crummy
Technorati Tags: ruby fanboy erlang 15-minutes
[Trackback URL for this entry]
Oops. Forgot to point out that closures probably won't make it into Java 7.
"I just bought the latest book on Erlang from the pragmatic progammers."
wow...you must already be an expert...time to rip on Rails to get some page views
get a life, dude
Erlang is just as dynamically typed as Ruby.
Your points about Ruby and the Rails philosophy in general is spot on. They'd better do some self evaluation and stop kidding themselves. Performance _is_ an issue.
You are attacking ruby, or ruby on rails? I am getting confused because after reading the blog entry 2x, its hard to understand why you would associate the hype around ROR with the language ruby. :)
You see, if you are on #ruby-lang and try to ask a ROR question, you are quickly pointed to the ROR channel. I think that says it all there is to say about splitting different issues or? Its not as if every ruby coder jumped onto RoR.
So please, stop associating them together.
I could go on ripping the points apart about ruby - at least, some are valid - but the ultimate problem is that you attack both ruby AND ROR at the same time.
You yourself use the hype. Why cant you separate ruby TOTALLY from any problem with rails? Then we could sit down and have a nice "blog-chat"....
ANGRY!
I dunno about "killed perl", really.
The perl community's mostly been sitting back and laughing at the ruby guys just as much as the java community has been - sure, we might not be called "enterprise" as much but the top end of the perl dev world has the same focus on clear, maintainable, working code that provides business value as everybody else with a brain does.
At dynamic language oriented conferences, we sit down for dinner with the python guys, swap ideas, and wonder when the rails fanboys will realise you have to talk to people who aren't fellow fanboys for $language or $technology to learn new ways of getting stuff done. And when they do, where we'll find a bigger restaurant to sit down for dinner in :)
See
http://chainsawblues.vox.com/library/post/why-i-use-perl-and-still-hate-dynamic-language-weenies-too.html
for some thoughts of mine on the fanboy topic (and why I decided it was time to get a blog to help remind people perl isn't dead, we're just more interested in getting stuff done than blogigng for the most part :)
Rails, the 15 minutes is Almost Up. Meet Erlang.
article hits the front page of digg, reddit, del.icio.us — all the usual suspects. Suddenly people are claiming Rails to now be in the “trough of disillusionment” cycle of programming languages. Were people
"One of the reasons I still like and use java, despite its problems, verbosity, and all that, is that when valid criticisms are leveled against java, the people in the java community don't make excuses, they slowly quietly address the problems."
How bout that it takes 10,000 lines of J2EE code (not to mention nightmarish config/setup) to do the same thing in 2,000 lines of Ruby?
I'll try Java again when it's addressed that issue.
"You can quickly write code than nobody can understand, and several years later, people have done exactly that" -- In what language can't one do that? =)
I can pick up any RoR app and close out a few bug tickets within the first day (usually first few hours) of getting access to its svn credentials. (I've done it many times before, inc. offshored Indian code)
I'm not going to follow my normal policy of "mostly no comments" because this is the sort of opinionated blog that can't be ruined by a few wise guy comments.
Asd - More power to scala then. I'm skeptical thought because what I understand about Erlang's concurrency depends on everything being final. The lack of shared variables is what powers it's features.
As for closures not going into JDK 7. The site's that track JDK 7 seem to think they're going in: http://tech.puredanger.com/java7#closures . What site are you getting your information from?
dkaz - I never claimed to be an expert on Erlang. But I know a scorned fanboy when I see one.
mb - What does it even mean for a language with no variables to be dynamically typed?
she - I thought I made it pretty clear: I enjoyed Ruby until the Rails idiots started mouthing off. I want them to shut up (or at least stop getting press).
Shanti - priceless image to start off your blog. To your point, LOC is possilby the worst software metric ever. Java is much easier to debug, maintain, understand, and reuse than Ruby. You're nuts if you think there's a 5-1 LOC improvement. Half of the the LOC reduction from Ruby is simply due to eliminating getters and setters which any IDE generates and puts at the bottom. First time write speed: yes ruby is faster. Since 80-90% of software changes happen after this it's largely irrelevent for enterprise development. I have chosen ruby for several tasks over java when the need for maintainability was low.
Bryan - if you are faster in Java than Ruby/Rails then more power to ya.
You're right, the initial drafting of the app is not where the bulk of time is spent. (but in rewrites & tweaking)
"Java is much easier to debug, maintain, understand, and reuse than Ruby."
You state it as if it's a fact. =)
I've worked with a few arrogant coders who thought they were god's gift to the programming world. Everyone always quit their team & left the company because it's such a pain dealing with someone so full of themselves, that they don't realize where their opinion ends & shades of truth begin.
Cheers!
You probably could have shortened the article by 70% if you didn't include your crappy rants. Not to mention some inaccurate stuff (are joking about ruby being unreadable? - it's a lot more readable than most things out there, besides Python; have you even looked at it?)
The problem with Erlang is that while the language itself is old and mature, the community is so freaking small/non-existent that you could probably count the number of open source Erlang projects that are both still being maintained and mature, even if you had missing fingers. Correct if if I'm wrong but does Erlang even have a good proven ORM?
O yeah Erlang also has competition from good old Java - in a little thing called Hadoop
haven't you read Raganwald blog post about not calling people "fanboys" ? OK summing it up, calling people "fanboys" turn you into one, amazing no ?
"No high quality app server"
- agreed on this one. But how many years did Java take until it's firs 'quality app server' came out?
"You can quickly write code than nobody can understand, and several years later, people have done exactly that"
- That's also true for Erlang, Lisp, C, Perl...
"Total lack of high quality enterprise features: transaction support is weak, SOAP support is weak, messaging is weak, caching solutions are weak, directory integration is weak, clustering is weak, multithreading is weak, etc..."
- Do it like the Java community: help improving...
"What do I do in the real world where my database already exists with 8 years of data in it and I can't design my schema to match the Rails opinions of what's best?"
- You make Rails use whatever you have. Seriously, have u ever tried it? I recently worked on a Rails app that uuses an existing db with around 50 tables and everything works smooth..
"Dynamic typing and Mixins make it nearly impossible to have tool assisted refactoring and good code completion. They are appropriate for small tasks with a low reuse quotient for 3rd party code (aka non-enterprise development)."
- Tell that to NetBeans. First release with ruby support and they are almost there already...
"Opinionated software is great, if you are a follower-the-leader type who doesn't want to think about what's really best to solve your problem."
- Design by comittee is great, if you don't care about having to maintain one thousand unnecessary features just because someone else thought he might need them when voting for the spec - and then they solve nobody's problems
"Overuse of DSL's and embedding DSL's in regular code basically assure difficulty in maintenance. Your DSL's aren't as obvoius as you think. The reason everybody hates XML in java is not because it's XML (they don't complain about XHTML or RSS do they?) "
- People don't like XML becaus is unnecessarily verbose. That's at least why the people I know hate XML in Java...
"Ruby is unbelievably slow. Slow. Slow. Slow. Don't say it doesn't matter because the database is slower, because it does matter. Ruby is like 6-7 times slower than Java. 2-3 times slower than Python and Perl."
- The old "Java is slow discussion strikes again..."
I can't remember now. Stephen Colbourne or Neal Gafter maybe? Anyway, they are still debating the proposals and Sun want to get Java 7 out quickly, so it seems very unlikely.
What's the opposite of 'fanboy'? I always wondered and figured you'd know.
Shanti - I never claimed I was "faster" in java than ruby. Often I am, sometimes not: I have chosen ruby over java several times for business tasks. Java has the tremendous advantage of having probably 10X the library support that ruby has. That makes the biggest difference in speed because I'm creating less of the total solution. Java's tooling support also makes it easier to use 3rd party libraries. This is where things like code completion, integrated javadocs, ability to navigate into the library source code to the declaration of a varibable, class, etc... pay off big.
As for stating things as fact: this is a subjective article - everybody understands that. My main point is to bash the fanboy mentality that has arisen around Rails.
As to commenters on "fanboy" - I had not read Raganwald. Thanks for the link, though. It's here: fanboy article. I disagree with his point. "Fanboy" labels a type of advocacy that needs a label so that it can be (appropriately) dismissed. I'm not here to advocate any particular language, so his argument doesn't apply to me.
I have no idea what the opposite of 'fanboy' is other than "anti-fanboy", which would pretty much describe me. I liked ruby until the Rails fanboys showed up, then I left. Every language can be improved and should be improved. No language is best in all cases. Learning multiple languages is important. One a year is a good guideline.
"But how many years did Java take until it's firs 'quality app server' came out?"
Don't forget Ruby is older than Java.
"...caching solutions are weak..."
Actually, this is the most viable panacea for slow Rails apps. For applications that aren't constantly writing new data, page or fragment caching in Rails solves many of these performance problems. You can even use memcached if you like.
Even the methodology of caching in Rails is java-ish: make an observer object for your model that purges the cache when certain actions (callbacks) are triggered ... can you say 1st gen AOP done right?
And as far as RoR fanboyism: new language/framework fanboyism is new to you? What about the late 90's when you couldn't even get a cup of coffee without hearing that Java would be the C++ killer? It's 10 years later and that still hasn't happened ...
My opinion isn't particularly important, but since I'm getting quoted here, I think it's fair game to speak.
"My main point is to bash the fanboy mentality that has arisen around Rails."
If the point of an article is to "bash" a "mentality," then words like Fanboy certainly belong in the article: they are in keeping with the tone and tenor of the piece.
My original point was that use of this word weakened an objective argument. Interspersed with this post's comments about fanboys (whatever that word actually means) are various objective claims about Java's value vs. Ruby's value in the author's experience.
IMHO, those points would be better served in a separate post where they are not upstaged by an entertaining rant. And sometimes, a rant is better served neat.
Reg - I do agree with your point about using "fanboy" in objective architectural discussions. I'm not advocating any language here.
Branden - There is no doubt that Java was over-hyped ten years ago. Are you expecting me to defend that? I won't do it. Take a look back at the Gartner Hype Cycle. The best thing a language can do is get through the hype as quickly as possible. The bigger the hype, the longer and deeper the trough that follows the hype will be.
If you read carefully, I'm not saying I hate Ruby and will never use it. I'm saying I won't use it in the present climate of outrageous hype. I wrote: "Once they [the 'java sucks fanboys'] go away, I might actually take up Ruby again." Running Rails in an environment like JRuby on Glassfish will address serveral of the complaints I listed. Unfortunately, JRuby will be slower than Ruby until JSR 292 (bytecode enhancements supporting dynamically typed languages) happens, and then it has a good chance of being faster.
Rails, the 15 minutes is Almost Up. Meet Erlang.
generated, the Ruby “backlash” appears to be gathering momentum (no doubt prompted in part by some inflammatory blog postings in recent days). Bryan Taylor has written a critique of Ruby (and Rails) and suggests that perhaps it’s about to have its lunch eaten by Erlang. I don’t necessarily agree
Two counterpoints to Dan's pingback blog:
- My knocks on Ruby are not meant to be comparisons to Java. Erlang is faster than Ruby. Python is faster than Ruby. PHP (which is dog slow) is faster than Ruby. Ruby is slow compared to just about everything, except groovy and JRuby.There is no real excuse for Ruby to be significantly slower than say Python. It's 3 times slower! Source: The Language Shootout. Please direct all benchmarking questions to them.
- Maybe my assessment that Ruby killed Perl is a little harsh. Perl just doesn't seem to have much going on lately. Part of that may be self inflicted as Parrot has distracted many of the Perl contributors and taken them under the sea.
GOD DAMN IT. FAIL. VICIOUS BURNING, DEATH-SPIRAL FAIL.
Not because this is a criticism of Rails — I firmly believe it could be improved — but for giving into the temptation of lumping all Ruby coders together and paying too much attention to a vocal minority.
Discussions about programming languages don't need to be adversarial. It helps no one (consider a certain rails core member with the stupid java-flames).
From this day forth, I swear I will never write flame-bait about programming languages. I can see it makes you look like an arse.
Why do you care so much what other people think?
If Ruby/RoR is awesome, atrocious or mediocre, it's *irrespective* of any hype or hating.
Also, what is this based on? "Python is a lot more maintainable than Ruby, by the way."
Mr eel - At it's core this is an article about hype. I am not lumping all Ruby Coders (which as I wrote, includes me) together. What part of "I might actually take up Ruby again -- if the Ruby community shows some interest in solving some of the problems above" do you not understand?
Somebody else posted an obnoxious comment noting a grammatical error. I fixed the error and deleted their rude comment.
Joe - I care what other people think because it's interesting. What other people think is what made Google billions.
Regarding Python vs Ruby: Python was constructed with readability in mind and there is generally a single canonical way to do things. Ruby, like Perl is littered with symbols and syntactic tricks that look ugly and aren't intuitive. There are also too many ways to express the same simple thing, which causes needless variation in code in a team setting.
bwtaylor:
But your behavior seems to contradict your rationale.
Lots of people are Google fans, so it's worthy of our attention. But when Ruby/Rails fandom began, so deemed it no longer worthy of your time.
Also, re: Python/Ruby; my personal experience is that the symbols are noisy at first, but you get used to them. And I feel that stuff like non-explicit return statements is a wash with not having to call self all the damn time.
And weren't these features of Ruby back when you still thought it was cool?
Google IS worthy of attention - I don't understand your point. Google fans, to whatever extent they exist, don't seem to be obnoxious and make extraordinary claims other than "we earned a hundred billion dollars in market capitalization".
Pythons strength is readability, Ruby's is expressiveness. For maintainability, I think that's a win for python. For time to market - Ruby, or if long term readability isn't that important (like say a one time data extract) - Ruby. Why does it bother you to hear this -- it's the conventional wisdom. The languages are very similar, otherwise. I'm just curious: do you see any cases where you'd choose Python over Ruby?
I never thought Ruby was "cool". "Cool" smells like teen spirit to me. I thought Ruby was a useful tool for some problems and not so great for others. But yes these features were there when I used it. Every tool has things that could be better, or that motivate against it for certain tasks. I could make a much longer list about Java, though there's little need to because you can simply read the open JSR's. My whole point here is that the Rails/Ruby hype is starting to recede and now they have to make their platform better. That is slow, unsexy methodical work that most of the fanboys won't be much of a help with.
I hope we can all start citing evidence when we write things like this:
"Ruby is unbelievably slow. Slow. Slow. Slow"
Now, I know I've done it, but when someone comes back with something like, "Can you cite some evidence for that claim?" I pause and hope I have some. The way it was said here begs for some evidence.
So, I know some people in the Ruby community agree with you and are working on it. Let's give them a chance to make it better.
"I'm just curious: do you see any cases where you'd choose Python over Ruby?"
Yes, pretty much anything that isn't web development. :)
Before Rails, I thought of Ruby as "interesting, but not something I'll ever use". In fact, I'd still be lumping it with Haskell and Smalltalk if it wasn't for DHH.
Truth be told, I kinda wish Rails had been written in Python. Alas, Zope is a nightmare and the world of second-generation Python web frameworks is a fragmented one and a Danish hacker preferred Ruby during his Annus mirabilis.
Personally, I love Python. I love Ruby. I like PHP. I tolerate Perl. I'm interested in Erlang (but, jeez, talk about quirky syntax, symbols and punctuation!). I learn many languages and frameworks, use a few of them and don't wed myself to any.
I think you're mostly right about the fanboys (look at "why the lucky stiff"), but there are a lot of serious guys into Ruby/Rails too (like Dave Thomas).
Also, I feel that "fanboys" are good and bad for a language. They churned out write-only code and "ruined" Perl; they put up sites that took 30 minutes to build, with "register_globals" turned on and "ruined" PHP; they got certifications and used API layered on top of API without actually *thinking* and "ruined" Java.
But if you don't have enough fanboys, your language wallows in relative obscurity. That problem has not been solved for Ruby.
Try finding a Smalltalk book written in the past five years (never mind on Seaside). Or hiring a programmer with experience using it. Or convincing your CTO that a new project should be done in it.
Fanboys suck, but "there's no such thing as bad publicity" when a language has no corporate sponsor and is tryign to be heard above the din of a hundred other open-source scripting languages, like Ruby was before Rails fanboyism.
Sam: See my comment above from Mon, 24 Sep 9:37 AM I had already given my sources before your comment: The Language Shootout project.
As for giving them a chance to improve it, that's exactly what I've said I want to do. But Ruby has had years to work on these things (it's not a new language). If the community is happier to ride the hype, I (and many others) are here to knock them down. If they are interested in the continuous improvement mindset and can demonstrate progress, then I'll be sticking with them longer than the fanboys. They have had a long time to work on speed though, and there's no reason for Ruby to be 3x slower than Python.
Rails is not the final answer to all web development projects. But it is great for smaller projects where you just need a few models and a way to get data in and out of them. Development speed is high, and for the larger part it is also fun.
And yes, Ruby is not the fastest language on earth, but for smaller sites this does not matter.
Based on my experience using Java, Ruby, and Erlang, I think your points are very accurate.
In time, Erlang will eat Blub's breakfast.
Thanks for posting this important article.
Having worked professionally with Ruby on Rails for 8 months, I tend to agree with your comments. All the DSLs and dynamic-ness of Ruby actually make code non-intuitive at times. Too much magic.
DSLs may make Ruby code readable, but not necessarily understandable.
When I worked with Django last year, I disliked the underscore syntax of the ORM and WET routing/generation. But I'm beginning to appreciate it's modular approach to vertical slices (vs. tacking on a solution like Rails Engines) and the Python communities policy of "use the magic only when you really need to."
Pragmatic Programmer's releasing an Erlang book is sure to bring a lot of interest in the Ruby on Rails crowd. Erlang is attractive, especially because Ruby 1.9's improved VM isn't here yet, and Rails utter lack of concurrency support (requiring multiple Mongrel processes, etc.). Ruby on Rails has a lot going for it, but if it weren't so lacking in those areas, I suspect Erlang wouldn't be getting quite so much attention.
Rails, the 15 minutes is Almost Up. Meet Erlang.
all is said and done this is what we are paid to do so just do it. If your technology is not best for this particular business case then accept it and move on. Here is another post on a different blog that shows a similar attack on Ruby on Rails by someone who just met Erlang and decided it was
Just to be clear from my post on my blog.
If you drop the attacks you come across with more credibility, just state the facts and your position. The point of your post is lost by wasting your time complaining and not cutting the post down and making your points.
<cite>"Truth be told, I kinda wish Rails had been written in Python."</cite>
Have you looked at Pylons? The WSGI stuff is pretty smart, IMHO. Makes web code quite composable. Something useful for Erlang as well perhaps (seems I'm not the only one believing that).
As for the rest.. I often know what I like, but I continuously work on clarifying why. By technical analysis as well as self reflection. Opinions often have causes unrelated to reasons. Such opinions may need to be reevaluated.
Rails, the 15 minutes is Almost Up. Meet Erlang.
were really radical to my mind , like [”RoR hype : party is over“] or [”Rails, The 15 minutes is almots up. Meet Erlang“]… On the other side you find this kind of
I feel I should clarify the "too much magic" comment I made earlier. It's not so much DSLs, things like rspec are pretty great. I don't really know how they do it, but it's great.
What I'm realizing is that "conventions" are somewhat like magic. You write a model class and it magically ties to a table and supports a bunch of stuff. It's pretty great.
But when does it become too much magic? Why do I write an instance method to send an email, and then call a class method deliver_{my_method}. Sure, I RTM and it is easy enough. But initially counter-intuitive.
Take a plugin like acts_as_state_machine. Until being exposed to it, there are all sorts of magically defined methods with exclamation points. It takes a while to get use to this magic happening.
Minor stuff that makes Rails a bit annoying. Ruby is elegant and powerful, but sometimes it seems too powerful, or the power is abused.
That said, I have no plans of dropping Ruby on Rails, and look forward to trying the 2.0 PR released today.
Ruby 1.9 and Rails 2.0 that will release next month will drop all discuss here. absolutely yes.
Rails, the 15 minutes is Almost Up. Meet Erlang.
קישוריות לנקודה.נט כמשל) - גדלי או היכחדי ופני את מקומך(ראו גם כאן)! בהקשר דומה לאייטם איתו פתחנו, פצח צ’אד פאולר בסדרת פוסטים הנקראת
Rails, the 15 minutes is Almost Up. Meet Erlang.
del marco de desarrollo web de moda e introduce lo que podría ser el nuevo hype de la programación o, por fin, una alternativa a los grandes del sector: Rails, the 15 minutes is Almost Up. Meet Erlang. Erlang es un lenguaje de alto nivel, funcional,

Very nice. One thing you got wrong though, is the ease of supporting Erlang's concurrency model. Scala already does! Of course because it is not purely functional you can screw it up, but all the lots of processes and message passing is supported in Scala actors.