Forgot your password?
typodupeerror
Programming Books Media Book Reviews IT Technology

Ruby Developer's Guide 94

Posted by timothy
from the today-is-in-fact-tuesday dept.
Reader Cole Tucker writes with this review: "The Ruby Developer's Guide was written with the intent to provide an overview of Ruby tools used for developing real-world applications. The book touches on a variety of areas, from GUI development to neural networks, and discusses existing Ruby packages that developers can take advantage of. In the end, the book comes out as a Ruby version of the Perl Cookbook." To see what he means by that, read on below for the rest of Cole's assessment of this book.
Ruby Developer's Guide
author Robert Feldt, Lyle Johnson, and Michael Neuman
pages 720
publisher Syngress
rating 7
reviewer Cole Tucker
ISBN 1-928994-64-4
summary Good introduction to Ruby -- an overview as well as a practical cookbook.

The writers of the book are very enthusiastic about both Ruby and the Ruby Application Archive (RAA), Ruby's response to CPAN. Overall, the text does a very good job demonstrating the base knowledge necessary for each of the libraries introduced and so can be quite useful to any developer with an understanding of core Ruby programming.

Directed towards programmers with a working knowledge of Ruby, the text is a quick read even with working through the examples. It effortlessly introduces the basic concepts of each package worked through and then gives locations where more in-depth information can be gathered. If you wish to work through any of the topics covered without digging through documentation just to obtain a basic grasp of the package, then this book is for you.

The book itself is a Syngress publication, and comes with a "1 year upgrade buyer protection plan" which seems to mean they have an errata page for the book and an "Ask the Author" section on the books website, along with a couple of other features mostly involving email. Looking at the errata page, it seems to be useful and up to date. The "Ask the Author" section also seemed to be fairly well-used by prior customers. Syngress seems to be serious about keeping customers up to date about the state of the book and providing services beyond that.

As for the book's problems, none of which are horrible, but do get old after a while: First, the book is big, and not completely because of content. The examples in the book span pages, and the text used in the source is a larger font that in the rest of the text. The examples also are full applications within themselves, instead of being presented in chunks and then having the full source available online. Another annoyance is each time the book mentions installing a package or library it goes through the whole "$./configure.rb; make; make install" process. The book also appears to have some organization issues, with notes for the text in the table of contents, which just served to irritate me. The final negative thing I noticed was that, though the text assumes programming knowledge of Ruby, the first chapter is dedicated to walking the reader through downloading and installing Ruby. The chapter is a big one too. So the book has a couple of hitches, mostly related to layout or mixed expectations towards the ability of the reader.

If you can deal with these small issues and are interested in the material covered, I can definitely recommend the Ruby Developer's Guide. The content is definitely there and they authors know their stuff.

Chapter List:

  1. Booting Ruby Discusses downloading and installing Ruby, IDE and editor support for Ruby and syntax stylings.

  2. GUI Toolkits for Ruby Covers use of Tk, GTK+, FOX and SWin GUI toolkits with a brush through on others available.

  3. Accessing Databases with Ruby Introduces the Ruby/DBI, Ruby/ODBC, Ruby/LDAp and Ruby DBM-file drivers.

  4. XML and Ruby Talks about the use of XML, including a basic introduction to it and then goes into parsing and creating XML using libraries from the RAA.

  5. Web Services and Distributed Ruby Goes into the libraries used for RPC's, SOAP and running distributed services with Ruby.

  6. WWW and Networking with Ruby Implements a server using high-level and low-level Ruby networking classes, then goes into using Ruby for the web, finishing up with a discussion of mod_ruby and eruby.

  7. Miscellaneous Libraries and Tools This chapter finishes the discussion centered around the RAA, going into graphics programming, data structures, genetic algorithms and other topics that didn't fit into a chapter of their own.

  8. Profiling and Performance Tuning Introduces the aspect of analyzing algorithms in Ruby, profiling your programs and discusses the advantages of similar Ruby constructs depending on what your focus is, with the intent of getting lean, mean programs.

  9. Parse Generators Discusses using Ruby instead of Bison or Yacc for creating a parser, and then goes into the advantages of various Ruby libraries to each other.

  10. Extending and Embedding Ruby Covers writing extensions to Ruby in C and C++ and later embedding Ruby into programs.


