Ruby Cookbook
| |||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||
| Sort customer reviews by: | |||||||||||||||||||||||||||||
|
Show All Reviews on Page
Hide All Reviews on Page
| |||||||||||||||||||||||||||||
| Ruby Cookbook | |||||||||||||||||||||||||||||
|
Do you want to push Ruby to its limits? The Ruby Cookbook is the most comprehensive problem-solving guide to today's hottest programming language. It gives you hundreds of solutions to real-world problems, with clear explanations and thousands of lines of code you can use in your own projects. From data structures and algorithms, to integration with cutting-edge technologies, the Ruby Cookbook has something for every programmer. Beginners and advanced Rubyists alike will learn how to program with:
If you need to write a web application, this book shows you how to get started with Rails. If you're a system administrator who needs to rename thousands of files, you'll see how to use Ruby for this and other everyday tasks. You'll learn how to read and write Excel spreadsheets, classify text with Bayesian filters, and create PDF files. We've even included a few silly tricks that were too cool to leave out, like how to blink the lights on your keyboard. The Ruby Cookbook is the most useful book yet written about Ruby. When you need to solve a problem, don't reinvent the wheel: look it up in the Cookbook. |
|||||||||||||||||||||||||||||
| Reader Reviews 1 - 32 of 32 | |||||||||||||||||||||||||||||
| Review Date |
Review Rating(5 High) |
Review Helpful to: |
Customer Review | Reviewer Info |
Permanent Link |
||||||||||||||||||||||||
| Reader Reviews Below Sorted by Newest First | |||||||||||||||||||||||||||||
| 05-28-08 | 5 | (NA) |
| Reviewer | Permalink | ||||||||||||||||||||||||
|
Yes you can read online material but it's just not as good. The book really has some great content.
(Review Data Last Updated: 2008-11-30 06:07:45 EST)
|
|||||||||||||||||||||||||||||
| 02-06-08 | 4 | (NA) |
| Reviewer | Permalink | ||||||||||||||||||||||||
|
Not a simple cookbook (o'reilly is cool). A lot of usefull informations and several lines about the differences with some other languages (python, java)
Is not a "must" but it is a good resource for many of us. (Review Data Last Updated: 2008-05-28 04:36:50 EST)
|
|||||||||||||||||||||||||||||
| 01-26-08 | 4 | (NA) |
| Reviewer | Permalink | ||||||||||||||||||||||||
|
As with most O'Reilly cookbooks, Ruby Cookbook has two main avenues of exploration: the core of the language, and an introduction to some of the more important libraries, presented as the solutions to a series of themed tasks and problems the working programmer might face.
Coverage of the likes of XML, databases, networking, web services is all present as you'd expect, but I always enjoy the exploration of the core language the most, especially as it applies to strings, arrays and hashes, where the idioms and 'zen' of programming in a language are normally revealed. Ruby Cookbook excels in this area, but it also provides a very solid grounding in Ruby's object system, namespaces/modules and blocks. The basics of Ruby's metaprogramming and reflective abilities are also well enumerated, although the recipe-like structure of the book doesn't quite communicate the 'magic' behaviour that pervasive Ruby metaprogramming (exemplified by Rails, of course) conjures. If you've read Perl Cookbook, rest assured that the Ruby version is easily as good, although as you might expect, in the latter half of the book there's less emphasis in Ruby Cookbook on low level networking and sysadmin work and more on higher level libraries. That said, the chapter on Rails felt a bit superfluous. This book is well-written and thorough, and would be a great second Ruby book (The Pickaxe being the obvious example for a first book). It has some interesting things to say about performance for some of the techniques it describes, although given how many different Ruby runtimes there are and how quickly they're progressing, it's difficult to say how relevant these will stay. Some of the examples are even quite amusing. Unless you were hoping for some truly in-depth metaprogramming detail, you'd be hard pressed to find anything wrong with Ruby Cookbook, except for the fact that it's competing with established Ruby must-read The Ruby Way, which covers very similar ground, in a very similar style. You don't need both books, and I preferred The Ruby Way. Nonetheless, this stands on its own as a great Ruby book. (Review Data Last Updated: 2008-02-15 04:20:58 EST)
|
|||||||||||||||||||||||||||||
| 01-20-08 | 4 | (NA) |
| Reviewer | Permalink | ||||||||||||||||||||||||
|
Great stuff. I suggest this book for a first look at Ruby over and above Programming Ruby and Agile Web Development. If you're already a coder, this book will put Ruby in context of essential problems that you typically solve in whatever language you're called to use in your day-to-day work. This is this book's strength. It's not the deepest look at Ruby, and it's not a replacement for The Ruby Way or Programming Ruby, but it might get you into the groove faster by leveraging common programming tasks and their representations in Ruby code.
(Review Data Last Updated: 2008-02-15 04:20:58 EST)
|
|||||||||||||||||||||||||||||
| 10-17-07 | 5 | (NA) |
| Reviewer | Permalink | ||||||||||||||||||||||||
|
i found ruby cookbook is a good read for learning ruby, provides good thorough explanations of the topics, and gives great examples as well. if you want a good dummies book to get you going, this is not the book for you. if you want an encyclopedic reference 1000 pages long, look elsewhere. but this is a great happy medium.
(Review Data Last Updated: 2008-02-15 04:20:58 EST)
|
|||||||||||||||||||||||||||||
| 07-24-07 | 5 | (NA) |
| Reviewer | Permalink | ||||||||||||||||||||||||
|
A practical Ruby book with concrete examples. This is not an introduction to Ruby, but it is accessible to someone who has learned the basics. It consists of a series of examples, mostly about two pages long including both code and discussion. Its table of contents is organized by solution--so regular expressions are explained in section titled, "Getting the Parts of the String You Want." Thus it is eminently browsable, allowing you to easily find the pages you need right now.
(Review Data Last Updated: 2008-02-15 04:20:58 EST)
|
|||||||||||||||||||||||||||||
| 07-18-07 | 4 | 0\1 |
| Reviewer | Permalink | ||||||||||||||||||||||||
|
I've had both good and bad experiences with O'Rielly books, but this one is absolutely good. It works as a great reference book for me. I've picked up so much just from looking at how parts of the recopies are done.
I rated it with four stars because this always room to improve, no book is perfect, but this one comes close. (Review Data Last Updated: 2008-02-15 04:20:58 EST)
|
|||||||||||||||||||||||||||||
| 07-16-07 | 5 | (NA) |
| Reviewer | Permalink | ||||||||||||||||||||||||
|
As others already said, this book is all about immediate, hands-on learning experience with some real, live and working code, delivered by *you* quickly. This book by itself may not be enough to gain a deeper understanding of Ruby, and its philosophical background, but should be certainly enough to get you going with a new language, and get a "feel" for it: not only it covers the language (more or less), and the standard library, but it also offers you a quick "preview" of some most popular 3rd party libraries. Just keep in mind that there are many others, and sometiems I disagree with author's selections of what to include. (ImageMagic is one, for example)
Personally, for almost everything I learn, I prefer to have two kinds of manuals: a) deep and concise, and b) quick&dirty. This one fits the second role just perfectly, therefore I recommend it. For more depth, go ang get "Programming Ruby" as well. (Review Data Last Updated: 2007-07-18 21:37:02 EST)
|
|||||||||||||||||||||||||||||
| 05-30-07 | 4 | 2\2 |
| Reviewer | Permalink | ||||||||||||||||||||||||
|
If you are a learning-by-doing type of guy then reading this book is probably the best way to boost your Ruby skills.
There are a lot of useful recipes, especially on Web stuff. Nevertheless, I'll give it only 4 Stars because it's lacking some basic info on Ruby syntax that I had to find on my own searching the internet. For someone who is new to Ruby this certainly is a drawback. (Review Data Last Updated: 2007-07-16 20:37:38 EST)
|
|||||||||||||||||||||||||||||
| 04-23-07 | 5 | 0\1 |
| Reviewer | Permalink | ||||||||||||||||||||||||
|
Having gone through several O'reilly cookbooks, I just went to the store and picked this book even before reading a single review. If you're into hands-on coding, the cookbook series takes you direct into a pool of codes to swim in - you're gonna love it! Each page has valuable code snippets that can help you through your everyday coding tasks. This book is a must have for any Ruby programmer, right next to his desk.
The recipes or code examples are written in a very intelligent manner, not only to learn, but also to appreciate Ruby as a language. Most of the people I have met who are into Ruby, they come from a Perl, C, Python, Java or other programming background. So this book perfectly addresses those folks. If you're new to programming, I would suggest you pick some other book. (Review Data Last Updated: 2007-07-02 14:58:40 EST)
|
|||||||||||||||||||||||||||||
| 04-17-07 | 4 | (NA) |
| Reviewer | Permalink | ||||||||||||||||||||||||
|
As a Perl old timer I have only the most pleasant memories of this book's "sister title" - "Perl Cookbook", also by O'Reilly. The O'Reilly Cookbook series aims to fill the blank space between talkative introductory guides and heavy reference tomes for programming languages. Edited as a set of "recipes" - practical programming problems, divided into topics, the Cookbooks are a great way to quickly find solutions for common problems, and can also serve as a good intermediate / advanced tutorial to the language for those of us who like learning by example.
The Ruby Cookbook can proudly hold a very respected spot in the Cookbook series, being very comprehensive and well written. The authors clearly strove to cover a lot of topics and provide copious examples, not sparing 800+ pages for the task. The first ten chapters of the book deal with general Ruby programming topics such as strings, code blocks, metaprogramming, etc. These chapters can serve as a good tutorial in advanced Ruby, presenting interesting examples and discussing different approaches to solve problems. The next six chapters are devoted to more specific topics: XML/HTML, Graphics, Databases, Internet, Rails and Web Services. These can be either very important or barely relevant, depending on what you do with Ruby. I skimmed through a good chunk of these chapters, since I don't use Ruby for web programming. Chapter 17: Testing, Debugging, Optimizing and Documenting is the one I liked most in the book. The authors skillfully present how to use the special strengths of Ruby to make the work of a programmer easier. The recipes in this chapter are good advocates for using Ruby over other languages. Next come few more chapters about GUIs, Multithreading, Rake and other miscellanea, providing an overview of the more advanced features of Ruby. Overall, the scope of this book is just huge - it's a mine of information, and a very good tool for any Ruby programmer. Overlooking a few minor typos and errors, the book is quite well written and the authors know how to get their message through with detailed examples and numerous code samples. (Review Data Last Updated: 2007-07-02 14:58:40 EST)
|
|||||||||||||||||||||||||||||
| 03-12-07 | 5 | 0\1 |
| Reviewer | Permalink | ||||||||||||||||||||||||
|
I think it's safe to assume the following:
1) Ruby on Rails is hot. 2) Many of us are coming over from other languages (C++, C#, Java) and frameworks (.NET, JEE). 3) You need to start by getting the Ruby pickaxe book ("Programming Ruby") and "Agile Web Development with Rails," both by Dave Thomas. Once you've gone through those two books it is time to face the steep and mysterious RoR learning curve. (Someone else made that statement. I can't remember where I read it, but I like it because it's true.) That's where this book (and its companion "Rails Cookbook") come in. They contain a ton of succinct, well-written examples. Even if your exact task isn't covered, you can usually find something that's close enough to get you started. And you can usually learn something new by browsing any given example. Let's face it, programming has become so complex that not owning a book like this is not an option. (Review Data Last Updated: 2007-07-02 14:58:40 EST)
|
|||||||||||||||||||||||||||||
| 03-11-07 | 5 | (NA) |
| Reviewer | Permalink | ||||||||||||||||||||||||
|
This book is much better than I expected - I keep it handy while programming because it saves so much time. You can skim through most of it once to get an idea of what's there, and then just refer to it as needed. It does a great job of showing you how to do a lot of interesting tasks in Ruby. It is filled with useful information, not just simple stuff. You could spend hours researching Ruby libraries, or you could just use this book.
(Review Data Last Updated: 2007-07-02 14:58:40 EST)
|
|||||||||||||||||||||||||||||
| 03-11-07 | 5 | (NA) |
| Reviewer | Permalink | ||||||||||||||||||||||||
|
I think it's safe to assume the following:
1) Ruby on Rails is hot. 2) Many of us are coming over from other languages (C++, C#, Java) and frameworks (.NET, JEE). 3) You need to start by getting the Ruby pickaxe book ("Programming Ruby") and "Agile Web Development with Rails," both by Dave Thomas. Once you've gone through those two books it is time to face the steep and mysterious RoR learning curve. (Someone else made that statement. I can't remember where I read it, but I like it because it's true.) That's where this book (and its companion "Rails Cookbook") come in. They contain a ton of succinct, well-written examples. Even if your exact task isn't covered, you can usually find something that's close enough to get you started. And you can usually learn something new by browsing any given example. Let's face it, programming has become so complex that not owning a book like this is not an option. (Review Data Last Updated: 2007-04-11 11:23:36 EST)
|
|||||||||||||||||||||||||||||
| 02-28-07 | 5 | 1\1 |
| Reviewer | Permalink | ||||||||||||||||||||||||
|
I have 9 years of web programming experience: starting with JavaScript and ending with Java.
Recently i started to hear about how beautiful is Ruby on Rails (in Italy technologies arrive 2 years late...), so i decided to learn Ruby (and then Rails). I've looked for something who spares me the OO paradigm i already know, but that throws me in the middle of pro techniques i can understand. Well this book is so great in doing this! Strongly racomended. (Review Data Last Updated: 2007-07-02 14:58:40 EST)
|
|||||||||||||||||||||||||||||
| 02-27-07 | 5 | (NA) |
| Reviewer | Permalink | ||||||||||||||||||||||||
|
I have 9 years of web programming experience: starting with JavaScript and ending with Java.
Recently i started to hear about how beautiful is Ruby on Rails (in Italy technologies arrive 2 years late...), so i decided to learn Ruby (and then Rails). I've looked for something who spares me the OO paradigm i already know, but that throws me in the middle of pro techniques i can understand. Well this book is so great in doing this! Strongly racomended. (Review Data Last Updated: 2007-03-11 21:56:33 EST)
|
|||||||||||||||||||||||||||||
| 02-25-07 | 5 | (NA) |
| Reviewer | Permalink | ||||||||||||||||||||||||
|
Do you know just a little bit about Ruby? If you do, then this book is for you. Authors Lucas Carlson and Leonard Richardson, have done an outstanding job of writing a book that includes recipes suitable for all skill levels.
Carlson and Richardson, begin by covering Ruby's built-in data structures and algorithmic problems. Then, the authors discuss the Ruby idiom and philosophy. Next, they explore popular ways of storing data. They also look at different types of applications. Finally, the authors cover the auxiliary tasks that surround the main programming work of a project. This most excellent book focuses mainly on generic programming techniques. Perhaps more importantly, this book covers specific application frameworks and best practices. (Review Data Last Updated: 2007-02-27 15:32:49 EST)
|
|||||||||||||||||||||||||||||
| 01-25-07 | 5 | 0\1 |
| Reviewer | Permalink | ||||||||||||||||||||||||
|
'Ruby Cookbook' by Lucas Carlson is a must-have book for any and all Ruby developers and/or administrators. Packed to the brim with 850+ pages of Ruby goodness, this book has the following Chapter listing:
01 Strings 02 Numbers 03 Date and Time 04 Arrays 05 Hashes 06 Files and Directories 07 Code Blocks and Iteration 08 Objects and Classes 09 Modules and Namespaces 10 Reflection and Metaprogramming 11 XML and HTML 12 Graphics and Other File Formats 13 Databases and Persistence 14 Internet Services 15 Web Development: Ruby on Rails 16 Web Services and Distributed Programming 17 Testing, Debugging, Optimizing, and Documenting 18 Packaging and Distributing Software 19 Automating Tasks with Rake 20 Multitasking and Multithreading 21 User Interface 22 Extending Ruby with Other Languages 23 System Administration Most times I don't like books that are this big as I feel that brevity rules, but as with most O'Reilly books, any additional pages are not put in just to increase the bulk, but rather the content within. If you are a Ruby user, you owe it to yourself to pick up this guide and improve today! ***** HIGHLY RECOMMENDED (Review Data Last Updated: 2007-02-25 15:20:35 EST)
|
|||||||||||||||||||||||||||||
| 01-02-07 | 5 | 2\2 |
| Reviewer | Permalink | ||||||||||||||||||||||||
|
This cookbook is aimed at people who know at least a little bit of Ruby, or who know a fair amount about programming in general. This book isn't a Ruby tutorial, but if you're already familiar with a few other programming languages, you should be able to pick up Ruby by going through the first 10 chapters of this book. This book contains recipes suitable for all skill levels. It focuses mainly on generic programming techniques, but it also covers specific application frameworks such as Ruby on Rails and GUI libraries, as well as best practices such as unit testing. I discuss the book further in the context of the table of contents:
The book starts with six chapters covering Ruby's built-in data structures. Chapter 1, Strings, contains recipes for building, processing, and manipulating strings of text. There are a few recipes specifically applicable to regular expressions (Recipes 1.17, 1.18, and 1.19). Chapter 2, Numbers, covers the representation of different types of numbers: real numbers, complex numbers, arbitrary-precision decimals, and so on. It also includes Ruby implementations of common mathematical and statistical algorithms, and explains some Ruby quirks you'll run into if you create your own numeric types (Recipes 2.13 and 2.14). Chapter 3, Date and Time, covers Ruby's two interfaces for dealing with time: the one based on the C time library, which may be familiar to you from other programming languages, and the one implemented in pure Ruby, which is more idiomatic. Chapter 4, Arrays, introduces the array, Ruby's simplest compound data type. Chapter 5, Hashes, covers the hash, Ruby's other basic compound data type. Chapter 6, Files and Directories, covers techniques for reading, writing, and manipulating files. This chapter also covers Ruby's standard libraries for searching and manipulating the filesystem. The next four are more abstract and are about Ruby idiom and philosophy. Chapter 7, Code Blocks and Iteration, contains recipes that explore the possibilities of Ruby's code blocks, also known as closures. Chapter 8, Objects and Classes, contains recipes for writing different types of classes and methods, and a few recipes that demonstrate capabilities of all Ruby objects such as freezing and cloning. Chapter 9, Modules and Namespaces, covers Ruby's modules. These constructs are used to "mix" new behavior into existing classes and to segregate functionality into different namespaces. Chapter 10, Reflection and Metaprogramming, covers techniques for programatically exploring and modifying Ruby class definitions. The next three chapters talk about specific file formats and Ruby. Chapter 11, XML and HTML, shows how to handle the most popular data interchange formats. The chapter deals mostly with parsing other people's XML documents and web pages (see Recipe 11.9). Chapter 12, Graphics and Other File Formats, covers data interchange formats other than XML and HTML, with a special focus on generating and manipulating graphics. Chapter 13, Databases and Persistence, covers the best Ruby interfaces to data storage formats. This chapter demonstrates everything from different ways of serializing data and indexing text, to the Ruby client libraries for popular SQL databases, to full-blown abstraction layers like ActiveRecord that save you from having to write SQL at all. Currently the most popular use of Ruby is in network applications, mostly through Ruby on Rails. There are three chapters devoted to different types of applications. Chapter 14, Internet Services, kicks off our networking coverage by illustrating a wide variety of clients and servers written with Ruby libraries. Chapter 15, Web Development: Ruby on Rails, covers the web application framework that's been driving so much of Ruby's recent popularity. Chapter 16, Web Services and Distributed Programming, covers two techniques for sharing information between computers during a Ruby program. Next are three chapters on the auxilliary tasks that surround the main programming work of a project. Chapter 17, Testing, Debugging, Optimizing, and Documenting, focuses mainly on handling exception conditions and creating unit tests for your code. There are also several recipes on the processes of debugging and optimization. Chapter 18, Packaging and Distributing Software, mainly deals with Ruby's Gem packaging system and the RubyForge server that hosts many gem files. The chapter also shows you how to create and distribute gems for your own projects. Chapter 19, Automating Tasks with Rake, covers the most popular Ruby build tool. The book closes with four chapters on miscellaneous topics. Chapter 20, Multitasking and Multithreading, shows how to use threads to do more than one thing at once, and how to use Unix subprocesses to run external commands. Chapter 21, User Interface, discusses the command-line interface, character-based GUIs with Curses and HighLine, GUI toolkits for various platforms, and more obscure kinds of user interfaces (Recipe 21.11). Chapter 22, Extending Ruby with Other Languages, focuses on hooking up Ruby to other languages, either for performance or to get access to more libraries. There is one recipe about JRuby, the Ruby implementation that runs on the Java Virtual Machine (Recipe 22.5). Chapter 23, System Administration, is full of self-contained programs for doing administrative tasks, usually using techniques from other chapters. The recipes have a heavy focus on Unix administration, but there are some resources for Windows users (including Recipe 23.2), and some cross-platform scripts. (Review Data Last Updated: 2007-01-25 16:44:22 EST)
|
|||||||||||||||||||||||||||||
| 12-08-06 | 5 | 1\1 |
| Reviewer | Permalink | ||||||||||||||||||||||||
|
This book is absolutely fantastic. It has tons for newbies and a few tricks here and there for those already fluent in ruby. This is one of a very few books that sits by me at work.
(Review Data Last Updated: 2007-01-03 15:15:08 EST)
|
|||||||||||||||||||||||||||||
| 12-01-06 | 5 | (NA) |
| Reviewer | Permalink | ||||||||||||||||||||||||
|
I've looked at a couple programming "cookbooks" over the few years I've been programming, and none have ever really captured my attention. Most of them I found were lacking in useful recipes for novice programmers, or the recipes used an outdated code style or covered specific areas of a programming language. And with others, I just found it difficult to find useful tips or tricks.
The Ruby Cookbook however, provides fresh, easy to read recipes that are full of neat tips and awesome tricks. And it's all provided in an easy to read, and more importantly easy to find, format. Programmers from novice to highly experienced will find this book useful. The book is laid out using general data types as chapters at first, then moves into more abstract topics such as code blocks and modules; databases and persistence; web services and task automation with Rake. Start with the table of contents to learn about a specific area, or thumb your way through the index to find specific topics or that fast piece of code you need to complete your project. No matter how you use it, the Ruby Cookbook is a must have book for any Ruby or Ruby on Rails programmer. (Review Data Last Updated: 2006-12-08 11:08:14 EST)
|
|||||||||||||||||||||||||||||
| 11-05-06 | 5 | (NA) |
| Reviewer | Permalink | ||||||||||||||||||||||||
|
Lucas Carlson & Leonard Richardson's RUBY COOKBOOK: RECIPES FOR OBJECT-ORIENTED SCRIPTING provides Ruby users with a weighty, powerful web programming guide covering both basic and advanced functions. Beginners to intermediate Ruby users receive a reference which covers everything from Rails web applications to tips on Excel spreadsheets, bulk file renames, using Bayesian filters, PDF files and much more. It comes from a professional Ruby programmer who specializes in Rails web development and a user who has created and maintained libraries in many languages, and is packed with reference insights.
(Review Data Last Updated: 2006-12-01 11:23:32 EST)
|
|||||||||||||||||||||||||||||
| 10-29-06 | 5 | 1\1 |
| Reviewer | Permalink | ||||||||||||||||||||||||
|
Once you've gone past "Hello World" in a new language, you have to start figuring out how to do real stuff. Ruby Cookbook by Lucas Carlson and Leonard Richardson does just that (as well as a number of other things)...
Contents: Strings; Numbers; Date and Time; Arrays; Hashes; Files and Directories; Code Blocks; Objects and Classes; Modules and Namespaces; Reflection and Metaprogramming; XML and XHTML; Graphics and Other File Formats; Databases and Persistence; Internet Services; Web Development - Ruby On Rails; Web Services and Distributed Programming; Testing, Debugging, Optimizing, and Documenting; Packing and Distributing Software; Automating Tasks with Rake; Multitasking and Multithreading; User Interface; Extending Ruby with Other Languages; System Administration; Index I was tempted to think I wasn't ready for this book yet, as I don't have a firm Ruby foundation. But I'm glad I ignored that thought. For a beginner, this is a wealth of real code that does things that you will need to do in all your programs. String manipulation, number and date processing, etc. Those are the things that are fairly simple when you have experience, but stumbling blocks when you have to think about every step you take. For the intermediate and experienced coder, you'll find more advanced techniques like web services or multithreading your programs. In both cases (beginner or expert), a book like this will start to seed your imagination. Scanning through the recipes, you're sure to have one of those "ooohh... I didn't think about doing *that*!" moments. Next to the Ruby tutorial book you buy, this might be the next most important Ruby book you plunk down money for... Definitely worth it! (Review Data Last Updated: 2006-11-05 00:41:33 EST)
|
|||||||||||||||||||||||||||||
| 10-04-06 | 5 | 2\2 |
| Reviewer | Permalink | ||||||||||||||||||||||||
|
Sometimes, the difference between getting a project off the ground and watching it linger on the launchpad is finding an example of how to do something in code.
Perhaps you're working on a project and you'd like to send an email using Ruby. Maybe you'd like to know how to read and write zip files or create thumbnail images from full size graphics files. Sometimes cruising through the API documentation just doesn't quite give you enough info. The Ruby Cookbook fills the void for a portable version of a Ruby code snippet search engine. For each example, there is a 'Problem' description, a 'Solution' section containing one or more chunks of Ruby code and a 'Discussion' section for follow-up. Most examples also have a 'See Also' section for cross reference. A huge amount of material is covered. Topics range from simple stuff like strings, numbers, hashes, arrays and objects to more challenging subjects like code blocks, reflection, metaprogramming and multithreading. It has chapters on Internet services, Web services and distributed programming, and Web development with Ruby on Rails. I'm only just skimming the surface here, this is a big book with 873 pages. It is quite simply packed with goodies. There is something in this book for Ruby programmers at every level. The book is well written and easy to read. You can download a zip file containing all of the code samples from the O'Reilly website. If you want to learn Ruby and Ruby on Rails, there are three books that will help you more than anything else: Programming Ruby by Dave Thomas, Agile Web Development with Rails by Dave Thomas and David Heinemeier Hansson and the Ruby Cookbook by Lucas Carlson and Leonard Richardson. (Review Data Last Updated: 2006-10-30 10:46:30 EST)
|
|||||||||||||||||||||||||||||
| 10-04-06 | 5 | 1\1 |
| Reviewer | Permalink | ||||||||||||||||||||||||
|
The other essential being Programming Ruby, which I have gone through cover to cover. That gave me a great grasp of the language, but did not give me the tools to create excellent Ruby programs. I read most of the sections of this book- I am not doing Rails and Web development, so I skipped or skimmed those topics. I implemented some ideas from the recipes and just learned from example on others. I now write much better code, and have a new air of confidence when solving problems with ruby. If you plan on programming more than a few scripts with Ruby, buy this book!
There was one GLARING mistake in the book that I noticed, that would make me rate the book 4.5 stars if it was an option. I have submitted this as errata to O'Reilly, but it does not seem that it is listed. In the discussion for Recipe 20.11 the author talks about the difficulty of synchronizing objects and states "Short of hacking Mutex... the only way to avoid this problem is to be careful" His deadlock example is: require 'thread' $lock = Mutex.new Thread.new do $lock.synchronize{ { $lock.synchronize { puts 'I synchronized twice!' } } end where 'puts ...' will never be executed Actually, all that needs to be done is to use the Monitor library, which is re-entrant. require 'Monitor' $lock = Monitor.new (Review Data Last Updated: 2006-10-30 10:46:30 EST)
|
|||||||||||||||||||||||||||||
| 09-01-06 | 5 | 1\1 |
| Reviewer | Permalink | ||||||||||||||||||||||||
|
Some O'Reilly books are horrible, and some are great--this happens to be one of the better ones. It's full of concise examples of how to use Ruby's standard libraries and most popular extensions that more than make up for their frequently terrible and always unnavigable RubyDoc generated documentation. An excellent next step for those who've read through "Programming Ruby" and are wondering how to put the language's better features to good use without becoming completely dependent on any of the currently popular application frameworks I'd guess about 90% of people are learning Ruby for. It even covers RubyCocoa basics.
(Review Data Last Updated: 2006-10-04 09:36:15 EST)
|
|||||||||||||||||||||||||||||
| 08-29-06 | 4 | (NA) |
| Reviewer | Permalink | ||||||||||||||||||||||||
|
I have a confession to make. Over more than twenty years as a programmer I'd never really had my head around object-oriented programming. I started out using C and then tried PHP and Perl and treated both as purely procedural languages (indeed, one Perl guru looked at my code and said "you were a C programmer weren't you"; humbling). Java, JavaScript, C++ and even Objective C had their turn at getting me to convert but none took (though I do code JavaScript under sufferance) until Ruby. A few month ago I started using Rails and became hooked on it and the underlying language. My Rails and Ruby skills have progressed in leaps and bounds. I've already had a good read of "Programming Ruby" and "Agile Web Development with Rails" and enjoyed and learnt from both.
I also have to admit to loving the O'Reilly "Cookbook" series. Several, particularly the "Perl Cookbook", have pride of place on the bookshelf closest to my computer. So the "Ruby Cookbook" by Lucas Carlson and Leonard Richardson was eagerly awaited. The "Cookbook" series are designed to provide you with a plethora of code examples to guide you in writing your own code. I'm definitely a hands-on style of learner and the Cookbook series suits my style - I can start getting my hands dirty with complex problems knowing I have help to code my way of out of the tight spots. This one covers a wide range of tasks from simple, such as walking a directory tree or manipulating text and numbers, through to more complex such as working with AJAX in Ruby on Rails. If you have't previously come across a book in this style then each chapter is broken up into a number of 'recipes' with a problem, a solution and then discussion of the solution. This sort of book lives and dies by two criteria - the quality of the code and the usefulness of the recipe selection. "Ruby Cookbook" wins on both. The topics covered are wide and leave little, if any, part of the language unexplained. They start with data and structures such as strings and hashes before moving on to code blocks, objects, classes and modules. There is then an intriguing chapter on reflection and metaprogramming that I am still puzzling through before the book moves on to more internet based topics such as XML, HTML, web and internet services and, of course, Rails. The book then proceeds with chapters on the necessary housekeeping of development such as testing, packaging and automating tasks with Rake before finishing with extending Ruby with other languages and system administration tasks. The code is well written; clear and well commented, easily understandable by a virtual newb like me. The discussion is fairly clear, seemingly concise while allowing you to understand the code and how it might be changed for particular purposes. I'm not going to go into more details as to the contents but instead point you to the book's page at O'Reilly which includes a link to the contents, listnig all the recipes in the book, and two example chapters; Chapter 7 on code blocks and iteration and Chapter 15 devoted to Rails. Together they will give you a good feel for the style and contents of the book. The book is well written and well edited. I've already tried over a dozen of the recipes and haven't found a single code error, so my faith in the other 300 or so has risen considerably. The discussion that accompanies each recipe is a marvelous way of learning just that little bit more about the language. I found them quite good, though the odd one could do with further explanation if the book is to stand on its own - for example the discussion accompanying the recipe to iterate over a hash was not perfectly clear on the difference between Hash#each and Hash#each_pair. At more than 800 pages this is a large and extensive volume, though the price may make you wince. Usually programming books this large have at least part of their size dedicated to something I refer to as pseudo-padding, some sort of reference or simple language explanation - this one has neither, all of it is devoted to the recipes. With Ruby use, thanks in no part to the popularity of Rails, growing by leaps and bounds I'm sure this volume will be a well deserved bestseller. I give it four stars and recommend it to all but the most expert Ruby programmers. For beginners who, like me, appreciate hands on learning it is a must. (Review Data Last Updated: 2006-09-01 08:56:54 EST)
|
|||||||||||||||||||||||||||||
| 08-28-06 | 5 | (NA) |
| Reviewer | Permalink | ||||||||||||||||||||||||
|
One of the greatest challenges to Ruby development was the lack of coherent resource base that development teams can refer to. There are great resources online but these have been mostly snippets of information located in various places.
Ruby Cookbook follows the O'Reilly 'cookbook tradition and has good reference touch points to developers. This book help launch a Ruby project worked on by multiple teams in separate locations. Having a common reference point greatly aided in the delivery of the project. Ruby is fun to work with and with the Ruby Cookbook, it makes it easier to deliver on a project. (Review Data Last Updated: 2006-09-01 08:56:54 EST)
|
|||||||||||||||||||||||||||||
| 08-23-06 | 4 | 1\1 |
| Reviewer | Permalink | ||||||||||||||||||||||||
|
O'Reilly's `Ruby Cookbook' Review
I have read several O'Reilly programming books over the years and use many as reference guides still today. However, I have never had the opportunity to read one of their `Cookbook' programming books. I decided to read the newly released (July 2006) `Ruby Cookbook'. I had already read several more abstract Ruby books (Programming Ruby The Pragmatic Programmer's Guide 1st and 2nd editions) and had written a few programs in the language. I felt rather comfortable using ruby although idiomatic ruby does not come naturally to me yet and I thought now would be an ideal time to see what an O'Reilly Cookbook was really like. I wanted to see idiomatic ruby code written by people who know ruby. The `Ruby Cookbook' turned out to be the perfect choice. The book was large; 854 pages not including the index. I'm used to programming books being large as most of them have library references, examples on how to implement certain algorithms, etc. But, the `Ruby Cookbook' had none of that. It was 23 chapters of mostly practical ruby code that solved a specific problem or completed a certain task. Each chapter deals with a different topic that everyday IT workers and programmers might run into during the course of their day-to-day job. One could pick the book up and open it anywhere at random and see code... lots and lots of code. If you're a hands-on learner who prefers examples to abstractions and you want to learn more about ruby, then this book is ideal. I'd like to briefly explain what I enjoy about ruby. It's open source. There are no license or cost issues. It works well on Linux, Mac and Windows. It's very flexible... almost any part of the language can be extended or modified. Even constants can be changed albeit ruby will complain about this, as it's not good practice. And true to its Japanese heritage, ruby is not explicit. It conceals many details from the programmer. For example, when you use a code block while opening a file, like so: open(`some_file.txt') {|f| f.readlines} You don't have to manually close the file... ruby will close it automatically when that block finishes executing. Many programmers will find this disturbing... especially the older C gurus who have grown accustomed to allocating and de-allocating memory manually. However, sometimes it's enjoyable to use a language that seems to just magically do things right. Don't get me wrong, ruby is not the perfect programming language. It's just a language that draws upon lisp and smalltalk to bring a different perspective to problem solving and IMO it's a language worth knowing how to use. OK, back to the book review. Each chapter covers a specific topic such as `Code Blocks and Iteration (Chapter Seven)' or `Objects and Classes (Chapter Eight)' with several situations related to that topic. The situations are broken down into three parts: Problem, Solution and Discussion. The Problem portion is just a basic explanation of what you've been tasked to do or the problem at hand to be solved. The Solution stage covers ways in which you can complete the task or solve the problem. And finally, the Discussion stage offers more in-depth information that isn't required reading but will give you a better understanding of how ruby works and why it does things like it does. In general, the chapters are broad and short like this review. O'Reilly's `Ruby Cookbook' is not an in-depth review of ruby. However, topic coverage is adequate in conveying enough information to the reader to solve the described problems and to modify the presented code to cover similar problems should they arise. (Review Data Last Updated: 2006-08-29 00:45:38 EST)
|
|||||||||||||||||||||||||||||
| 08-23-06 | 4 | (NA) |
| Reviewer | Permalink | ||||||||||||||||||||||||
|
O'Reilly's `Ruby Cookbook' Review
I have read several O'Reilly programming books over the years and use many as reference guides still today. However, I have never had the opportunity to read one of their `Cookbook' programming books until my friend Marc Debonis told me about a program in which I could get a free O'Reilly book if I would write a short review after reading the book. I decided to read the newly released (July 2006) `Ruby Cookbook'. I had already read several more abstract Ruby books (Programming Ruby The Pragmatic Programmer's Guide 1st and 2nd editions) and had written a few programs in the language. I felt rather comfortable using ruby although idiomatic ruby does not come naturally to me yet and I thought now would be an ideal time to see what an O'Reilly Cookbook was really like. I wanted to see idiomatic ruby code written by people who know ruby. The `Ruby Cookbook' turned out to be the perfect choice. The book was large; 854 pages not including the index. I'm used to programming books being large as most of them have library references, examples on how to implement certain algorithms, etc. But, the `Ruby Cookbook' had none of that. It was 23 chapters of mostly practical ruby code that solved a specific problem or completed a certain task. Each chapter deals with a different topic that everyday IT workers and programmers might run into during the course of their day-to-day job. One could pick the book up and open it anywhere at random and see code... lots and lots of code. If you're a hands-on learner who prefers examples to abstractions and you want to learn more about ruby, then this book is ideal. I'd like to briefly explain what I enjoy about ruby. It's open source. There are no license or cost issues. It works well on Linux, Mac and Windows. It's very flexible... almost any part of the language can be extended or modified. Even constants can be changed albeit ruby will complain about this, as it's not good practice. And true to its Japanese heritage, ruby is not explicit. It conceals many details from the programmer. For example, when you use a code block while opening a file, like so: open(`some_file.txt') {|f| f.readlines} You don't have to manually close the file... ruby will close it automatically when that block finishes executing. Many programmers will find this disturbing... especially the older C gurus who have grown accustomed to allocating and de-allocating memory manually. However, sometimes it's enjoyable to use a language that seems to just magically do things right. Don't get me wrong, ruby is not the perfect programming language. It's just a language that draws upon lisp and smalltalk to bring a different perspective to problem solving and IMO it's a language worth knowing how to use. OK, back to the book review. Each chapter covers a specific topic such as `Code Blocks and Iteration (Chapter Seven)' or `Objects and Classes (Chapter Eight)' with several situations related to that topic. The situations are broken down into three parts: Problem, Solution and Discussion. The Problem portion is just a basic explanation of what you've been tasked to do or the problem at hand to be solved. The Solution stage covers ways in which you can complete the task or solve the problem. And finally, the Discussion stage offers more in-depth information that isn't required reading but will give you a better understanding of how ruby works and why it does things like it does. In general, the chapters are broad and short like this review. O'Reilly's `Ruby Cookbook' is not an in-depth review of ruby. However, topic coverage is adequate in conveying enough information to the reader to solve the described problems and to modify the presented code to cover similar problems should they arise. (Review Data Last Updated: 2006-08-23 11:17:28 EST)
|
|||||||||||||||||||||||||||||
| 08-11-06 | 4 | 3\3 |
| Reviewer | Permalink | ||||||||||||||||||||||||
|
Ok. Let's pretend you're a Java programmer, and you want to know what's the story about this Ruby language you've heard so much about. Or maybe, like me, you're a Smug Smalltalk Weenie and you want to check how the young cousin from the East is doing. Either way, you got your hands on a manual or on a tutorial, and now you're reasonably sure you have a good grasp of the language. But you still have to learn the slang, and _that_ is the difficult part.
But don't worry, here comes the Ruby Cookbook to the rescue. The book is a full, 850-pages behemoth full of Ruby tips and tricks, from string manipulation to database management, from reflection to multitasking. Presenting their tips in the usual O'Reilly cookbook format (problem/solution/discussion), the two authors cover almost all the topics of interest for both the beginner and the expert Ruby programmer. All in all, the Ruby Cookbook is like a dictionary that you should keep by your side when you're programming in Ruby. The only small con is the high number of typos, especially in the first part: nothing which stops you from understanding what the authors are saying, but finding a typo in almost every page of a chapter gets tiresome after a while. Anyway, you can't go wrong by buying this book. (Review Data Last Updated: 2006-08-23 11:17:28 EST)
|
|||||||||||||||||||||||||||||
| 08-03-06 | 5 | 4\4 |
| Reviewer | Permalink | ||||||||||||||||||||||||
|
I contributed a few recipies for this book (check out the web service and GUI sections for yours truely), so of course I'm a little biased...but I have to say that it's a great resource for anyone that does real work with Ruby (or in Ruby on Rails). I should also state that my contributions were very small, so I'm really not just endorsing it because I helped out.
It's got a little bit of everything in it from the basics of the Ruby language to the more advanced topics like meta-programming, network programming, and GUI development! Best of all, since it's a cookbook and not a documentation book, it solves real-world problems in an easy-to-use, easy-to-understand format. You don't have to waste your time reading the whole book (unless you want), you just find the problem you want to solve, and wha-la it's solved. I really do think it's a must have book. (Review Data Last Updated: 2006-08-11 08:29:21 EST)
|
|||||||||||||||||||||||||||||
| Reader Reviews 1 - 32 of 32 | |||||||||||||||||||||||||||||