Great New Ruby Book 0
Posted Friday, May 25, 2007 18:17
There’s a new Ruby book out that just may be the best resource for anyone getting started with Ruby, or who has been using Rails for a little while and feels they need stronger Ruby skills (which, I suspect, describes a great number of Rails programmers, myself included).
Beginning Ruby is, despite its title, not just a beginner’s book. It does start at the beginning, and it is written without assuming a lot of background, but it is not a simplified, dumbed-down treatment. I found it to be very easy to read, and it follows a natural progression from language basics through a variety of advanced topics.
The author, Peter Cooper, is a very experienced Ruby programmer, and his insights shine throughout the book. Among many other things, he’s the creator of Feed Digest, Ruby Inside, and code snippets, which he sold to DZone. He was recently interviewed for the Rails Podcast.
In addition to an exposition of the language that builds nicely over the course of the book, there’s chapters on the Ruby ecosystem, how to design an application, and network programming. There’s also a chapter that covers many of the useful libraries and gems.
There is one chapter that summarizes Rails, but this is definitely a Ruby book, not a Rails book.
Any Ruby book will inevitably be compared to Dave Thomas’ Programming Ruby (commonly known as “the Pickaxe” for the image on its cover), which has been the standard reference for the language since its debut and won’t lose its spot as a reference work. I found Beginning Ruby to be easier to absorb, however, and I thought the examples were especially clear and useful. If you’re already deep into Ruby, you probably don’t need Beginning Ruby. But if you’re relatively early in the curve, I highly recommend this book.
Ruby vs. Blunt Scissors 0
Posted Thursday, February 15, 2007 16:55
One of the things that Ruby’s advocates find wonderful, and others often find scary, is its dynamic nature. You don’t declare the types of variables, and you can change them at will. Classes (even the base classes) are always open and new methods can be easily added, or existing ones overridden.
You can certainly get yourself into trouble by misusing these capabilities, but they eliminate a lot of unnecessary coding and increase the flexibility of your code. Ruby doesn’t protect you against yourself; it gives you the power and trusts that you’ll use it wisely. Java, at the other extreme, makes you go through hoops to protect you from yourself. Dave Thomas calls Java “the blunt scissors of programming languages.”
I am no expert on programming languages, I’ve never programmed in Java, and I’m uninterested in religious debates. But I do enjoy Ruby, and I have a lot of respect for the numerous programmers who say it has made them more productive—and that the fears that people coming from more structured languages have just aren’t justified. In reality, they say, things like mistakenly using a variable as the wrong type just don’t happen often, and protecting yourself from this isn’t worth all the declarations and rigidity that strict typing imposes.
If you haven’t used Ruby, you should take a look. ruby-lang.org is a great place to start.
If you’re a Java programmer, check out Bruce Tate’s From Java to Ruby.
Irrelevant side-note: If you google for “ruby benefits,” the top result is for a ruby gemstone necklace claimed to “correct any mental distortions regarding the meaning of love, particularly divine love. It also clarifies communication among your mind, memory, emotions, and body regarding divine love and its expression.” I guess they invested more in SEO than did ruby-lang.org.

