在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:sathish316/metaprogramming_koans开源软件地址:https://github.com/sathish316/metaprogramming_koans开源编程语言:Ruby 100.0%开源软件介绍:¶ ↑Ruby Metaprogramming KoansRuby Metaprogramming Koans walk you along the path to enlightenment in order to learn Metaprogramming in Ruby. It is inspired by the original Ruby koans (rubykoans.com) by Jim Weirich which can be forked here: github.com/edgecase/ruby_koans Koans teach you a programming language using Tests/TDD. Metaprogramming koans attempts to teach Ruby metaprogramming using the same philosophy of koans used for programming languages. ¶ ↑Metaprogramming examplesThe metaprogramming examples used in the koans are derived from the following sources:
yehudakatz.com/2009/11/15/metaprogramming-in-ruby-its-all-about-the-self/
pragprog.com/screencasts/v-dtrubyom/the-ruby-object-model-and-metaprogramming The koans are a starting point and only supplement the above articles/books/videos. Please use the original source for more enlightenment. ¶ ↑The StructureThe koans are broken out into areas by file, metaclasses are covered in about_metaclasses.rb, define_method is covered in about_define_method.rb, etc. They are presented in order in the path_to_enlightenment.rb file. Each koan builds up your knowledge of Ruby metaprogramming and builds upon itself. Koans will have __ or _ which you need to fill in with the correct answer to progress. ¶ ↑Installing RubyThe koans require Ruby 1.9.2. To install Ruby:
$ rvm install ruby-1.9.2 All the koans are in Test::Unit and don't require additional gems ¶ ↑The Path To EnlightenmentTo start working your way through the koans, run rake metaprogramming_koans$ rake To run a specific koan, run it with ruby: metaprogramming_koans$ ruby about_metaclasses.rb Follow the instructions and keep filling the answers to start your journey towards mastering metaprogramming in Ruby ¶ ↑InspirationThe Little Schemer (www.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/0262560992) by Daniel Friedman is one of my all time favorite programming books. It follows the socratic instruction method, which is teaching by way of asking progressively complex questions. You can learn the basic concepts of Lisp/Scheme in a few hours. I checked out Ruby Koans (rubykoans.com/) by JimWeirich and solved it. The idea of learning a new language using Test driven development was fascinating. It was very similar to the approach in Little Schemer, except that instead of a book, it is an automated testsuite that's asking you questions. If you're learning Ruby, you should check out the original koans (github.com/edgecase/ruby_koans) first: ¶ ↑Other ResourcesTo get more insight on the Ruby koans way of learning, check out the EdgeCase Ruby koans (github.com/edgecase/ruby_koans): Following are some more resources to learn Metaprogramming in Ruby:
¶ ↑How do i add my own koans?To add your own koans and contribute to the community:
¶ ↑LicenseYou're free to copy, add, change or distribute the koans here. The structure of this whole project is forked from Edgecase Ruby koans (github.com/edgecase/ruby_koans) |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论