Wednesday, 27 March 2013

Koans

The word koan originates from Zen Buddhism and google defines it as this: -
A paradoxical anecdote or riddle, used in Zen Buddhism to demonstrate the inadequacy of logical reasoning and to provoke enlightenment.

Applying this to programming has resulted in programming-style koans. Meaning riddles leading down a path to enlightenment about a specific language. Generally koans can be used to help learn the syntax and intricacies of a language by introducing different aspects in a logical order using failing tests which the "student" must pass before continuing.

I first became aware of programming koans when I set about learning Ruby and worked through the Ruby Koans.


Then, most recently, whilst trying to learn more than just the basics in Javascript, I discovered the Javascript Koans, available on github here. I would say that even if you have dabbled in some Javascript before, it's worth going through these as they certainly taught me a thing or two and may help to clarify some areas you might be a bit hazy on.


So, give these koans a try, you might learn something!