Ruby Koans how did I only find out about this now?

June 30, 2014

Why?

I’m learning Ruby part of my plan is to go through the Ruby Koans. I started yesterday (2014-07-29), and tonight was part 2 of 5.

The Ruby Koans site states:

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.

How?

The Koans are 33 different lessons covering various topics, but I won’t be doing the JRuby Koan so I will only be doing 32. The first evening I started I done the first 10. You can either download the Koans or you can do them online. My choice is to do them online, but my process (as with most coding tutorials or books) is to copy the code to my IDE and do the lessons locally. I have broken the Koans up over 5 parts that I will do over 5 days.

###Part 1

  1. about_asserts
  2. about_nil
  3. about_objects
  4. about_arrays
  5. about_array_assignment
  6. about_hashes
  7. about_strings
  8. about_symbols
  9. about_regular_expressions
  10. about_methods

###Part 2

  1. about_keyword_arguments
  2. about_constants
  3. about_control_statements
  4. about_true_and_false
  5. about_triangle_project

###Part 3

  1. about_exceptions
  2. about_triangle_project_2
  3. about_iteration
  4. about_blocks
  5. about_sandwich_code
  6. about_scoring_project

###Part 4

  1. about_classes
  2. about_open_classes
  3. about_dice_project
  4. about_inheritance
  5. about_modules
  6. about_scope

###Part 5

  1. about_class_methods
  2. about_message_passing
  3. about_proxy_object_project
  4. about_to_str
  5. about_extra_credit

These are pretty cool as each Koan builds up your knowledge as you go. The language and the syntax are much less verbose than C#, and I am pretty happy about that, who doesn’t want to write less code to get the same amount of work done?

Another thing I really like is how you are taught through Unit Testing, so not only are you learning Ruby you are also learning how to write Unit Tests and to do it using TDD.

Conclusion

So far the Ruby Koans are pretty fantastic, and I recommend them to anyone. Granted that this isn’t my first experience with Ruby but this is the first time I am really trying to become more proficient in the language. The Koans have already enlightened me, and I will keep doing them and report back my progress tomorrow.


Discussion, links, and tweets

My name is Deon Heyns and I am a developer learning things and documenting them in realtime. Python, Ruby, Scala, .NET, and Groovy are all languages I have written code in. I appeared in the New York Post once. I host my code up at GitHub and Bitbucket so have a look at my code, fork it and send those pull requests.

comments powered by Disqus