Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Books Media Programming IT Technology

Three Books About the Ruby Programming Language 45

DJSpray writes "I've written a review of three books about the Ruby programming language, available on my weblog here. The three books are Yukihiro Matsumoto's Ruby in a Nutshell from O'Reilly, Hal Fulton's The Ruby Way (Sams), and Programming Ruby: The Pragmatic Programmer's Guide by Dave Thomas and Andrew Hunt (Addison-Wesley). Note that the third book is available online here for those who prefer that sort of thing. Executive summary: while I have found several of the other O'Reilly Nutshell series books to be excellent, this one is riddled with errors, confusing writing, and omissions, and does not live up to O'Reilly's usual standards. Fulton's book is filled with good cookbook examples and well-written explanatory material, as well as solid tutorial examples, but it is not structured as a reference. The Pragmatic Programmer's book works well as a reference and covers language features in increasing depth, but with fewer examples. Ruby beginners may find that the latter two books actually complement each other nicely, while I can't recommend this edition of the Nutshell book at all."
This discussion has been archived. No new comments can be posted.

Three Books About the Ruby Programming Language

Comments Filter:

  • or rather where can it be placed. python and perl are fighting so hard for the place, and if you step out to real compiled languages, the dominance of c, c++ and java cannot be shaken. Languages like LISP and cobol and fortran have been mercilessly killed, but the remnant diehards will still insist its alive in some remote forest. So where does Ruby fit in... what is it anyway?
    • Re:What is Ruby? (Score:4, Informative)

      by bwt ( 68845 ) on Tuesday April 22, 2003 @02:11PM (#5783270)
      Ruby is a competitor to both Python and Perl. In some sense, it is an attempt to combine the best features of each. My belief is that it succeeds well at this goal. It offers an even purer OO approach than python, while offering much of perl's strong syntactic sugar.
    • Re:What is Ruby? (Score:5, Informative)

      by Dr. Photo ( 640363 ) on Tuesday April 22, 2003 @02:32PM (#5783468) Journal
      I'd place ruby somewhere between "a cleaner python" (at least, in terms of design-- ruby learned the lessons of Python for free, that Python had to learn the hard way...) and "a saner Perl"... (of course, Perl's insanity is half the fun!)

      It's got all the LISPy goodness of Python (and supports true closures & continuations, which IIRC are only to be found in experimental implementations of Stackless Python), the regexpy powerfulness of Perl, and the dynamic-OO cleanness of Smalltalk.

      I find it really makes programming fun again, and it's very easy to write extensions for it in C (or C++, if that's your bag, baby)... in fact, using ruby as the "brains" behind a bunch of C modules gives you the silly-fast speed of C, while correcting C's worst deficiencies (you get free GC, safer string handling, namespaces, OO, etc.)

      Ruby's "chock-full of heady goodness", and definitely worth adding to your repertoire.
      • Ruby's "chock-full of heady goodness", and definitely worth adding to your repertoire.

        Where should Ruby rank among the other 4385 lanugages and APIs that everyone says are worth learning?

        I really don't mean to troll, but the fact that programming languages are still so volatile is good evidence that programming languages are still in their infancy. By volatility, I mean that every 6 months or so, a brand new "must see" language is invented, develops a "growing userbase" of neophytes and zealots, becomes

        • Well said!

          My programming language has the speed of C, regex of perl, portability of Java, and every goodie of every language before it. Better learn it because it makes development SO fast and intuitive. So many programmers are flocking to it.

          But doesnt that make my language LESS faster than C, LESS portable than Java etc??

          The market is so variable, new niches are created and old ones destroyed. Cobol WAS a good language for what people did once upon a time. That entire niche has disappeared, aut
          • But doesnt that make my language LESS faster than C, LESS portable than Java etc??

            Well, with any interpreted language you've got a certain unavoidable overhead. But when you can easily integrate it with compiled C code it quickly becomes a non-issue. Ruby programs run the same across the ports to various OSes, which is something that Java was supposed to do.

            The market is so variable, new niches are created and old ones destroyed. Cobol WAS a good language for what people did once upon a time.

            If you
          • But doesnt that make my language LESS faster than C,

            The standard Pythonista answer is that in most programs, 80% of the time is spend in 20% of the code. Profiling and careful optimization usually gets the performance hit down to the magic phrase "less than noticable".

            The other half of the Pythonista answer is that working at a very-high level makes rapid application development possible. Your programs end up well factored because it's easier to rearchitect things.

            Kent Beck calls it "First Make it Work
          • Let me get this straight...above you ask what ruby is and then proceed to make pronouncements about it's "freefall" and imply that it's some sort of slashdot fad. The damn language has been around for 10 years. Rather than waxing prolific about the obvious uses of C/C#Java/Perl/Python why don't you take a look at Ruby? If don't care or don't want to, fine. Making sweeping generalizations about market forces as applied to programming languages as a means to discredit a language you admittedly know nothin
        • Where should Ruby rank among the other 4385 lanugages and APIs that everyone says are worth learning?

          I'd put it pretty high on that list... :-)

          I really don't mean to troll, but the fact that programming languages are still so volatile is good evidence that programming languages are still in their infancy. By volatility, I mean that every 6 months or so, a brand new "must see" language is invented, develops a "growing userbase" of neophytes and zealots, becomes "production quality", gets several books wr
    • Re:What is Ruby? (Score:1, Insightful)

      by Anonymous Coward
      please don't suggest that non-compiled languages aren't "real" ... there's so much run-time dynamic stuff happening with compiled languages and modern CPUs, and so much pre-processing in "scripting" languages that the distinction will become more and more blurred as time goes on.

      I use Ruby, Perl, and C for ALL my programming these days, and I don't distinguish between them in those terms any more.
    • LISP and cobol and fortran have been mercilessly killed,

      Not true at all! They don't attract the massive interest they used to, but these languages are hardly dead. LISPlike (there's no one "official" LISP) languages are popular with the AI and functional development crowds -- one is used as a scripting language in GNOME. I've never liked COBOL, but big bureaucratic organizations still use it. And you can't hope to sell a supercomputer if it doesn't have a FORTRAN compiler!

      Does the latest FORTRAN standa [j3-fortran.org]

  • I've always read that many people consider Ruby to be an excellent programming language.

    I wonder, then, why it doesn't seem to have that many developers using it? Is it only because it is new?

    • Re:Ideal language (Score:5, Interesting)

      by bwt ( 68845 ) on Tuesday April 22, 2003 @02:21PM (#5783363)
      Many people who might like ruby better are happy enough with perl and python. Perl has a much larger class library because it's the established player. Many people who were dissatisfied with perl's loosy-goosy style and OO approach probably already left and went to python.

      At some point many potential switchers say "OK, maybe ruby is slightly better at this and has this other advantage, but I can live without that slight advantage because I get a bigger community and class library to draw from by staying with [perl|python]"

      Personally, I don't find that argument persuasive because I think it's good to know more langagues and I give my first look to ruby and fall back to python or perl only if I need class libraries that I don't want to write myself.
  • by metamatic ( 202216 ) on Tuesday April 22, 2003 @01:56PM (#5783167) Homepage Journal
    I like what I've seen of Ruby. There's just one snag: no UNICODE support except via libraries.

    I already know Perl. I'd like to learn something cleaner, and Ruby looks like exactly what I'm looking for. However, I'm not prepared to put in effort learning yet another language that doesn't have native multilingual text support.

    Doing everything via library calls to get UNICODE support is an ugly hack... and like I say, I know Perl, so my ugly hack requirements are already adequately met.
    • At the risk of starting a flamewar ... have you looked at Python?

      I've found that once you get over the superficial (e.g. whitespace matters), it's really an enjoyable language to use -- even when you have to read someone else's code.
      • Whitespace matters ... which means that to me that Python doesn't matter to me.

        A language is no good if it forces me to format things in its style without letting me work in my style.

        I understand Python just fine, I just don't like it (and, to be quite honest, it isn't OO enough for me; having to pass self in all the time feels entirely too much like Perl, and so does the fact that some things are functions and others are methods).

        -austin, shameless Ruby advocate, http://www.halostatue.ca/ruby/
        • I'd imagine you hate Java's "this" keywood too? ;)

          I do like the fact "everything in Ruby is an object."

          The whole whitespace thing weirded me out at first, but then again so did Ruby's "$" and "@" operators -- I initially thought to myself "Ugh. It's Perl again."

          The whitespace rules help prevent people from getting lazy and sloppy about their code formatting -- plus it prevents the choice between (1) debates about "proper" style (2) having to read multiple styles on the same project or (3) having someone
          • Java doesn't require that I do:

            class Foo {
            int bar(this, ...) { }
            }

            Python does.

            Ruby, to me, is far more intuitive. I mentioned as well that I find that Python's stupid whitespace scoping doesn't let me work *my* way, which is to place certain temporary debugging lines flush left so that I can quickly find them to remove them when I've tracked down a bug. That idiocy (not letting me work *my* way) is exactly why I won't use Python.

            -austin
    • Matz has made it clear that the design of Ruby is based first and foremost on making it easier for him to do his own work, which he has stated is primarily in the Japanese Unix encoding EUC-JP. He says "EUC-JP is good enough for me" and "Ruby's internationalization strategy is whatever doesn't interfere with my Japanese work".

      Well, if EUC-JP good enough for him, then he clearly doesn't build globalized apps. It's the Japanese equivalent of a US language designer saying, "I want my language to be optimized
  • note: these books are all several years old; nothing new here
    • Well, yes; the copyright dates are 2001 and 2002. The version of Ruby designated stable is several years old as well, so I'm not sure this is a big liability; changes between the Ruby these books describe and the Ruby on your system are likely to be bug fixes, not major changes in functionality.

      Paul
      • Ruby 1.8 is supposed to be released Real Soon Now, and it includes a number of significant changes (see Programming Ruby Two [rubygarden.org], a Wiki page about a hopeful second edition of Programming Ruby covering 1.8.) -austin
  • I own two (Score:4, Interesting)

    by Fished ( 574624 ) <amphigory@gmailG ... minus herbivore> on Tuesday April 22, 2003 @02:25PM (#5783405)
    I own Ruby in a Nutshell and Programming Ruby. For the most part, I agree with his assessment. Ruby in a Nutshell was originally published in Japanese only. My impression is that it was translated by someone with limited experience; everything is syntactically correct, but the writing style is wooden and it's just not a very interesting read.

    However, I think the Practical Programmers' book is much better than you give it credit for. It does a credible job of introducing an experienced programmer to the Ruby Language (although it's really not for those who are not familiar with an Object-Oriented Language). I have found that that is my standard Ruby resource.

    Incidentally, I only picked up Ruby a few months ago, and have found it to be a great language. Unfortunately, some of the support is not yet there. I've ended up doing my latest project in Java because I don't want to lock myself into a language that will not support high-end scalability features.

  • by bwt ( 68845 ) on Tuesday April 22, 2003 @02:37PM (#5783514)

    A 4th book on Ruby that I kind of like is _Ruby Developer's Guide_ by Robert Feldt, Lyle Johnson, Michael Neumann (Editor), Lyle Johnson, Jonothon Ortiz.

    This has a series of chapters on more applied topics that would be good for the Slashdot programmer audience: DBI, XML, SOAP, Performace, Parsers, etc... The book is a little wordy, but the topics covered are very useful and it imparts a lot of useful information for people who don't want to relearn basic syntax.
  • ruby is great (Score:2, Informative)

    by Anonymous Coward
    I love Ruby. Unfortunately it still seems young and immature, in terms of libraries. There's nothing near the choice and quality that Perl has (for instance I was looking for a high-quality MIME library like MIME::Tools but there doesn't seem to be one for Ruby, just some very basic libraries that probably wouldn't be appropriate for high-volume mail processing).

    I use it for all my basic scripting needs though, and like I said, I really love it. It's OO makes a lot of sense, the block-passing stuff is awes
    • For future reference, to show HTML/XML tags in an HTML formated posting, you have to use "ampersand lt semicolon" to get "<" and "ampersand gt semicolon" to get ">" around the tag.

      I had to read source to find out what your complaint was.

  • Just picked it up at Borders a couple weeks ago and I'm only a few chapters in, but so far it's very well written and succeeds in anticipating the programmer's questions. The book claims it can't teach you Ruby, but they underestimate themselves. Granted Ruby's "just another language" for me, so if you're a new programmer this isn't your book, but if you're an experienced programmer this book does a great job.

You know that feeling when you're leaning back on a stool and it starts to tip over? Well, that's how I feel all the time. -- Steven Wright

Working...