• Complain

Collingbourne - The Book of Ruby

Here you can read online Collingbourne - The Book of Ruby full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2011, publisher: No Starch Press, 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.

No cover
  • Book:
    The Book of Ruby
  • Author:
  • Publisher:
    No Starch Press
  • Genre:
  • Year:
    2011
  • Rating:
    5 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 100
    • 1
    • 2
    • 3
    • 4
    • 5

The Book of Ruby: summary, description and annotation

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

Slice your way through the cruft of programming conventions and learn to blaze your own trail with The Book of Ruby. From methods to metaprogramming, youll gain the skills you need to master the worlds most fun programming language with this example-based, hands-on introduction.

Collingbourne: author's other books


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

The Book of Ruby — 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 "The Book of Ruby" 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
The Book of Ruby
Huw Collingbourne

Copyright 2011

All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher.

No Starch Press and the No Starch Press logo are registered trademarks of No Starch Press, Inc. The Book of is a trademark of No Starch Press, Inc. Other product and company names mentioned herein may be the trademarks of their respective owners. Rather than use a trademark symbol with every occurrence of a trademarked name, we are using the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark.

The information in this book is distributed on an As Is basis, without warranty. While every precaution has been taken in the preparation of this work, neither the author nor No Starch Press, Inc. shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in it.

No Starch Press

Acknowledgments

Id like to express my appreciation of all the hard work thats gone into the preparation of this book by the people at No Starch Press, especially Keith Fancher, Serena Yang, and Bill Pollock. Thanks also to the copyeditor, Kim Wimpsett, and to the technical reviewer, Pat Eyler. For keeping me on the right side of sanity, I owe a debt of gratitude to my two dogs, Beryl and Seven, and to their beautiful mother, Bethan, who, to my enormous sadness, died while I was writing this book.

Introduction
As you are now reading a book on Ruby I think it is safe to assume you dont - photo 1

As you are now reading a book on Ruby, I think it is safe to assume you dont need me to persuade you of the merits of the Ruby language. Instead, Ill take the somewhat unconventional step of starting with a warning: Many people are attracted to Ruby by its simple syntax and its ease of use. They are wrong. Rubys syntax may look simple at first sight, but the more you get to know the language, the more you will realize that it is, on the contrary, extremely complex. The plain fact of the matter is that Ruby has a number of pitfalls just waiting for unwary programmers to drop into.

In this book, it is my aim to guide you safely over the pitfalls and lead you through the choppy waters of Rubys syntax and class libraries. In the process, Ill be exploring both the smooth, well-paved highways and the gnarlier, bumpy little byways of Ruby. By the end of the journey, you should be able to use Ruby safely and effectively without getting caught by unexpected hazards along the way.

The Book of Ruby describes versions 1.8. x and 1.9. x of the Ruby language. In most respects, Ruby 1.8 and 1.9 are very similar, and most programs written for one version will run unmodified in the other. There are important exceptions to this rule, however, and these are noted in the text. Ruby 1.9 may be regarded as a stepping stone toward Ruby 2.0. At the time of writing, a release date for Ruby 2.0 has not been announced. Even so, on the basis of currently available information, I anticipate that most (or all) of the information on Ruby 1.9 in this book should also apply to Ruby 2.0.

What Is Ruby?

Ruby is a cross-platform interpreted language that has many features in common with other scripting languages such as Perl and Python. It has an easily readable type of syntax that looks somewhat Pascal-like at first sight. It is thoroughly object-oriented and has a good deal in common with the great-granddaddy of pure object-oriented languages, Smalltalk. It has been said that the languages that most influenced the development of Ruby were Perl, Smalltalk, Eiffel, Ada, and Lisp. The Ruby language was created by Yukihiro Matsumoto (commonly known as Matz), and it was first released in 1995.

What Is Rails?

Over the past few years, much of the excitement surrounding Ruby can be attributed to a web development framework called Railspopularly known as Ruby on Rails . Rails is an impressive framework, but it is not the be-all, end-all of Ruby. Indeed, if you were to leap right into Rails development without first mastering Ruby, you might find that you end up creating applications that you dont even understand. (This is all too common among Ruby on Rails novices.) Understanding Ruby is a necessary prerequisite for understanding Rails. Youll look at Rails in .

Matters of Ruby Style

Some Ruby programmers have very fixedor even obsessiveviews on what constitutes a Ruby style of programming. Some, for example, are passionately wedded to the idea that method_names_use_underscores while variableNamesDoNot. The style of naming in which separate words are indicated by capital letters likeThis is called camel case and that is the last time it will be mentioned in this book.

I have never understood why people get so worked up about naming conventions. You like underscores, I cant stand them; you say po_ta_toes, I say poTaToes. As far as I am concerned, the way in which you choose to write the names of identifiers in Ruby is of no interest to anyone but you or your programming colleagues.

That is not to say that I have no opinions on programming style. On the contrary, I have very strong opinions. In my view, good programming style has nothing to do with naming conventions and everything to do with good code structure and clarity. Language elements such as parentheses, for instance, are important. Parentheses clarify code and avoid ambiguity that, in a highly dynamic language such as Ruby, can mean the difference between a program that works as you expect and one that is full of surprises (also known as bugs ). For more on this, refer to the index entries on ambiguity and parentheses.

In more than two decades of programming, one thing I have learned through bitter experience is that the most important characteristics of well-written code are clarity and lack of ambiguity. Code that is easy to understand and easy to debug is also likely to be easier to maintain . If adopting certain naming conventions helps you achieve that goal, thats fine. If not, thats fine too. The Book of Ruby does not preach on matters of style.

How to Read This Book

The book is divided into bite-sized chunks. Each chapter introduces a theme that is subdivided into subtopics. Each programming topic is accompanied by one or more small, self-contained, ready-to-run Ruby programs.

If you want to follow a well-structured course, read each chapter in sequence. If you prefer a more hands-on approach, you can run the programs first and refer to the text when you need an explanation. If you already have some experience with Ruby, feel free to cherry-pick topics in any order you find useful. There are no monolithic applications in this book, so you dont have to worry you might lose the plot if you read the chapters out of order!

Digging Deeper

Every chapter, apart from the first one, includes a section called . This is where you will explore specific aspects of Ruby (including a few of those gnarly byways I mentioned a moment ago) in greater depth. In many cases, you could skip the Digging Deeper sections and still learn all the Ruby you will ever need. On the other hand, it is in these sections that you will often get closest to the inner workings of Ruby, so if you skip them, you are going to miss out on some pretty interesting stuff.

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «The Book of Ruby»

Look at similar books to The Book of Ruby. 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 «The Book of Ruby»

Discussion, reviews of the book The Book of Ruby 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.