Ruby Koans - My Thoughts on completing The Ruby Koans

July 6, 2014


A koan is a story, dialogue, question, or statement, which is used in Zen practice to provoke the “great doubt” and test a student’s progress in Zen practice.

The Ruby Koans asks you questions in the form of unit tests as you learn Ruby.


Here is an example

def test_assert_equality
    expected_value = ?
    actual_value = 1 + 1

    assert expected_value == actual_value

You replace the “?” with the answer to ensure the test passes.


I finished the Ruby Koans over the weekend (later than anticipated), and I highly recommend them. What was great about the Koans is that its not just simple tests that you need to make sure pass.

There are a few Koans where you get into some deepish Ruby. The Koans teach you about modules, classes, methods, blocks and control statements, this is a great way for anyone to learn Ruby.

The Koans are not just for anyone new to programming. I also appreciated how the Koans don’t force you to answer in “The Ruby Way” but rather invoke that curiosity that you end up researching a Koan in order to find the idiomatic way of solving the issue.

So next on my plan is to read Why’s (poignant) guide to Ruby that I already started and will write about this week, and I will also start out on The Ruby on Rails Tutorial. I am excited for both however this week, I am away in Nashville and will need to be very disciplined to make sure I stick to my plan.

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