13 May 2015

Learn Ruby

The Koans walk you along the path to enlightenment in order to learn Ruby. The goal is to learn the Ruby language, syntax, structure, and some common functions and libraries. We also teach you culture. Testing is not just something we pay lip service to, but something we live. It is essential in your quest to learn and do great things in the language.

Koans以一种顺序渐进的方式来学习Ruby。 其目标是学习Ruby语言,语法,结构以及其他共用的函数和库。这也传授了文化,即测试不知仅仅放在口头上的,而是真是的生存在其中。这也是在语言中,所必须学习和探索中的事情。

The Structure

The koans are broken out into areas by file, hashes are covered in about_hashes.rb, modules are introduced in about_modules.rb, etc. They are presented in order in the path_to_enlightenment.rb file.

koans以文件作为划分区域,哈希在about_hashes.rb中,模块在about_modules.rb,等等。他们均以path_to_enlightenment.rb中的顺序呈现。

Each koan builds up your knowledge of Ruby and builds upon itself. It will stop at the first place you need to correct.

每个koan都是单独的,利用自身用来构建相关知识,并在需要纠正的地方停下来。

Some koans simply need to have the correct answer substituted for an incorrect one. Some, however, require you to supply your own answer. If you see the method __ (a double underscore) listed, it is a hint to you to supply your own code in order to make it work correctly.

__方法就是填空题的空格。

Installing Ruby

没啥好说的。

The Path to Enlightenment

通过调用path_to_enlightenment.rb运行测试,即在终端中输入ruby path_to_enlightenment.rb

总的体验来说,测试驱动学习还是很有趣了的。

Inspiration

A special thanks to Mike Clark and Ara Howard for inspiring this project. Mike Clark wrote an excellent blog post about learning Ruby through unit testing. This sparked an idea that has taken a bit to solidify, that of bringing new rubyists into the community through testing. Ara Howard then gave us the idea for the Koans in his ruby quiz entry on Meta Koans (a must for any rubyist wanting to improve their skills). Also, “The Little Lisper” taught us all the value of the short questions/simple answers style of learning.

通过单元测试,引导新人进入Ruby社区。以及简短的问题和简单回答的学习方法。

##




傲娇的使用Disqus