Slashdot Mirror


Ruby Off the Rails

An anonymous reader writes "IBM DeveloperWorks has an interesting writeup on Ruby that takes a look at the programming language as a stand-alone solution rather than defining it in terms of Rails. From the article: 'Ruby on Rails is just one facet of what makes Ruby great, just like EJB is only part of the Java enterprise platform. Andrew Glover digs beneath the hype for a look at what Java developers can do with Ruby, all by itself. Ruby's syntax is quite different from that of the Java language, but it's amazingly easy to pick up. Moreover, some things are just plain easier to do in Ruby than they are in the Java language.'"

7 of 325 comments (clear)

  1. Re:Get the basic premise right, first by Anonymous Coward · · Score: 4, Funny

    I love it how the Rails fanatics always take great personal insult at even the mere suggestion that code generation isn't its strong point. Even though, surprise surprise, the infamous tutorial video advertises just this very feature throughout pretty much the entire clip. It's like watching a little kid cry and stamp their feet at a grocery store trying to get their parents to buy them cereal.

  2. Re:What I need to know by badfish99 · · Score: 3, Funny
    Aristotle would have wanted Greek, and Jesus would have wanted Aramaic. So no, ISO-8859-1 was not good enough for them. Nor is it much use for the majority of people in the world today.

    As for Shakespeare, he couldn't even spell his own name, so he didn't care.

  3. Use my new language called Booby by Anonymous Coward · · Score: 3, Funny

    It does everything every other language
    does but some things are easier and some things are harder.
    Because its relatively new you get to rewrite a bazillion
    lines of library code and API's that already exists in other languages.
    Furthermore you will become even more multilingual than you used
    to be so you can raise language critique to an even higher (f)art
    form. One profound difference, for example, is that Booby uses braces
    but they are reversed from C++ and Java i.e. the open brace is } instead of {.
    I expect to see a whole book on the ramifications
    of that alone.

  4. Re:Purpose of being verbose by ealar+dlanvuli · · Score: 3, Funny

    I'm sorry. I've probably written 200kloc of Java in my life. I have never noticed this painful repitition? Where is it?

    Thanks,
    Sean

    --
    I live in a giant bucket.
  5. Re:Smalltalk's inheritance by AaronLawrence · · Score: 2, Funny

    but I worry that some of the features will ecourage neophytes to create code that is difficult to maintain or understand.

    Sounds like C++...

    --
    For every expert, there is an equal and opposite expert. - Arthur C. Clarke
  6. Re:Python loop array by aurb · · Score: 2, Funny

    Well in Python you can just do

    print array

    Oh, wait, that's 1 character more. That's it, I'm switching to Ruby.

  7. Re:Purpose of being verbose by mav[LAG] · · Score: 3, Funny
    Well, fuck you too, buddy. Merry Christmas to your ignorant ass.

    Tsk tsk. You're taking this way too personally.

    I'm sure it's easy to copypaste some strawman argument containing hilarious phrases such as "pointy-haired boss" which the children will find irresistible, since they know nothing about the actual merits of the arguments, having never managed anyone, let alone a group of people who work together to achieve objectives such as saving people's lives, or even less noble objectives such as creating a software platform to aid the collective research efforts of thousands of researchers.

    I rest my case. The above paragraph is one sentence! Obviously working with Java's crufty verbosity has affected your writing. I'd suggest taking a course in a more pithy language. By the way, Graham's argument is not a strawman: he's made it clear over a few different essays that because programming languages vary in power, smart coders who use more powerful languages can code circles around those using Java. Also if you're going to drag in logical fallacies then I need to point out yours too: "saving people's lives" and "aiding ... thousands of researchers" has nothing whatever to do with the merits of Java versus other programming languages. It's an emotional red herring.

    I have used hundreds of thousands of dollars on Python code which the author believed to be really maintainable and work really well, but in the reality-based world turned to be such crap that the whole team, including me, had to work a breakneck pace to rewrite it in Java, which has such incredible features as working threading support, no Global Interpreter Lock, actual Oracle and LDAP support that doesn't leak memory like anything, and isn't 20 times slower than the Oracle and LDAP support in other languages, no monkey patches (oh yeah, Python coders seem to think that it's SUCH a good idea to monkeypatch others' code, since after all, SMART people should know without any documentation what's going on, and documentating code is useless anyway, people should just go in and read all of those millions of lines of code if they want to know what's going on) and, you know, clear and accurate documentation and HORDES of pre-existing components which make your life so much easier, if only you're not infected with the dreaded Python community NIH disease.

    Sheesh, I thought the previous sentence was bad but this one takes the cake. Full stops are your friend. So is coherence. Some answers:
    • If you paid hundreds of thousands of dollars for a component written by an idiot in a language your team doesn't use, then you're the bigger idiot.
    • Python does have working threads and the GIL has never bitten me when working with multi-threaded libraries in C.
    • Bummer about Oracle. Try Postgres instead. It's cheaper and better.
    • Monkeypatching is considered harmful by any Python programmer worth his salt.
    • Python comes with batteries included. Of all communities it's the one with the *least* amount of NIH syndome.

    Java does have an additional useful feature: because of its mandatory coding practises and standards it's pretty easy to spot when an amateur has written something really broken, and contain the problem to those components which the amateur has touched. Perhaps this is what has happened to you?

    Entirely possible. But I've seen good Java - really top of the line guru-doing-an-exercise-proposed-by-Martin_Fowler-s tandard type Java - and it was just plain ugly because the language is just plain ugly.

    I've used, in production, Python, Perl, C, C++, Pascal, Java, x86 assembly, a little AutoLisp, and so on. Hundreds of thousands of lines. (The C code I have out there is pretty crappy, for which I apologise, but I was an amateur and thought of my work much as you seem to think now.)

    Can't recall making any comments about your work or even you personally. *Checks* - nope. You

    --
    --- Hot Shot City is particularly good.