On 1/30/2014 5:25 PM, Michael Torrie wrote:
On 01/30/2014 05:05 PM, Tod Hansmann wrote:
- I think Ruby is hideous (aesthetic, I know)
- Until recently Rails performance has been horrendous. It's not
"great" now, mind you, but it is at least competitive. I just have the
stigma left over (I had a similar issue with Java for a good two years
after 1.3)
Performance can mean a lot of different things. Web apps need
scalability more than the ability to do CPU-intensive things in a timely
way. So ruby doesn't need to be fast for a web application to work
well. I suspect you're referring to other aspects of performance, not
just CPU-bound calculations. And that is a fair criticism. What
exactly caused Ruby on Rails to have performance and scalability issues?
And what issues would Ruby have that Python doesn't have? For example,
they both have a GIL, which makes multi-threaded approaches fairly
useless. Of course asynchronous and multi-processing are the techniques
being used to scale these days. Can't see any reason Ruby can't do them
like Python can.
Does Python with a mature framework like Django scale at all compared to
a behemoth like Java? What is your experience?
Talking about performance in general is usually a better measure when
discussing performance issues. If we get nitpicky and pick an aspect of
things like cpu-bound calculation or using too much memory, it starts to
get niche. Ruby on Rails suffered in performance for two reasons. The
lesser reason was that Ruby was designed for convenience, NOT
performance, so it wouldn't go for efficiency of execution in any way,
it would go for shortest path for the developer to get a thing done
(there are noteable exceptions I've come across, but I'm not an expert.
I am more passing on second-hand assessments from the Rails devs and
Ruby devs from years ago).
The bigger reason was that the main Ruby runtime was terrible crap at
doing much of anything anyone could call "efficient." There's reasons
for this and I'm not saying it ruins the language or anything. Again,
Java had this same problem (seriously, if it's going to take 4 times as
long to do ANYthing, why would I use this? Hence hating Java when it was
1.0-1.2). Python did as well, though to a somewhat lesser extent. When
the Ruby devs redid the interpreter/runtime, the same code performed at
about the same speeds as you'd expect from their python equivalents
(again, hailing back to the Python vs Ruby drama I never cared for, even
the Ruby devs compared their baby to Python). You don't have to take my
word for it, it's in their own mailing lists and whatnot. It might
still be in their Wikipedia article. I haven't checked.
Then end-all of this is actually a bit more mild anyway. Ruby, and
Rails as well, are just tools. They have strengths and weaknesses for
various people and projects. Python, and Django, are the same. J2EE is
not a tool, it is a terrible beast we try to tame and many fail at. I
myself haven't had a rebellion to quell so I haven't tried to tame the
thing in the past, but I have actually seen J2EE apps that aren't
over-engineered barges, so I can't blame the tool. We programmers just
seem to want to think the tool we know should meet all our problems.
This is why I'm not a very good programmer. I prefer to solve problems
rather than program. The programming is a means to an end for me, and
thus I never giggle to myself about how cool currying is or think deep
thoughts about applets.
Django gives you power to do a number of things like have a
well-maintained kit of tools for the kinds of things you do in
data-driven web "apps." It does a great deal of thinking about the
project as a whole, and as a modular organization. Rails gives you
power to do a number of things as well, some of which overlap what
Django is. Nobody can really compare these on a list, because they're
not finite, and they switch from person to person. For instance, I
can't for the life of me use django-social-auth with the speed and
clarity required for it to save me all the time it's supposed to. I get
maybe half the benefit of it at best. This is not a failing of Django,
it's a failing of me to mesh well with Django. I'd die in Ruby land the
same way I do in Haskell. It just makes me tired to look at, and I
groan and turn over in bed instead.
Fun fact. Work has a J2EE app we hired a company for and for some
reason let them do it in there. Something something, complicated data
model, something, something management approvals. I don't know, I
wasn't there. I just here stories. We got it, after paying 4 times as
much and waiting 3 times as long. The two devs we eventually had
in-house from the consulting company we hired didn't even understand
their own pieces of it enough to document anything, and they'd been
working on it for more time than I've ever worked on a major version of
a codebase. When we received this thing, we didn't know how to run it,
let alone maintain the 180,000 lines of code. Is this J2EE's fault?
No, it can't be. It's the result of using a tool for something poorly,
with the wrong people wielding it. We have a guy that works in Java and
he can't figure it out, yet he produces wonderful Java and the best C++
nature allows him to. J2EE's niche I'm not sure of, but I think all of
these tools are useful in the right construction projects.
-Tod Hansmann
/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/