Slashdot Mirror


Ruby Developer's Guide

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.

94 comments

  1. tired jokes by tps12 · · Score: 1
    from the today-is-in-fact-tuesday dept.

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

    --

    Karma: Good (despite my invention of the Karma: sig)
    1. Re:tired jokes by tomstdenis · · Score: 1

      {insert perl joke}

      s/13/"RIGHT NOW"/ge;

      Tom

      --
      Someday, I'll have a real sig.
  2. WTF? by Anonymous Coward · · Score: 0, Offtopic

    What the hell is ruby? Just another IDE?

    1. Re:WTF? by thaigan · · Score: 2, Informative

      You can find out here: http://www.ruby.ch/en/rubywhat.shtml

      --

      42
  3. intresting language by Abnormal+Coward · · Score: 5, Interesting

    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 :).

    1. Re:intresting language by keesh · · Score: 5, Insightful

      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.

    2. Re:intresting language by Abnormal+Coward · · Score: 1

      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 :-).

  4. Ruby by Nameless · · Score: 2, Informative

    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.

  5. Ruby is... by Aragorn+DeLunar · · Score: 2, Informative

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

    --
    Cynicism, like dogmatism, can be an excuse for intellectual laziness. - Susan Shirk
  6. Ruby is Swell but... by stever1975 · · Score: 0, Flamebait

    how many here are using ruby?
    There is Like no Documentation on it and most bindings are buggy... Maybe if Ruby got out there before Python It would be more widely Accepted.

    1. Re:Ruby is Swell but... by Aragorn+DeLunar · · Score: 2, Informative

      I use Ruby and love it.

      No documentation? The entire Programming Ruby: The Pragmatic Programmer's Guide book is online for free at http://www.rubycentral.com/book/index.html. The book (in HTML Help format) also comes with the Windows install package at http://www.rubycentral.com/downloads/ruby-install. html.

      --
      Cynicism, like dogmatism, can be an excuse for intellectual laziness. - Susan Shirk
    2. Re:Ruby is Swell but... by keesh · · Score: 2

      Documentation: the book (Ruby's answer to the Camel) is available online. That's all the documentation you need. It's all there.

    3. Re:Ruby is Swell but... by Anonymous Coward · · Score: 2, Informative

      No documentation? Like Programming Ruby and the Library Reference? People are even working on a javadoc-like documentation system called RDOC. There are lots of documentation and books out there: you just have to read them!

    4. Re:Ruby is Swell but... by Anonymous Coward · · Score: 0

      I use Ruby almost everyday... unfortunately, I'm not getting paid for it. Perl just wasn't what I needed for my current project (a langauge (as in English) parser), so I used Ruby instead. It provides a nice, clean interface, while still allowing a Perl-ish style instead of something like Java (ick!).

    5. Re:Ruby is Swell but... by swagr · · Score: 2

      Although I am a Java developer, I use alot of Ruby.

      See "The Pragmatic Programmer", page 103, tip# 29: "Write Code That Writes Code"

      (Ruby code that writes Java code).

      --

      -... --- .-. . -.. ..--..
    6. Re:Ruby is Swell but... by jbgreer · · Score: 3, Insightful
      I'm using Ruby. [ I like Slashdot, but I'm not sure your message is going to be a useful poll. ]


      WRT to your 'maybe if it had gotten out there before python' comment: explain, then, why it is MORE popular than Python in Japan, in spite of having come out later. I think the acceptance issues have been driven more by the fact that much of the work has been done in Japan (and, hence, much of the documentation is in Japanese).


      /me swivels in chair and looks at shelf behind
      As for 'Like no documention': Like, dude, I've got Like 4 books on the shell behind me about, Like, Ruby.


      As for wrong bindings. You have actually written the authors about these, right? So far I've found Ruby module authors to be just as pleasant and helpful has their Perl and Python counterparts, in spite of my complete lack of Japanese language skills and their oft admitted poor English skills.


      I would argue that Ruby is benefitting from maturing after Python, like all languages should. Matz is learning what to include and what to avoid in his language design.


      Finally... you can't seriously expect us to take the "this software has bugs, so we can't use it" argument, do you? All software has bugs. All languages have warts in their design and bugs in their implementation.

      --
      The Norton Anthology of English Literature, 4th Ed., Vol 2
    7. Re:Ruby is Swell but... by Anonymous Coward · · Score: 0

      I see the claim "Ruby is more popular than Python in Japan" a lot, but never any actual evidence. Proof by assertion?

    8. Re:Ruby is Swell but... by Anonymous Coward · · Score: 0

      I use Ruby and love it. No documentation? The entire Programming Ruby: The Pragmatic Programmer's Guide book is online for free at http://www.nigger.com/book/index.html. The book (in HTML Help format) also comes with the Windows install package at http://www.diejewsdie.com/downloads/ruby-install.h tml.

    9. Re:Ruby is Swell but... by Anonymous Coward · · Score: 0

      Even if it is more popular in Japan, who the heck cares? Python is more widely used, supported, etc. everywhere else.

      I choose Python over Ruby because Ruby is actually *proud* of its Perl heritage. Gimme a break!

    10. Re:Ruby is Swell but... by Anonymous Coward · · Score: 0

      "How many here are using Ruby?"
      I raise my hand.

      "There is Like no Documentation on it and most bindings are buggy."

      So apparently 5 books = No documentation. (?)

      As far as "most bindings are buggy" goes - I have no idea what you're talking about.

    11. Re:Ruby is Swell but... by PythonOrRuby · · Score: 1

      Ruby should be proud of its Perl heritage. Having worked in Perl, Python, and Ruby, and enjoyed both of the latter, I can tell you that Ruby is much more frequently useful to me. If for no other reason than that Ruby allows for literal type regular expressions, it blows away Python in terms of productivity.

      Then there's the fact that in Ruby everything really is an object. I don't have to ask myself, "ok, can I do this with an instance method, or do I pass the object to a function?" Even when Python gets this right, methods far too infrequently return self, requiring extraneous assignments, and decreasing efficiency, both in terms of computer efficiency, and programmer efficiency.

    12. Re:Ruby is Swell but... by Colonel+Panic · · Score: 1

      "how many here are using ruby?"
      I am! After doing OO Perl for a while I find Ruby to be oh so much cleaner.

      "There is Like no Documentation on it"
      Hmmm.... let's see there are five English language books on Ruby now:
      "Programming Ruby: The Pragmatic Programmer's Guide"
      "Ruby In a Nutshell" (by Matz himself)
      "The Ruby Way"
      "The Ruby Developer's Guide"
      "Teach Yourself Ruby in 21 days" (actually very good book)

      And in fact the full text of "Programming Ruby" can be read online at http://rubycentral.com

      I'm not sure how you can say there's no documentation.

      "and most bindings are buggy"
      I'm not sure what you mean by 'bindings' here.

    13. Re:Ruby is Swell but... by Anonymous Coward · · Score: 0

      It's pretty easy to see that (1) you've never actually used Ruby in a professional setting and (2) you know next to nothing about real-world Python programming.

      My favorite part is when you said "it blows away Python in terms of productivity". Good one!

      I've been using Python professionally for several years now. I tried the Ruby stuff and thought it was cute, and good for Perlers who cringe at Perl6, but that's about it. I heartily recommend you take about 6 months to use Ruby in the workplace, and another 6 months to do the same with Python. Keep good track of time spent designing, coding, and debugging, and the time it takes someone new to come up to speed on your code. Also keep track of how much time you lose due to real problems, and not time spent worrying about theoretical problems. Once you've done that, *then* you can come back and make silly assertions.

      Ruby has some nice features, but it'll never be more than a tiny niche language, regardless of whatever is going on in Japan.

    14. Re:Ruby is Swell but... by King+Babar · · Score: 3, Interesting
      Even if it is more popular in Japan, who the heck cares? Python is more widely used, supported, etc. everywhere else.

      The problem of support is, of course, a real one in many applications. The fallacy of the "who cares?" argument here is that the same argument could probably have been used against every programming language since the first assembler was written. Not every new language "makes it" by a long shot, but not every well-supported language lives forever, either. Python was barely on people's radar for the very longest time; it has succeeded because enough people were convinced it had advantages that outweighed a temporary (or possibly even permanent) disadvantage in publicity, support, or whatever reason-to-fail you might give.

      I choose Python over Ruby because Ruby is actually *proud* of its Perl heritage. Gimme a break!

      Well, you can be proud of your heritage without repeating the sins of your parents. :-) As far as I can tell (I've programmed in Perl since 1991 and in Ruby for a few months), Ruby retains much of Perl's flexibility while hugely reducing the amount of (non-regexp) "line noise" feel that even I think Perl sometimes has, and dramatically reducing the number of oddball special cases. I know you could say the same thing about Python, but I never really "got into" Python, for whatever reason. Like it or not, I think we all realize that tastes vary somewhat in these things.

      --

      Babar

    15. Re:Ruby is Swell but... by beme · · Score: 1

      Ever given Jython a try?

      --

      -beme
      1971
    16. Re:Ruby is Swell but... by stever1975 · · Score: 1

      Geez
      so there is documentation. I should have said very little Documentation and the majority of it kinda poor, and in comparison to other main stream languages it has virtually no documentation.
      more popular in japan? my response is have the python Docs been translated to japanese?
      probable not, and there's your answer.
      :)

    17. Re:Ruby is Swell but... by swagr · · Score: 2

      Looked into it briefly on a couple of occasions.

      I'm not so much interested in having Ruby and Java work together in any sense.
      I'm just using Ruby as one of my tools to write Java.

      --

      -... --- .-. . -.. ..--..
    18. Re:Ruby is Swell but... by JudasBlue · · Score: 1

      "..., then, why it is MORE popular than Python in Japan,..."

      Dude, seriously, our band is HUGE in Sweden!

      --

      7. What we cannot speak about we must pass over in silence.

    19. Re:Ruby is Swell but... by bluetea · · Score: 1
      Once you've done that, *then* you can come back and make silly assertions.

      Ruby has some nice features, but it'll never be more than a tiny niche language, regardless of whatever is going on in Japan.


      Why don't you take your own advice?

      There are way too may people making silly assertions on both side of the fence. Different people are interested in different problem domains. People work and think in different ways, so what is a productive environment for one person may not be for another. Your lack of productivity with Ruby means no more than the previous poster's lack of productivity with Python. As far as niches go, I've got news for you - both of them are niche languages. At least they're niches compared to some other general purpose languages like Java or C++. Be happy that you have a chance to use Python in your work; most people don't get that opportunity. I guess I'm just argumentative tonight, but people in the Ruby community have (for the most part) already bored of constantly carrying on this same tiresome argument about Python and Perl. It's just not interesting anymore.

    20. Re:Ruby is Swell but... by PythonOrRuby · · Score: 1

      Thank you. I wish I'd worded my original post so well.

      It is a matter of which is more useful for a given task. For myself, Ruby has all of the text manipulation-y goodness of Perl, but with a pure OO design that lends itself to predictability(and those things that surprise me always manage to be good things).

      I am productive in Python, but I've found Ruby clearly superior in situations, such as web programming, which require loads of text manipulation. The ability to modify existing classes without having to subclass them is also extremely useful.

    21. Re:Ruby is Swell but... by Anonymous Coward · · Score: 0

      I have converted over from Perl, Ruby makes my job much more fun, all in all its just a very well thought out language with enough library support now to allow me to never code in Perl again.

      Its still uncommon in the workplace but I dont expect that to last.

  7. RIAA? but we hate them! by Corby911 · · Score: 2, Funny

    (arms flamethrower)

    Ohhhh... he said "RAA"... never mind.

    --
    Monday is a horrible way to spend 1/7 of your life.
  8. No Documentation? by Jonathan · · Score: 3, Informative

    No Documentation? You can download the entire text of Programming Ruby for crying out loud -- what more do you want? You just don't get this amount of free documentation in the Perl or Python worlds. Additionally, the Developer's guide is at least the fourth dead-tree Ruby book published, so it is clear that *somebody* is buying them. As for buggy bindings, I haven't noticed that Ruby bindings are any more buggy than those of other languages.

    1. Re:No Documentation? by RevDiaBLo · · Score: 1

      You just don't get this amount of free documentation in the Perl or Python worlds.

      Before making such bold claims, you should probably check out man perl, and the plethora of man pages which are listed therein.

    2. Re:No Documentation? by Jonathan · · Score: 2

      Before making such bold claims, you should probably check out man perl, and the plethora of man pages which are listed therein.

      Believe me, I am quite aware of the Perl man pages -- I even learned Perl from them in 1992 and I still use Perl (and its man pages and perldoc) today. But to really know Perl you have to read the Camel book. And Wall and Schwartz haven't made that free yet. The Ruby version is free, however.

  9. Ruby code examples by EyesWideOpen · · Score: 3, Informative

    You can find some code examples of the Ruby language (as well as several other languages) here.

    --

    As with the sun's light
    My mom was magnificent
    Unquestionable
    1. Re:Ruby code examples by jtra · · Score: 1
      --
      -- Wanna textmode user interface for ruby? http://freshmeat.net/projects/jttui/
  10. Ruby? by Anonymous Coward · · Score: 2, Funny

    "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."

    1. Re:Ruby? by beme · · Score: 1

      "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

      --

      -beme
      1971
    2. Re:Ruby? by King+Babar · · Score: 2
      "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.

      --

      Babar

    3. Re:Ruby? by beme · · Score: 1

      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!).

      --

      -beme
      1971
    4. Re:Ruby? by King+Babar · · Score: 2
      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

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

      --

      Babar

    5. Re:Ruby? by Anonymous Coward · · Score: 0

      start using the dvorak keyboard.

    6. Re:Ruby? by Anonymous Coward · · Score: 0

      already use dvorak.. switched a few years ago.. that's probably why i don't like the shifted chars as much.. so easy to type most words without moving the fingers.. i don't get enough exercise...

  11. alot -- a lot by swagr · · Score: 1

    Someone will surely correct my grammar if I don't.

    --

    -... --- .-. . -.. ..--..
  12. Don't miss ... by anpe · · Score: 1, Redundant

    ... the excellent Programming Ruby.
    Ruby is a great language with a lovely syntax, try it !

  13. Programming Ruby Online Edition by Skip · · Score: 5, Informative

    Programming Ruby by David Thomas and Andre Hunt is available online and for free at www.rubycentral.com/book/

    --
    Skip
    --------------------
    "To create an apple pie from scratch,
    you first must create the universe."
  14. Other books by Fellgus · · Score: 5, Informative
    Check out these other books about Ruby:

    And some in german:

    --

    -larsch

    1. Re:Other books by King+Babar · · Score: 3, Informative
      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, 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)?

      --

      Babar

    2. Re:Other books by Anonymous Coward · · Score: 0

      Mentioning who the publisher of the respective books would have been much more productive then links to B&N. Hint, AW takes preference over ORA for damn near anything but Perl.

      I reccomend going to www.bestbookbuys.com and finding them there. They have a meta-search that has price comparasons, including shipping.

  15. My little (unreleased) intro to Ruby by Fweeky · · Score: 4, Interesting

    http://freak.aagh.net/ruby/intro/

    It's only a first draft, but it should give a reasonable overview to the curious.

  16. I prefer Ruby to Python, but... by HiThere · · Score: 3, Informative

    Python currently has better database connections, and it's currently easier to distribute Python for computers that don't already have Python installed than it is to distribute Ruby to computers that don't have Ruby installed.

    Also, there is a bit of a disagreement about the GUI interface to use with Ruby. Fox is preferred on Windows machines, but it often causes library conflicts if you attempt to install it on Linux machines.

    These are "growing pains", but for the moment Python is significantly more useable for many purposes. (OTOH, if I'm only using it on my own machine, or I only intend to distribute it to other programmers, and if GUI doesn't need to port to a system that can't handle gtk properly (e.g., Win95), then I prefer Ruby.)

    OTOH, I'm still not totally convinced that importable modules can actually replace multiple inheritence. So far I haven't run into any show stoppers, but I keep having the nagging feeling that one is lurking somewhere in the future ... and that by the time I hit it I may have several thousand lines of code to re-write. I don't know of any proof, and anyway proofs tend to deal with possibility rather than practicality. (E.g., one could use the method of Goedels proof to create an essentially unbreakable cypher. The problem is that it would take an truly unreasonable amount of time to both create the message and to decode it. So it's totally useless.)

    --

    I think we've pushed this "anyone can grow up to be president" thing too far.
    1. Re:I prefer Ruby to Python, but... by Anonymous Coward · · Score: 0

      abort the project! we do not have multiple inheritance!

      ridiculous.

    2. Re:I prefer Ruby to Python, but... by King+Babar · · Score: 2
      OTOH, I'm still not totally convinced that importable modules can actually replace multiple inheritence. So far I haven't run into any show stoppers, but I keep having the nagging feeling that one is lurking somewhere in the future ... and that by the time I hit it I may have several thousand lines of code to re-write.

      Given the number of object-oriented languages (including Java) that have been doing Just Fine without MI, I suspect your nagging feeling is probably just needless worry. I have no doubt that your code could have a different conceptual feel without multiple inheritance, but, hey, single (implementation) inheritance itself is probably over-used. Stepanov, god of the STL would argue (I think) that what people really want in most cases is generic programming on well-structured data. Interestingly, Ruby can be used in this way, too, despite the pretensions to being "pure OO".

      --

      Babar

    3. Re:I prefer Ruby to Python, but... by JLyle · · Score: 1
      Also, there is a bit of a disagreement about the GUI interface to use with Ruby. FOX is preferred on Windows machines, but it often causes library conflicts if you attempt to install it on Linux machines.


      For the record, I've never heard of FOX causing "library conflicts" if you attempt to install it on Linux machines (can you substantiate this claim at all?). In fact, Linux is the primary development platform for FOX (although it's equally well-supported on Windows).

      If we're still comparing Ruby with Python, what's your point anyway? The last time I checked there was plenty of disagreement about which GUI interface to use with Python as well.
    4. Re:I prefer Ruby to Python, but... by HiThere · · Score: 2

      Substantiate? Well, I've got two machines that *it* won't finish building on. (However, it means the Fox-FxRuby-Ruby combination ... not just Fox.) I'm hoping that the next release will have Fox rpms that solve this (the conflict is with some OpenGL stuff that I don't even know that I use, but FxRuby won't finish building...And I can't fix it because when I try the system says I'm about to break [something really important..don't remember exactly what, but it uses ?Motif??]. I could push harder, but I don't want to break an already severly flexed system.)

      Now one of these machines is a beta Mandrake 8.2 and the other's a beta Red Hat 7.3, so it's not conclusive. But the Mandrake that I've ordered hasn't told me that it's shipped yet, so... that's the best I can do.

      As to Python GUI, Tkinter seems solid on all platforms I've tested. It might not do everything that I'd want, but it works. The Ruby version .. last time I looked it was called beta, and nobody seems to be pushing behind it (I could easily be wrong. When I looked the only info was in Japanese, which didn't do me any good.) So it seems that Python has a basic GUI and Ruby has a better one coming along (though FxPython also exists).

      I don't know whether or not I would have been able to compile Fox on Windows. Probably not (I'd depend on CygWin). But the Professional Programmers site has a nice install that puts a working copy of Fox in the Ruby folder of even a Win95 machine (nice, as that's what I use). But (as I said) I can't use it on the Linux side of things. Yes, it isn't really Fox, it's a coordination between Fox, FxRuby, and OpenGL, but the effect is that the build won't complete.
      (It's better than it was... for awhile I had three mutually incompatible versions of things running. Now I've got Fox compiled, and the Fox Calculator working, etc. But the Ruby connection is still non-functioning.)

      SpecRuby seems to almost work (on Win95), but every time I exit it, it crashes (so did a prior version of Fox, though less regularly). I think that these must be designed for Win98, and Win95 is doing something differently. I suppose I might decide to build all of my windows on the Linux side, and port them to the Windows side, but I find mechanically generated code hard to tinker with. (Perhaps I should just try harder, but ... I really don't want to invest a bunch of time on tk, and with Python I'm much of the way up the learning curve.)

      Glade is the obvious answer, but unfortunately the use of gtk with Win95 is ... flakey. I understand that it works well with Win98, but that's no help. (I don't intend to buy another OS from MS.)

      --

      I think we've pushed this "anyone can grow up to be president" thing too far.
  17. Ruby shines with unit tests by pong · · Score: 5, Interesting

    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.

    1. Re:Ruby shines with unit tests by innerraver · · Score: 2, Interesting

      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?

    2. Re:Ruby shines with unit tests by pong · · Score: 2

      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

  18. Very much 'Not Insightful' - List of Docs follows by maddog2o_2o · · Score: 4, Informative

    Actually, the entire content of the post is one question and two outright falsehoods.

    Check out the ruby-lang pages list of docs there's a lot of good stuff there.

    I own Programming Ruby - The Pragmatic Programmer's Guide (available in full online) known as 'The Pickaxe Book' (ie the Ruby Camel) and Ruby in a Nutshell from OReilly by the language designer Yukihiro Matsumoto (known as matz on the mailing list). Hail matz! :)
    Then there's a personal favorite dead tree of mine The Ruby Way by Hal Fulton. I haven't finished it yet but it's full of crunchy goodness.

    Between, those books and the wealth of tutorials and docs linked from www.ruby-lang.org/en there's a lot more material available than there was for Python when I started using it.

    And the fact that these books keep selling and getting published implies to me that people are using Ruby.

    When in doubt check the Ruby Book list at www.rubygarden.org to see whats out now and whats in the pipe.

    As far as the bindings being buggy - I've only played with a few but they seem as good as I recall pythons bindings from when I used python. (admittedly that was a while ago)

    C'mon give Ruby a try - I've found it a delight to play with. You might like it - and if not -well, learning why you dislike it is a valuable type of learning as well :)

    I suggest the Pickaxe book (you'll eventually want to buy a hardcopy) and if you don't want to download the interpreter right now - well hold onto your hats. A clever fellow named Clemens Wyss has an 'interactive' version of the Pickaxe with all the code examples live in your browser so you can play with the code a lil. Find it here

    In closing:
    RubyCentral
    RubyGarden
    Ruby-Lang
    Ruby-Talk Mailinglist

    or check out the newsgroup at comp.lang.ruby

    Kevin
    --
    'Just another Ruby Miner'

  19. sadly enough by Karma+Star · · Score: 1

    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).

    --
    Me email iz skyewalkerluke at microsoft's free email service.
    1. Re:sadly enough by Colonel+Panic · · Score: 1

      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).

  20. Here's what it's going for by Anonymous Coward · · Score: 0

    http://www.bestwebbuys.com/books/compare/isbn/1928 994644

  21. Any thorough, unbiased comparison Ruby v. Python? by Anonymous Coward · · Score: 2, Interesting

    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?

  22. Sample Chapter by ryanr · · Score: 5, Informative

    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

    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.)

  23. Nice large fonts, lots of complete examples by Ilan+Volow · · Score: 2

    I wish more programming books had these kinds of problems.

    --
    Ergonomica Auctorita Illico!
  24. ruby's great and all, but... by scrytch · · Score: 3, Interesting

    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've finally had it: until slashdot gets article moderation, I am not coming back.
  25. Ruby is a wonderful language by Guib607 · · Score: 1, Interesting

    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

    1. Re:Ruby is a wonderful language by JLyle · · Score: 1
      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?
  26. Oh Ruby by Anonymous Coward · · Score: 0

    You've painted up your lips and rolled and curled your tinted hair...

  27. Re:Any thorough, unbiased comparison Ruby v. Pytho by jimm · · Score: 1

    For embedding Ruby in Java, see JRuby (http://jruby.sourceforge.net).

    I'm not going to respond to the "Python is better than Ruby" troll. Oops, I just did.

    --
    Transcript show: self sigs atRandom.
  28. subject by Anonymous Coward · · Score: 0

    "google bombing" is funny

    Mendelson