<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>RUBY中文化计划</title><link>http://blog.donews.com/sequh/</link><description>主力站点：http://www.moer.net/ruby</description><dc:language>zh-CHS</dc:language><generator>.Text Version 1.0.1.0</generator><item><dc:creator>夏克</dc:creator><title>Ruby程序设计：6、容器，代码块，迭代器</title><link>http://blog.donews.com/sequh/archive/2005/06/16/433099.aspx</link><pubDate>Thu, 16 Jun 2005 15:03:00 GMT</pubDate><guid>http://blog.donews.com/sequh/archive/2005/06/16/433099.aspx</guid><wfw:comment>http://blog.donews.com/sequh/comments/433099.aspx</wfw:comment><comments>http://blog.donews.com/sequh/archive/2005/06/16/433099.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.donews.com/sequh/comments/commentRss/433099.aspx</wfw:commentRss><trackback:ping>http://tb.donews.net/TrackBack.aspx?PostId=433099</trackback:ping><description>一个只有一首歌曲的点唱机很少见（除非在非常非常特殊的场合），所以不久我们就开始考虑制作一个歌单和播放列表。它们两个都是容器：用来保存对一个或者多个对象的引用的对象。

歌单和播放列表有一些相似的方法：添加一首歌、删除一首歌，返回一个歌曲列表等等。播放列表还应该增加一些其它的功能，比如每次播放时插入广告，记录累计播放时间等。不过我们先不去考虑这些问题，现在最好先创建一个通用的SongList类供歌单和播放列表使用。
&lt;img src ="http://blog.donews.com/sequh/aggbug/433099.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>夏克</dc:creator><title>Ruby程序设计：5、类，对象，变量</title><link>http://blog.donews.com/sequh/archive/2005/06/16/433097.aspx</link><pubDate>Thu, 16 Jun 2005 15:02:00 GMT</pubDate><guid>http://blog.donews.com/sequh/archive/2005/06/16/433097.aspx</guid><wfw:comment>http://blog.donews.com/sequh/comments/433097.aspx</wfw:comment><comments>http://blog.donews.com/sequh/archive/2005/06/16/433097.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.donews.com/sequh/comments/commentRss/433097.aspx</wfw:commentRss><trackback:ping>http://tb.donews.net/TrackBack.aspx?PostId=433097</trackback:ping><description>从目前为止我们所举的例子来看，也许你会对我们之前宣称的Ruby是一种面向对象语言感到迷惑。好，这章我们就来证实它。我们将讨论一下如何在Ruby中创建类和对象，以及Ruby比其它面向对象语言更强大的某些方面，同时我们还要实现我们下一个数万美元的产品----网络爵士和蓝草自动唱片点唱机。

几个月的工作后，我们的研发人员觉得我们的点唱机需要歌曲（songs）。所以用Ruby创建一个类来表示歌曲看起来是个不错的主意。我们知道一首真正的歌有名字（name），作者(artist)，和演奏时间（duration）,所以在我们的程序中创建的类要和这个类似。

我们将从创建一个最基本的Song类开始[就像我们在第九页提及的那样，类名要用一个大写字母起始，而方法名用小写字母开头]，它将包含一个简单的方法initialize
&lt;img src ="http://blog.donews.com/sequh/aggbug/433097.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>夏克</dc:creator><title>Ruby程序设计：4、Ruby的新特性</title><link>http://blog.donews.com/sequh/archive/2005/06/16/433096.aspx</link><pubDate>Thu, 16 Jun 2005 15:00:00 GMT</pubDate><guid>http://blog.donews.com/sequh/archive/2005/06/16/433096.aspx</guid><wfw:comment>http://blog.donews.com/sequh/comments/433096.aspx</wfw:comment><comments>http://blog.donews.com/sequh/archive/2005/06/16/433096.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.donews.com/sequh/comments/commentRss/433096.aspx</wfw:commentRss><trackback:ping>http://tb.donews.net/TrackBack.aspx?PostId=433096</trackback:ping><description>刚开始写这本书的时候，我们有一个宏伟的计划（那时我们还年轻），我们希望从头到尾地给出这门语言的文档，从类和对象开始，到语法细节的深入研讨。那时候，这看上去是一个好主意，毕竟，Ruby中的任何东西都是对象，所以从对象开始似乎更有意义。

