Ruby Cookbook (Cookbooks (O'Reilly))

Ruby Cookbook (Cookbooks (O'Reilly))
by Leonard Richardson, Lucas Carlson

Ruby Cookbook (Cookbooks (O'Reilly))
List Price: $49.99
Our Price: $28.52
You Save: $21.47 (43%)
Availability: Usually ships in 1-2 business days
Buy Used: from $11.70 (click here)
Category: Book
See more book details and other editions


or

Book Summary Information

Author: Leonard Richardson, Lucas Carlson
Edition: Paperback
Audio: English (Unknown); English (Original Language); English (Published)
Published: 2006-07-26
ISBN: 0596523696
Number of pages: 912
Publisher: O'Reilly Media
Product features:
  • ISBN13: 9780596523695
  • Condition: New
  • Notes: BRAND NEW FROM PUBLISHER! 100% Satisfaction Guarantee. Tracking provided on most orders. Buy with Confidence! Millions of books sold!

Book Reviews of Ruby Cookbook (Cookbooks (O'Reilly))

Book Review: Great collection of Ruby recipes and techniques
Summary: 5 Stars

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.

Summary of Ruby Cookbook (Cookbooks (O'Reilly))

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:

  • Strings and numbers
  • Arrays and hashes
  • Classes, modules, and namespaces
  • Reflection and metaprogramming
  • XML and HTML processing
  • Ruby on Rails (including Ajax integration)
  • Databases
  • Graphics
  • Internet services like email, SSH, and BitTorrent
  • Web services
  • Multitasking
  • Graphical and terminal interfaces

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.

Internet Books

Book Subjects
Most talked about in Internet Books
PHP and MySQL by Example ImagePHP and MySQL by Example
by Ellie Quigley, Marko Gargenta
Prentice Hall; Published: 2006-12-02; Paperback; Book
Best price: $25.99
Price in other shops: $54.99
Navigate the Net: A Comprehensive Learning Experience for Travel Professionals ImageNavigate the Net: A Comprehensive Learning Experience for Travel Professionals
by Shelly M. Houser
Prentice Hall; Published: 2002-05-24; Paperback; Book
Best price: $12.50
Price in other shops: $61.60
Elijah Lovejoy's ASP Training Course (Complete Video Course) ImageElijah Lovejoy's ASP Training Course (Complete Video Course)
by Elijah Lovejoy
Prentice Hall PTR; Published: 2001-12-18; Hardcover; Book
Best price: $66.49
Price in other shops: $69.99
Weaving a Website: Programming in HTML, Java Script, Perl and Java ImageWeaving a Website: Programming in HTML, Java Script, Perl and Java
by Susan Anderson-Freed
Prentice Hall; Published: 2001-08-16; Paperback; Book
Best price: $19.93
Price in other shops: $110.00
Online Resource Guide for Law Enforcement ImageOnline Resource Guide for Law Enforcement
by Timothy M. Dees
Prentice Hall; Published: 2001-06-30; Paperback; Book
Best price: $1.99
Price in other shops: $44.80
Core Servlets and Javaserver Pages: Core Technologies, Vol. 1 (2nd Edition) ImageCore Servlets and Javaserver Pages: Core Technologies, Vol. 1 (2nd Edition)
by Marty Hall, Larry Brown
Prentice Hall; Published: 2003-09-05; Paperback; Book
Best price: $27.75
Price in other shops: $64.99
Publish it on the Web! Windows, Second Edition ImagePublish it on the Web! Windows, Second Edition
by Bryan Pfaffenberger
Academic Press; Published: 1997-08-13; Paperback; Book
Best price: $9.00
Price in other shops: $37.95
Big Book of FYI RFCs (Big Books) ImageBig Book of FYI RFCs (Big Books)
Morgan Kaufmann; Published: 2000-08-15; Paperback; Book
Best price: $8.50
Price in other shops: $34.95
HITTESDORF CORBA/IIOP CLEARLY EXPLAINED (Clearly Explained) ImageHITTESDORF CORBA/ IIOP CLEARLY EXPLAINED (Clearly Explained)
by Michael Hittesdorf
AP Professional; Published: 2000-03-01; Paperback; Book
The Internet Outdoor Family Fun Yellow Pages: The Online Guide to the Best Outdoor Family Sites ImageThe Internet Outdoor Family Fun Yellow Pages: The Online Guide to the Best Outdoor Family Sites
by Jack Sanders
International Marine Publishing; Published: 1999-05-25; Paperback; Book
Best price: $15.56
Price in other shops: $19.95
Similar Books and other products
Rails 3 Way, The (2nd Edition) (Addison-Wesley Professional Ruby Series) ImageRails 3 Way, The (2nd Edition) (Addison-Wesley Professional Ruby Series)
by Obie Fernandez
Addison-Wesley Professional; Published: 2010-12-20; Paperback; Book
Best price: $25.00
Price in other shops: $49.99
Agile Web Development with Rails (Pragmatic Programmers) ImageAgile Web Development with Rails (Pragmatic Programmers)
by Sam Ruby, Dave Thomas, David Heinemeier Hansson
Pragmatic Bookshelf; Published: 2011-03-31; Paperback; Book
Best price: $24.46
Price in other shops: $43.95
Rails Cookbook (Cookbooks (O'Reilly)) ImageRails Cookbook (Cookbooks (O'Reilly))
by Rob Orsini
O'Reilly Media; Published: 2007-01-16; Paperback; Book
Best price: $13.30
Price in other shops: $39.99
Metaprogramming Ruby: Program Like the Ruby Pros ImageMetaprogramming Ruby: Program Like the Ruby Pros
by Paolo Perrotta
Pragmatic Bookshelf; Published: 2010-02-22; Paperback; Book
Best price: $18.12
Price in other shops: $32.95
Learning Ruby ImageLearning Ruby
by Michael James Fitzgerald
O'Reilly Media; Published: 2007-05-21; Paperback; Book
Best price: $19.94
Price in other shops: $34.99
Ruby Best Practices ImageRuby Best Practices
by Gregory T Brown
O'Reilly Media; Published: 2009-06-23; Paperback; Book
Best price: $8.38
Price in other shops: $34.99
Programming Ruby 1.9: The Pragmatic Programmers' Guide (Facets of Ruby) ImageProgramming Ruby 1.9: The Pragmatic Programmers' Guide (Facets of Ruby)
by Dave Thomas, Chad Fowler, Andy Hunt
Pragmatic Bookshelf; Published: 2009-04-28; Paperback; Book
Best price: $28.73
Price in other shops: $49.95
Eloquent Ruby (Addison-Wesley Professional Ruby Series) ImageEloquent Ruby (Addison-Wesley Professional Ruby Series)
by Russ Olsen
Addison-Wesley Professional; Published: 2011-02-21; Paperback; Book
Best price: $28.57
Price in other shops: $44.99
Ruby on Rails 3 Tutorial: Learn Rails by Example (Addison-Wesley Professional Ruby Series) ImageRuby on Rails 3 Tutorial: Learn Rails by Example (Addison-Wesley Professional Ruby Series)
by Michael Hartl
Addison-Wesley Professional; Published: 2010-12-26; Paperback; Book
Best price: $20.89
Price in other shops: $39.99
The Ruby Programming Language ImageThe Ruby Programming Language
by David Flanagan, Yukihiro Matsumoto
O'Reilly Media; Published: 2008-02-01; Paperback; Book
Best price: $22.55
Price in other shops: $39.99