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."
What is Ruby? (Score:1)
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)
Re:What is Ruby? (Score:2)
- I am writing a Windows desktop application with Internet connectivity. It needs to have a GUI, ease of installation and general portability among Win32 platforms. Can I use Ruby?
Yes.
- I am writing a low-level routine to be embedded into MP3 player hardware to increase the functionality and add some features to the hardware piece. Can I use Ruby?
Probably, though you'd want to do the low-level stuff as a C extension.
Re:What is Ruby? (Score:2)
Re:What is Ruby? (Score:2)
Language Bigot!!
Re:What is Ruby? (Score:2)
Re:What is Ruby? (Score:5, Informative)
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.
Re:What is Ruby? (Score:1)
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
Re:What is Ruby? (Score:2)
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
Re:What is Ruby? (Score:2)
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
Slower than C... (Score:2)
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
Re:What is Ruby? (Score:1)
Re:What is Ruby? (Score:2)
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)
I use Ruby, Perl, and C for ALL my programming these days, and I don't distinguish between them in those terms any more.
Old Languages Never Die (Score:2)
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]
Ideal language (Score:1)
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)
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.
Re:Ideal language (Score:1)
I've got a number of gripes with Ruby, but fewer than I had with Python. Among the many features I didn't like in Python were the lack of a consistent Boolean type and the lack of standard closure semantics. Instead, we get values evaluated in a Bool
Ruby's biggest problem (Score:3, Interesting)
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.
Re:Ruby's biggest problem (Score:2)
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.
Re:Ruby's biggest problem (Score:1)
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/
Re:Ruby's biggest problem (Score:2)
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
Re:Not all syntax is equally confusing. (Score:2)
* You're probably using an editor that'll auto-indent (from emacs to Visual Python), so you don't have to do it consciously
* It looks just like properly-indented code, so you don't have to read the whitespace. Believe me, you're not there saying "Hmm. This is indented so far, so I think it goes with that!"
In other words, the whitespace in Python doesn't have as much meaning as you seem to attribute to it.
Almost no one has to hit the spacebar 16 times (unless you're using N
Re:Ruby's biggest problem (Score:1)
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
You're so right about Unicode! (Score:2)
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 (Score:2)
Re:note (Score:1)
Re:note (Score:1)
-austin
Re:note (Score:1)
Paul
Re:note (Score:1)
I own two (Score:4, Interesting)
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.
Ruby Developer's Guide also good (Score:4, Informative)
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)
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
Re:ruby is great (Score:2)
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.
one vote for The Ruby Way (Score:2)