我们大概就是这样想的。

不幸的是，用这种方式来描述一门语言是很困难的。如果你不介绍字符串、if语句、赋值和其它的细节，很难写出有关类的例子，贯穿我们的从头至尾的描述，我们要附加一些我们所需的低级的细节才能使我们的例子代码有意义。

所以，我们提出了另一个宏伟计划（他们为什么叫我们pragmatic而不是别的），我们仍然从头描述Ruby，但是在此之前，我们加入一篇短章来描述例子中使用到的所有共同的语言特性，连同在Ruby中使用到的特殊词汇，这就像是一个迷你教程，引导我们走进后面的内容。&lt;img src ="http://blog.donews.com/sequh/aggbug/433096.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>夏克</dc:creator><title>Ruby程序设计：3、路标</title><link>http://blog.donews.com/sequh/archive/2005/06/16/433095.aspx</link><pubDate>Thu, 16 Jun 2005 14:58:00 GMT</pubDate><guid>http://blog.donews.com/sequh/archive/2005/06/16/433095.aspx</guid><wfw:comment>http://blog.donews.com/sequh/comments/433095.aspx</wfw:comment><comments>http://blog.donews.com/sequh/archive/2005/06/16/433095.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.donews.com/sequh/comments/commentRss/433095.aspx</wfw:commentRss><trackback:ping>http://tb.donews.net/TrackBack.aspx?PostId=433095</trackback:ping><description>本书主要的内容可以分成四部分，它们相对独立，揭示了Ruby语言的各个不同方面。

第一部分是Ruby概述，你会看到这是一个Ruby指南。它用一个小章节来开始，介绍了一些Ruby独特的术语和概念。这一章也大致介绍了其它章要用到的基本语法。这个指南剩下的部分是对这门语言从头到脚的一番审视，这里我们会谈到类和对象、类型、表达式和等等其它方面，我们还用了一个简短的章节来教你怎样应付你所遇到的麻烦。&lt;img src ="http://blog.donews.com/sequh/aggbug/433095.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>夏克</dc:creator><title>Ruby程序设计：2、序</title><link>http://blog.donews.com/sequh/archive/2005/06/16/433091.aspx</link><pubDate>Thu, 16 Jun 2005 14:55:00 GMT</pubDate><guid>http://blog.donews.com/sequh/archive/2005/06/16/433091.aspx</guid><wfw:comment>http://blog.donews.com/sequh/comments/433091.aspx</wfw:comment><comments>http://blog.donews.com/sequh/archive/2005/06/16/433091.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.donews.com/sequh/comments/commentRss/433091.aspx</wfw:commentRss><trackback:ping>http://tb.donews.net/TrackBack.aspx?PostId=433091</trackback:ping><description>这是一本关于Ruby程序设计的教程和参考书，使用Ruby你可以写出优良而高效的代码，并且充满乐趣。

夸张吗，但如果你读完这本书，我们相信你会同意的，我们的经验告诉我们这是真的。

编写Pragmatic Programmers系列的时候，我们尝试了很多的语言以期找到使我们的生活更加简易，使我们的工作更加出色的工具，但我们一次次被这些语言所挫败。

