• Complain

Lucas Carlson - Ruby Cookbook

Here you can read online Lucas Carlson - Ruby Cookbook full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2015, publisher: OReilly Media, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Lucas Carlson Ruby Cookbook

Ruby Cookbook: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Ruby Cookbook" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Why spend time on coding problems that others have already solved when you could be making real progress on your Ruby project? This updated cookbook provides more than 350 recipes for solving common problems, on topics ranging from basic data structures, classes, and objects, to web development, distributed programming, and multithreading.

Revised for Ruby 2.1, each recipe includes a discussion on why and how the solution works. Youll find recipes suitable for all skill levels, from Ruby newbies to experts who need an occasional reference. With Ruby Cookbook, youll not only save time, but keep your brain percolating with new ideas as well.

Recipes cover:

  • Data structures including strings, numbers, date and time, arrays, hashes, files and directories
  • Using Rubys code blocks, also known as closures
  • OOP features such as classes, methods, objects, and modules
  • XML and HTML, databases and persistence, and graphics and other formats
  • Web development with Rails and Sinatra
  • Internet services, web services, and distributed programming
  • Software testing, debugging, packaging, and distributing
  • Multitasking, multithreading, and extending Ruby with other languages

Lucas Carlson: author's other books


Who wrote Ruby Cookbook? Find out the surname, the name of the author of the book and a list of all author's works by series.

Ruby Cookbook — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Ruby Cookbook" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Ruby Cookbook

by Lucas Carlson and Leonard Richardson

Copyright 2015 Lucas Carlson and Leonard Richardson. All rights reserved.

Printed in the United States of America.

Published by OReilly Media, Inc. , 1005 Gravenstein Highway North, Sebastopol, CA 95472.

OReilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://safaribooksonline.com). For more information, contact our corporate/institutional sales department: 800-998-9938 or corporate@oreilly.com .

  • Editors: Brian Anderson and Allyson MacDonald
  • Production Editor: Matthew Hacker
  • Proofreader: Rachel Monaghan
  • Indexer: Angela Howard
  • Interior Designer: David Futato
  • Cover Designer: Ellie Volckhausen
  • Illustrator: Rebecca Demarest
  • July 2006: First Edition
  • March 2015: Second Edition
Revision History for the Second Edition
  • 2015-03-10: First Release

See http://oreilly.com/catalog/errata.csp?isbn=9781449373719 for release details.

The OReilly logo is a registered trademark of OReilly Media, Inc. Ruby Cookbook, the cover image of a side-striped jackal, and related trade dress are trademarks of OReilly Media, Inc.

While the publisher and the authors have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the authors disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work. Use of the information and instructions contained in this work is at your own risk. If any code samples or other technology this work contains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights.

978-1-449-37371-9

[M]

For Yoscelina, my muse and inspiration for everything great I have ever accomplished.

For Hugh and Valentina, the most incredible miracles ever.

For Tess, who sat by me the whole time.

Lucas Carlson

For Sumana.

Leonard Richardson

Preface
Life Is Short

This is a book of recipes: solutions to common problems, copy-and-paste code snippets, explanations, examples, and short tutorials.

This book is meant to save you time. Time, as they say, is money, but a span of time is also a piece of your life. Our lives are better spent creating new things than fighting our own errors, or trying to solve problems that have already been solved. We present this book in the hope that the time it saves, distributed across all its readers, will greatly outweigh the time we spent creating it.

The Ruby programming language is itself a wonderful time-saving tool. It makes you more productive than other programming languages because you spend more time making the computer do what you want, and less wrestling with the language. But there are many ways for a Ruby programmer to spend time without accomplishing anything, and weve encountered them all:

  • Time spent writing Ruby implementations of common algorithms.

  • Time spent debugging Ruby implementations of common algorithms.

  • Time spent discovering and working around Ruby-specific pitfalls.

  • Time spent on repetitive tasks (including repetitive programming tasks!) that could be automated.

  • Time spent duplicating work that someone else has already made publicly available .

  • Time spent searching for a library that does x.

  • Time spent evaluating and deciding between the many libraries that do x.

  • Time spent learning how to use a library because of poor or outdated documentation .

  • Time lost staying away from a useful technology because it seems intimidating.

We, and the many contributors to this book, recall vividly our own wasted hours and days. Weve distilled our experiences into this book so that you dont waste your timeor at least so you waste it enjoyably on more interesting problems.

Our other goal is to expand your interests. If you come to this book wanting to generate algorithmic music with Ruby then, yes, will save you time over starting from scratch. Its more likely that youd never considered the possibility until now. Every recipe in this book was developed and written with these two goals in mind: to save you time, and to keep your brain active with new ideas.

Audience

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 isnt a Ruby tutorial (see below for some real tutorials), but if youre already familiar with a few other programming languages, you should be able to pick up Ruby by reading through the first 10 chapters of this book and typing in the code listings as you go.

Weve included recipes suitable for all skill levels, from those who are just starting out with Ruby, to experts who need an occasional reference. We focus mainly on generic programming techniques, but we also cover specific application frameworks (like Ruby on Rails and GUI libraries) and best practices (like unit testing).

Even if you just plan to use this book as a reference, we recommend that you skim through it once to get a picture of the problems we solve. This is a big book, but it doesnt solve every problem. If you pick it up and you cant find a solution to your problem, or one that nudges you in the right direction, then youve lost time.

If you skim through this book once beforehand, youll get a fair idea of the problems we cover in this book, and youll get a better hit rate. Youll know when this book can help you, and when you should consult other books, do a web search, ask a friend, or get help some other way.

The Structure of This Book

Each of this books chapters focuses on a kind of programming or a particular data type. This overview of the chapters should give you a picture of how we divided up the recipes. Each chapter also has its own, somewhat lengthier introduction, which gives a more detailed view of its recipes. At the very least, we recommend you skim the chapter introductions and the table of contents.

A brand new chapter covers what has changed since Ruby 1.8 when the first version of this book was released:

  • , covers what is new in Ruby 2.1.

The next six chapters cover Rubys built-in data structures:

  • by Jeffrey Friedl (OReilly).

  • ).

  • , covers Rubys 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.

  • .

  • , covers the hash, Rubys other basic compound data type. Hashes make it easy to associate objects with names and find them later (hashes are sometimes called lookup tables or dictionaries, two telling names). Its easy to use hashes along with arrays to build deep and complex data structures.

  • .

The first six chapters deal with specific algorithmic problems. The next four are more abstract: theyre about Ruby idiom and philosophy. If you cant get the Ruby language itself to do what you want, or youre having trouble writing Ruby code that looks the way Ruby should look, the recipes in these chapters may help:

  • , contains recipes that explore the possibilities of Rubys code blocks (also known as

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Ruby Cookbook»

Look at similar books to Ruby Cookbook. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Ruby Cookbook»

Discussion, reviews of the book Ruby Cookbook and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.