≡ Menu

DotNet Koans

For quite a while now, if you want to learn Ruby, you have the Pickaxe book, Why’s guide, and the fabulous Edgecase Ruby Koans on GitHub.

The Koans are especially interesting because all you really need to do is setup a working environment and go. It tells you what you need to do next, by way of running the tests and seeing what passes.

I thought to myself, why the heck don’t we have something like that for other languages? There are some obvious challenges – for example, doing it in .NET it has to be compiled, and some of the things don’t map well. But in the spirit of, “If you’re going to fail, fail as publicly as possible” I’m announcing the launch of the DotNet Koans.

The goal of the project is to eventually have a guide for C#, F#, and VB.NET – likely in that order. Ok, likely the first two, and hopefully some VB’r will jump on the third. Right now I have three of the twenty-five koans ported over – AboutAsserts, AboutNil and AboutArrays. I’ve hacked together a custom runner for xUnit.NET which tells you where you are every time you build.

My goal right now is to get everything ported over pretty much as-is, and then look at making sure this fits a good progression. For example, I don’t know if the Koans will lend themselves to LINQ, but that’s something that should be covered.

The project is now public up on GitHub at http://github.com/CoryFoy/DotNetKoans – feel free to download it, play with it, and contribute (or critique) if you’d like.

Comments on this entry are closed.

  • MichaelF December 22, 2009, 10:46 am

    Looks cool, I can’t wait to try it over Christmas break!

  • Jay R. Wren January 2, 2010, 3:37 pm

    I started this a few months ago. My goal was to help my students, but they did not seem to use it, so I stopped my work.


  • Greg Malcolm February 24, 2010, 5:52 pm

    Just tried it out quickly, looks a very nice port! You may want to leave a note in the readme though about needing to pass the target koans dll as an argument for the tester.

    A quick example of calling it with csharp.dll should do the trick…

  • JTigger February 19, 2013, 10:06 am

    Years later, some folks still find value! :)

    I attempted to do this in VS2010 (.NET 4.0 runtime) and it failed while trying to load CSharp.dll.

    To get it to run, I enabled “remote source loading”:
    In KoanRunner/app.config… added the following:

  • JTigger February 19, 2013, 1:51 pm

    grrrrr… I included some XML that was not escaped. :)

    (replace square brackets for angled brackets)

    [loadFromRemoteSources enabled=”true” /]