我们的目的是解决问题，而不是调试编译器，我们喜欢那些适合于我们的动态语言，没有强制的规则，我们需要通过代码就可以清楚地交流，我们看重在代码中精确有效地表述一个需求的简便能力，我们写的代码越少，出的错就越少。（并且我们的手腕和手指也会为此感到庆幸）&lt;img src ="http://blog.donews.com/sequh/aggbug/433091.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>夏克</dc:creator><title>Ruby程序设计：1、前言</title><link>http://blog.donews.com/sequh/archive/2005/06/16/433080.aspx</link><pubDate>Thu, 16 Jun 2005 14:45:00 GMT</pubDate><guid>http://blog.donews.com/sequh/archive/2005/06/16/433080.aspx</guid><wfw:comment>http://blog.donews.com/sequh/comments/433080.aspx</wfw:comment><comments>http://blog.donews.com/sequh/archive/2005/06/16/433080.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.donews.com/sequh/comments/commentRss/433080.aspx</wfw:commentRss><trackback:ping>http://tb.donews.net/TrackBack.aspx?PostId=433080</trackback:ping><description>人类都有创作的冲动，我自己就很喜欢创作一些东西。如果我没法学好画画唱歌，那至少我还可以写一写程序。在我接触到计算机没多久，我就深深地爱上了程序语言。我觉得只要经验丰富，编写一个完美的程序语言应该是不成问题的，而且我自己就要去编写它呢。但是，慢慢地我知道了，想要设计出那种理想中的完美语言要比我想象的难的多。尽管如此，退而求其次，我依旧希望设计出一套能够满足自己日常大部分工作需要的语言。这是我学生时代的梦想。几年以后我和同事们讨论脚本语言时，感叹它们的强大和实用。作为一个有着15年以上资历的面向对象爱好者，我觉得面向对象也非常适合于脚本设计。于是我在网上游历了一番，发现了Perl和Python，但它们并不十分让我满意，我心中的语言应该比Perl更强大，比Python更面向对象。&lt;img src ="http://blog.donews.com/sequh/aggbug/433080.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>夏克</dc:creator><title>[RUBY问题集]开张</title><link>http://blog.donews.com/sequh/archive/2005/05/29/403964.aspx</link><pubDate>Sun, 29 May 2005 18:25:00 GMT</pubDate><guid>http://blog.donews.com/sequh/archive/2005/05/29/403964.aspx</guid><wfw:comment>http://blog.donews.com/sequh/comments/403964.aspx</wfw:comment><comments>http://blog.donews.com/sequh/archive/2005/05/29/403964.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.donews.com/sequh/comments/commentRss/403964.aspx</wfw:commentRss><trackback:ping>http://tb.donews.net/TrackBack.aspx?PostId=403964</trackback:ping><description>[RUBY问题集]开张&lt;img src ="http://blog.donews.com/sequh/aggbug/403964.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>夏克</dc:creator><title>Ruby中文化计划拟迁移为：http://www.moer.net/ruby</title><link>http://blog.donews.com/sequh/archive/2005/04/21/345384.aspx</link><pubDate>Thu, 21 Apr 2005 21:35:00 GMT</pubDate><guid>http://blog.donews.com/sequh/archive/2005/04/21/345384.aspx</guid><wfw:comment>http://blog.donews.com/sequh/comments/345384.aspx</wfw:comment><comments>http://blog.donews.com/sequh/archive/2005/04/21/345384.aspx#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://blog.donews.com/sequh/comments/commentRss/345384.aspx</wfw:commentRss><trackback:ping>http://tb.donews.net/TrackBack.aspx?PostId=345384</trackback:ping><description>&lt;img src ="http://blog.donews.com/sequh/aggbug/345384.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>夏克</dc:creator><title>RUBY作者写的书：Ruby in a Nutshell</title><link>http://blog.donews.com/sequh/archive/2004/10/08/123400.aspx</link><pubDate>Fri, 08 Oct 2004 15:05:00 GMT</pubDate><guid>http://blog.donews.com/sequh/archive/2004/10/08/123400.aspx</guid><wfw:comment>http://blog.donews.com/sequh/comments/123400.aspx</wfw:comment><comments>http://blog.donews.com/sequh/archive/2004/10/08/123400.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.donews.com/sequh/comments/commentRss/123400.aspx</wfw:commentRss><trackback:ping>http://tb.donews.net/TrackBack.aspx?PostId=123400</trackback:ping><description>&lt;img src ="http://blog.donews.com/sequh/aggbug/123400.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>夏克</dc:creator><title>Ruby 编程语言中的 XML 处理</title><link>http://blog.donews.com/sequh/archive/2004/09/22/106647.aspx</link><pubDate>Wed, 22 Sep 2004 17:42:00 GMT</pubDate><guid>http://blog.donews.com/sequh/archive/2004/09/22/106647.aspx</guid><wfw:comment>http://blog.donews.com/sequh/comments/106647.aspx</wfw:comment><comments>http://blog.donews.com/sequh/archive/2004/09/22/106647.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.donews.com/sequh/comments/commentRss/106647.aspx</wfw:commentRss><trackback:ping>http://tb.donews.net/TrackBack.aspx?PostId=106647</trackback:ping><description>&lt;img src ="http://blog.donews.com/sequh/aggbug/106647.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>夏克</dc:creator><title>Ruby的哲学--与Yukihiro Matsumoto的对话</title><link>http://blog.donews.com/sequh/archive/2004/09/22/106056.aspx</link><pubDate>Wed, 22 Sep 2004 09:47:00 GMT</pubDate><guid>http://blog.donews.com/sequh/archive/2004/09/22/106056.aspx</guid><wfw:comment>http://blog.donews.com/sequh/comments/106056.aspx</wfw:comment><comments>http://blog.donews.com/sequh/archive/2004/09/22/106056.aspx#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://blog.donews.com/sequh/comments/commentRss/106056.aspx</wfw:commentRss><trackback:ping>http://tb.donews.net/TrackBack.aspx?PostId=106056</trackback:ping><description>&lt;img src ="http://blog.donews.com/sequh/aggbug/106056.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>夏克</dc:creator><title>用 Ruby 语言编程</title><link>http://blog.donews.com/sequh/archive/2004/09/18/102095.aspx</link><pubDate>Sat, 18 Sep 2004 03:43:00 GMT</pubDate><guid>http://blog.donews.com/sequh/archive/2004/09/18/102095.aspx</guid><wfw:comment>http://blog.donews.com/sequh/comments/102095.aspx</wfw:comment><comments>http://blog.donews.com/sequh/archive/2004/09/18/102095.aspx#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://blog.donews.com/sequh/comments/commentRss/102095.aspx</wfw:commentRss><trackback:ping>http://tb.donews.net/TrackBack.aspx?PostId=102095</trackback:ping><description>&lt;img src ="http://blog.donews.com/sequh/aggbug/102095.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>夏克</dc:creator><title>把文件打印在纸上</title><link>http://blog.donews.com/sequh/archive/2004/09/15/99490.aspx</link><pubDate>Wed, 15 Sep 2004 15:24:00 GMT</pubDate><guid>http://blog.donews.com/sequh/archive/2004/09/15/99490.aspx</guid><wfw:comment>http://blog.donews.com/sequh/comments/99490.aspx</wfw:comment><comments>http://blog.donews.com/sequh/archive/2004/09/15/99490.aspx#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://blog.donews.com/sequh/comments/commentRss/99490.aspx</wfw:commentRss><trackback:ping>http://tb.donews.net/TrackBack.aspx?PostId=99490</trackback:ping><description>刚才忽然想到这样一个概念，可以把所有的文件都转变为文本文件。如果可能的话，我们甚至可以把任何文件打印在纸上带走，包括可执行文件。&lt;img src ="http://blog.donews.com/sequh/aggbug/99490.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>夏克</dc:creator><title>Ruby的一篇简单的入门文章</title><link>http://blog.donews.com/sequh/archive/2004/09/15/99196.aspx</link><pubDate>Wed, 15 Sep 2004 10:20:00 GMT</pubDate><guid>http://blog.donews.com/sequh/archive/2004/09/15/99196.aspx</guid><wfw:comment>http://blog.donews.com/sequh/comments/99196.aspx</wfw:comment><comments>http://blog.donews.com/sequh/archive/2004/09/15/99196.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blog.donews.com/sequh/comments/commentRss/99196.aspx</wfw:commentRss><trackback:ping>http://tb.donews.net/TrackBack.aspx?PostId=99196</trackback:ping><description>&lt;img src ="http://blog.donews.com/sequh/aggbug/99196.aspx" width = "1" height = "1" /&gt;</description></item></channel></rss>