You can purchase the Ruby Developer's Guide from bn.com. Want to see your own review here? Just read the book review guidelines, then use Slashdot's handy submission form.

This discussion has been archived. No new comments can be posted.

Ruby Developer's Guide

Comments Filter:
  • from the today-is-in-fact-tuesday dept.

    I bet this gets old within, oh, about 13 days of programming in Ruby.

  • intresting language (Score:5, Interesting)

    by Abnormal Coward (575651) on Tuesday April 30, 2002 @10:57AM (#3435586)
    Lanugage homepage is http://www.ruby-lang.org/en/.

    Theres a intresting presentation of it, comparing to some other languages here:

    http://www.io.com/~jimm/downloads/rubytalk/talk. ht ml

    Looks like the language uses lots of sort cuts, might give it a try sometime :).
    • by keesh (202812) on Tuesday April 30, 2002 @11:16AM (#3435726) Homepage
      Disclaimer: I do a lot of work with both Perl and Ruby, and I've just finished converting 50,000 lines of hacked Perl into 6000 lines of maintainable Ruby. I'm prejudiced.

      It's not that the language uses shortcuts really. Sure, there's a $_ in there to keep the Perl people happy, but it's not often used. No, the reason Ruby is so fast to code is because the libraries are so good.

      See, Perl has some nice little tricks like map and grep. In Ruby these are methods of the Array class. However, they're implemented in a module. Want to grep a hash? No problem. Want to map (collect) on your own custom build data structure? Just import the module into your class and there you go. One short line of code. That's modularity for you.

      Sure, there are a few problems. The I/O stuff isn't half as modular as it should be, but that will change soon.

      Basically, though, there aren't any of those kludges associated with other languages. Everything is nice, clean, pure, unlike Perl's 'most of the time it does this, except when it does this' attitude. It's that that is the real time saver.
      • by pong (18266) on Tuesday April 30, 2002 @12:18PM (#3436139) Homepage
        I haven't been a fan of dynamically typed languages like ruby until about 5 months ago, but the combination of

        * a terse syntax
        * True object orientation
        * dynamic typing
        * and *unit tests*

        is a winning combination. The first three allows you to write well-factored, compact and flexible code. With a comprehensive test suite you have much more confidence in your code than you get from static typing, so it effectively voids that issue.

        Another thing I really like about Ruby is that you can reopen classes. This means that you can add features to existing classes, if that is where they really belong. When you do that every object of that type automagically gets the new features. Along with the fact that a lot of built-in features in ruby are methods, and the fact that you can rename and redefine existing methods means that ruby itself can be extended in very interesting ways! E.g, lets say you want to load ruby modules from zip files! Simple, just redefine Kernel.require to access zip files as well as directories.

        Most of all, though, I just like the ease of expression you get with ruby.
        • i feel that this will mark the decline of perl. please don't take what i say as flamebait - perl will always be the language of choice for system administration - but ruby will eat up the application market's need for a fast, scriptable language. it's portable, it's syntax is wonderful, and it makes RAD a cinch (in contrast to perl, java, c, and c++ combined).

          i'm enthusiastic about ruby's future (can't you tell).
          • I tend to agree that "this will mark the decline of perl", but I'm not sad about it. It's progress. Perl just doesn't cut it when it comes to OO design - sure you can do OO in Perl, but it's so UGLY. (And I used to like Perl a lot).
        • I have used ruby. What exactly do you mean by "Ruby shines with unit tests"? In the project I was working on I rolled my own tests. Was I missing something convenient or easy?
          • I mean:

            Ruby is dynamically typed, so if you have no means of automatically exercise most lines of code in your program, you cannot be reasonably sure you wont get runtime errors, because e.g

            * you pass the wrong number of arguments to functions
            * objects do not respond to the messages that are send to them
            * etc etc
      • It seems to have good bindings to most tookits, I wonder how pratical it would be, lets for writing small to medium sized gnome applications, instead of using C# ...

        It does look like the code is very neat, and easy to prduce maintainable code. This is a big plus for software engineer (like me).

        I've also stayed clear of perl because of this, most of the perl code I've seen looks horrible :p.

        I have nothing againest perl, I've seen some pretty neat stuff done with regular expressions.

        Anyway my 1 cents worth :-).
  • Ruby (Score:2, Informative)

    by Nameless (8793)
    is a programming language. It is beginning to catch on in the EN world, but has been going strong in JP for some time now.
  • Ruby is... (Score:2, Informative)

    For those who have no idea what Ruby is (the review wasn't clear), check out
    http://www.rubycentral.com/ [rubycentral.com]
    and
    http://www.ruby-lang.org/en/index.html [ruby-lang.org]
  • (arms flamethrower)

    Ohhhh... he said "RAA"... never mind.
  • Ruby code examples (Score:3, Informative)

    by EyesWideOpen (198253) <curtis@[ ]mith.com ['cus' in gap]> on Tuesday April 30, 2002 @11:22AM (#3435765) Homepage Journal
    You can find some code examples of the Ruby language (as well as several other languages) here [codeexamples.org].
  • Ruby? (Score:2, Funny)

    by Anonymous Coward
    "Ruby is a refuge for Perl-morons who finally realize that the hideous hairball a dead-end, but whose ego refuses them to submit to Python."
    • by beme (85862)
      "Why did the language designers bother doing this? So far I keep coming to the conclusion that Ruby is just a bad ripoff of Python"...

      http://www.mindview.net/Etc/FAQ.html#Ruby
      • "Why did the language designers bother doing this? So far I keep coming to the conclusion that Ruby is just a bad ripoff of Python"...

        http://www.mindview.net/Etc/FAQ.html#Ruby

        Yes, people in what you could call the Ruby Community did in fact wonder what Bruce Eckel was thinking when he wrote that. This quote is particularly weird given that he goes on to point out that the syntax is more Perlish. I think what is really going on here is that Ruby did fairly self-consciously tried to implement some features of particular languages that the author thought would be especially useful. But a lot of the similarities with various scripting languages are almost certainly less "rip-off" than the inevitable consequence of working in a constrained design space. It is actually quite reminiscent of a situation you see in plagiarism lawsuits against screenwriters who are accused of "clearly copying" some part of their work from that of some amateur they may or may not have barely seen once upon a time. But it turns out that the courts recognize that once you have the nucleus of a specific idea, a lot of plot and character similarities basically come along for the ride.

        The real reason Ruby got written was that the author thought it was a better language for his uses than the alternatives available to him. Obviously, you won't get universal agreement on something like this, but to assume that something like Ruby would be an ignorant rip-off of your favorite language strikes me as a bit weird.

        • by beme (85862)
          Imitation is the sincerest form of flattery, right?
          I don't think ripoff is the right word, either. I posted the link to the Eckel's comment because I hoped to see some reaction from Ruby fans. I admire Eckel, but everyone is wrong sometimes, and Ruby folks should be the first to have valid arguments with Eckel's points.
          And even if it's valid to describe Ruby as a ripoff, that doesn't make it a bad thing, in my mind. More the merrier. I have to admit I haven't looked into Ruby too deeply, primarily because my initial glance led me to believe it was harder to type ('self.' is a lot easier for me to type than '@' believe it or don't--my hands start to hurt if I have to type too many shifted chars away from the home row). Silly way to judge a language, but there you have it. :)
          It's just a different way to do things, I guess. To each his own (and thank goodness there are choices!).
          • Imitation is the sincerest form of flattery, right? I don't think ripoff is the right word, either. I posted the link to the Eckel's comment because I hoped to see some reaction from Ruby fans. I admire Eckel, but everyone is wrong sometimes, and Ruby folks should be the first to have valid arguments with Eckel's points.

            Indeed. I think a lot of Ruby users don't find themselves very interested in this issue any more. For a wide sampling of opinion on this and related issues, back in the day, you might be interested in this 138-post thread [google.com]

            Or maybe not. :-) More seriously, the best response in this thread is, I think, the second one, by the author of the book involved.

  • Don't miss ... (Score:1, Redundant)

    by anpe (217106)
    ... the excellent Programming Ruby [rubycentral.com].
    Ruby is a great language with a lovely syntax, try it !
  • by Skip (516) <farrel,lifson&gmail,com> on Tuesday April 30, 2002 @11:34AM (#3435847) Homepage
    Programming Ruby by David Thomas and Andre Hunt [pragmaticprogrammer.com] is available online and for free at www.rubycentral.com/book/ [rubycentral.com]
  • Other books (Score:5, Informative)

    by Fellgus (16870) on Tuesday April 30, 2002 @11:46AM (#3435920) Homepage
    Check out these other books about Ruby:

    And some in german:

    • Re:Other books (Score:3, Informative)

      by King Babar (19862)
      Among a list of books on Ruby, we see:
      The Ruby Programming Language, Matsumoto Yukihiro, ISBN:020171096X

      I would love to see this book get published, but the last I heard, as suggested by this message from the author himself, [google.com] the book has been cancelled. Does anybody know if they changed their minds on this or found a new publisher (Addison Wesley did the original contract)?

  • by Fweeky (41046) on Tuesday April 30, 2002 @12:00PM (#3436027) Homepage
    http://freak.aagh.net/ruby/intro/ [aagh.net]

    It's only a first draft, but it should give a reasonable overview to the curious.
  • by Anonymous Coward
    I personally found Perl so arcane that the half-life of code was short (after a time it degenerates into an unreadable state even when commented well as one moves on to other projects). But it has one advantage over Python: momentum. CPAN is several orders of magnitude a grater body of useful libraries and modules than anything Python has. The Vaults of Parnassus dim in comparison. Does Ruby have more promise than Python. To the casual observer, it seems even more sketchy that Python. And, honestly, Jython is a great to use: the power of Swing and jarred Java code with the ease of a scripting language. Maybe Jython is why the Vaults are lying fallow: Java code can be jarred and used in Jython. Comments anyone?
  • Sample Chapter (Score:5, Informative)

    by ryanr (30917) <ryan@thievco.com> on Tuesday April 30, 2002 @01:25PM (#3436714) Homepage Journal
    And don't forget that Syngress typically offers a sample chapter for each book:

    http://www.syngress.com/book_catalog/183_Ruby/samp le.htm [syngress.com]

    If you want to see what the book is like.

    (Note: I write books for Syngress, though I have no financial interest in this one. Consider this a plug if you like.)
  • I wish more programming books had these kinds of problems.
  • by scrytch (9198) <chuck@myrealbox.com> on Tuesday April 30, 2002 @03:57PM (#3437946)
    I don't know that it offers a value proposition enough to knock off perl's "good enough" (CPAN still has tons and tons more libs, dbish with DBD::ODBC is just the neatest thing in the world for a db developer), and the syntax certainly won't really sway the python crowd. I mean it's a good language, but I can't get mod_ruby binaries, last I looked couldn't get mod_ruby at all for win32 (yes, I use apache on win32, it's all about what I can fit on my laptop, and vmware causes too much thrashing on this pitiful thing).

    Lack of a CPAN type tool is *still* the reason I haven't mainly switched to python BTW. Download sites like VoP aren't even in the same category.
  • I just gave a presentation in my Programming Languages class about Ruby. Coming from a backgroung in mostly emperitive languages, I've found that Ruby is very easy to understand and work with. Also I like Matz's "Principle of Least Surprise," which in my opinion makes it a lot eaiser to work in. The only severe problem that I ran into in my breif tour of the language was without strong typedefs or compling it down to machine code, it's going to have a harder time competeing with languages like Python.

    "If you pick up a starving dog and make him prosperous, he will not bite
    you. This is the principal difference between a dog and a man." --Mark Twain
    • The only severe problem that I ran into in my breif (sic) tour of the language was without strong typedefs or compling (sic) it down to machine code, it's going to have a harder time competeing (sic) with languages like Python.


      What kind of "strong typedefs" does Python have that Ruby doesn't?

(1) Never draw what you can copy. (2) Never copy what you can trace. (3) Never trace what you can cut out and paste down.

Working...