Learn C# on Windows, OSX or Linux with the .NET Core Koans
During the height of the ALT.NET movement, I became determined to learn another language/stack outside of the current Microsoft .NET environment. At the time there was a lot of buzz around Ruby and the open, friendly and inviting culture surrounding it. I dove in head first and started reading the required texts of the stack; Why's (Poigant) Guide to Ruby, The Ruby Programming Language, The Ruby Way.
I was unsuccessful in transitioning to another language/stack full time. But I learned a ton of new concepts that I had never been exposed to in my career up to that point. Since then I have dived into node.js and Objective-C; both great fulfilling experiences as well. I firmly believe that exploring different languages and stacks is a great way to change the way you think about solving problems.
One of the great experiences I had while exploring the ruby way, was when I discovered the Ruby Koans. The koans took the playfulness of Why's guide and the details found in TRPL book and combined them into a simple learning tool that anyone could clone, run and start learning the basics of the language by putting their hands on a keyboard (the most effective way for me to learn).
I was so enamored with the Ruby Koans, that I started doing presentations with them at local Meetups and Code Camps. I would talk briefly about Ruby, explain how to install it with the koans and then invite every member of the audience up one at a time to put their hands on my keyboard and solve a step on the path.
It was great fun. The reactions from the participants was inspiring. I had people from every walk of "programming" life get their first experience with ruby at those sessions. Everybody left a ruby programmer. The most memorable case being my friend Chris Bilson's 8 year old daughter. From what I understand she still talks about that crazy guy who encouraged her to learn ruby.
Later on I discovered most of what I was teaching was based on the work of Jim Weirich, a truly inspirational figure in the community. I was lucky enough to meet him at the Software Craftsmanship conference in Chicago in 2011. He presented on the Roman Numerals Kata. Later that night he, a group of other nerds and I sat around a board game for hours and talked shop, nerdiness and other pursuits. I seriously encourage you to watch that presentation video to get a feel for the kind of guy Jim could be.
I told Jim about my koan sessions. He listened intently, said it was a great idea, that he was proud of me and that I should continue. I felt like I had won a medal that day. Those kinds of interactions really feed my fire and they are to far in between.
Sadly, Jim passed away in 2014. That loss was a huge hit to the community at large. Rest in peace, Jim. You are greatly missed. But I think the best way to honor Jim is to continue his effort to bring a love of the craft to anyone willing to learn.
So, recently I started working on an implementation of koans for C# that are appropriate for the newly released .NET Core. My goal was to create something that was just as playful and useful as the original inspiration that can be used in any setting to help a beginner get their hands on a keyboard quickly and start learning. That first interaction with a platform is crucial and should be encouraging and entertaining.
Getting started could not be simpler, just follow these 8 easy steps:
- Install .NET Core SDK 1.0.
- Install Visual Studio Code, the Insiders Edition is highly recommended.
- Clone the repository:
git clone https://github.com/NotMyself/DotNetCoreKoans.git.
- Change directory into the cloned repository
- Restore packages:
- Open the project in VSCode
code .depending on what version you chose to install.
- Run the koans in watch mode:
dotnet watch run.
- Follow along with the instructions printed to your console. Each time you save a *.cs file, the project will be built and run again for you automatically.
This is obviously a early stage version. There is still quite a bit of work to make them as clean as Jim's clever implementation. I am focused on polishing up the runner and feature set for v1.1.
A Call to Action
There are also many topics yet to be covered by this set of koans and that is where you come in. I have added a handful of needed topics as issues and tagged them as Up for Grabs. There are even some specifically tagged as Beginner Friendly.
If you have never contributed to an open source project, let this be your first. Take a stab at updating the AboutStrings Koan to include information about interpolation then submit it as a pull request. I promise to work with you to get your contribution into the repository and be friendly and encouraging about it. It is what Jim would have done.
If you think a topic is missing, propose it's inclusion by submitting an issue yourself. Or better yet submit the issue and an accompanying pull request with how you think the topic should be introduced. Think about beginners in your effort; be clear and informative, be concise and most of all be playful with your examples.