学习Ruby(英文影印版)
基本信息
- 原书名: Learning Ruby
- 原出版社: O'Reilly Media, Inc.
- 作者: Michael Fitzgerald [作译者介绍]
- 丛书名: 东南大学出版社O'REILLY图书系列
- 出版社:东南大学出版社
- ISBN:9787564109639
- 上架时间:2007-11-13
- 出版日期:2007 年11月
- 开本:16开
- 页码:238
- 版次:1-1
- 所属分类:
计算机 > 软件与程序设计 > 综合 > 高级程序语言设计
内容简介回到顶部↑
正如您在开车的时候,并不需要知道关于汽车的一切;当您开始使用ruby进行编程的时候,也不需要立刻了解关于ruby的一切。无论对于ruby的新手还是老手,《学习ruby》都是一本即学即用的实用教材。它提供了非常多的ruby程序,并且解释了这些程序如何运行以及这样运行的原因。这些内容已经足以让您开始您的ruby之旅。
由于网络开发框架ruby on rails的流行和大受欢迎,ruby已经引起了很多java和php开发人员的兴趣。但除了rails之外,ruby还有其他广泛的用途,而学习这些用法的最好方法就是动手尝试编写代码。在本书中,几乎每一页都可以找到代码例子。您可以仿照或者改写这些例子,生成您自己的代码。 本书包含以下主题: * 介绍ruby最重要的功能特性 * 示例说明如何使用条件语句以及如何使用ruby字符串 * 涵盖正则表达式 * 解释如何使用ruby的操作符、有理数、算术表达式以及math模块的函数 * 详细介绍ruby数组和hash功能 * 讲解使用ruby进行文件处理 * 对ruby类和mixin模块的细节展开讨论,包括对面向对象编程的简要介绍 * 介绍xml处理、tk工具包、rubygems、反射机制(reflection)、rdoc、嵌入式ruby、元编程(metaprogramming)、异常处理等内容 * 让您掌握rails的基本知识,包括一个rails的简单教程
由于网络开发框架ruby on rails的流行和大受欢迎,ruby已经引起了很多java和php开发人员的兴趣。但除了rails之外,ruby还有其他广泛的用途,而学习这些用法的最好方法就是动手尝试编写代码。在本书中,几乎每一页都可以找到代码例子。您可以仿照或者改写这些例子,生成您自己的代码。 本书包含以下主题: * 介绍ruby最重要的功能特性 * 示例说明如何使用条件语句以及如何使用ruby字符串 * 涵盖正则表达式 * 解释如何使用ruby的操作符、有理数、算术表达式以及math模块的函数 * 详细介绍ruby数组和hash功能 * 讲解使用ruby进行文件处理 * 对ruby类和mixin模块的细节展开讨论,包括对面向对象编程的简要介绍 * 介绍xml处理、tk工具包、rubygems、反射机制(reflection)、rdoc、嵌入式ruby、元编程(metaprogramming)、异常处理等内容 * 让您掌握rails的基本知识,包括一个rails的简单教程
作译者回到顶部↑
本书提供作译者介绍
Michael Fitzgerald是一位有20多年经验的程序员和作者,他认为Ruby是到目前为止他最喜爱的编程语言。Michael还是《Learning XSLT》《XML hacks》《Ruby Pocket Reference》的作者,也是《XML Pocket Reference》的作者之一。以上提到的书籍均由O'Reilly出版。...
.. << 查看详细
.. << 查看详细
目录回到顶部↑
preface
1 ruby basics
2 a quick tour of ruby
3 conditional love
4 strings
5 math
6 arrays
7 hashes
8 working with files
9 classes
10 more fun with ruby
11 a short guide to ruby on rails
a ruby reference
b answers to review questions
glossary
index
1 ruby basics
2 a quick tour of ruby
3 conditional love
4 strings
5 math
6 arrays
7 hashes
8 working with files
9 classes
10 more fun with ruby
11 a short guide to ruby on rails
a ruby reference
b answers to review questions
glossary
index
前言回到顶部↑
Ruby has gotten a lot of attention since the appearance of Ruby on Rails, the web application framework written in Ruby. The attention is way past due. Ruby has been around as long as Java but enjoyed only limited attention outside of Japan until around 2000. In the last few years, Ruby’s popularity has steadily grown, and with good reason. .
Who Should Read This Book?
Generally, I figure two kinds of readers will buy this book: experienced programmers who want to learn Ruby, and new programmers who want to learn to program.
I have the interesting job of catering to both while trying not to tick off either. It’s a balancing act, and this is how I’ll handle it: I am going to address you as if you are already a competent programmer, but I’ll also provide plenty of help for beginners, mostly in the form of notes or sidebars. I’ll let you know when you can skip a section if you are already a heavy hitter.
If you’re a fairly experienced programmer, you might just want to read the code examples first, from the beginning of the book to the end, skimming the explanations surrounding the examples as needed. You should be able to see what’s going on fairly quickly just by keeping your eyes on the code. The code is laid out in a more or less logical fashion (to me at least), so you should be able to figure out Ruby in fairly short order. If you are new to programming, I have attempted to make your job a little easier by explaining things as I go along. How This Book Works Do you have to know everything about a car before you start driving? Did you have to know anything about fuel injection, combustion, or timing belts to drive? Of course not. ..
It’s the same with programming in a new language. I am going to show you lots of Ruby programs, many of them just one-liners, and then tell you how and why they work—just enough to get you rolling down the road. I take this approach because I believe we do most of our learning by observing, imitating, and playing. I plan to do a lot of that in this book.
You should know up front that this is a just-get-in-and-drive book. In other words, you can drive a car even if you don’t know whether its got six or eight cylinders. David Heinemeier Hansson, inventor of Ruby on Rails, said something I like: “People learn by changing a little thing, reloading, and seeing the change.” He’s right on.That’s my experience: over the years I have learned more by hacking code than by reading about it.
I also move as quickly as possible, not getting bogged down in the quicksand of details. The details will come in time, as they are needed; the main thing I want to give you now is forward movement and momentum.
If you just follow along with what I’m doing, running the programs and altering them to your taste, you’ll learn quickly. The more you run these programs, the more fluency you’ll develop, and before long, you’ll start thinking and even dreaming in Ruby. Then you’ll just take off on your own.
The latest stable version at the time I am writing this is 1.8.6. That’s the version I’ll be using. You can probably get along using an older version, but unless you have 1.8.6 or later installed, I can’t guarantee that all the programs in this book will work as advertised, though they most likely will. ...
Who Should Read This Book?
Generally, I figure two kinds of readers will buy this book: experienced programmers who want to learn Ruby, and new programmers who want to learn to program.
I have the interesting job of catering to both while trying not to tick off either. It’s a balancing act, and this is how I’ll handle it: I am going to address you as if you are already a competent programmer, but I’ll also provide plenty of help for beginners, mostly in the form of notes or sidebars. I’ll let you know when you can skip a section if you are already a heavy hitter.
If you’re a fairly experienced programmer, you might just want to read the code examples first, from the beginning of the book to the end, skimming the explanations surrounding the examples as needed. You should be able to see what’s going on fairly quickly just by keeping your eyes on the code. The code is laid out in a more or less logical fashion (to me at least), so you should be able to figure out Ruby in fairly short order. If you are new to programming, I have attempted to make your job a little easier by explaining things as I go along. How This Book Works Do you have to know everything about a car before you start driving? Did you have to know anything about fuel injection, combustion, or timing belts to drive? Of course not. ..
It’s the same with programming in a new language. I am going to show you lots of Ruby programs, many of them just one-liners, and then tell you how and why they work—just enough to get you rolling down the road. I take this approach because I believe we do most of our learning by observing, imitating, and playing. I plan to do a lot of that in this book.
You should know up front that this is a just-get-in-and-drive book. In other words, you can drive a car even if you don’t know whether its got six or eight cylinders. David Heinemeier Hansson, inventor of Ruby on Rails, said something I like: “People learn by changing a little thing, reloading, and seeing the change.” He’s right on.That’s my experience: over the years I have learned more by hacking code than by reading about it.
I also move as quickly as possible, not getting bogged down in the quicksand of details. The details will come in time, as they are needed; the main thing I want to give you now is forward movement and momentum.
If you just follow along with what I’m doing, running the programs and altering them to your taste, you’ll learn quickly. The more you run these programs, the more fluency you’ll develop, and before long, you’ll start thinking and even dreaming in Ruby. Then you’ll just take off on your own.
The latest stable version at the time I am writing this is 1.8.6. That’s the version I’ll be using. You can probably get along using an older version, but unless you have 1.8.6 or later installed, I can’t guarantee that all the programs in this book will work as advertised, though they most likely will. ...


点击看大图



加载中...
