Refactor This: The Gilded Rose Kata for .NET Core

Back to Listing

Refactor This: The Gilded Rose Kata for .NET Core


20 Jul, 2016


Background

Back in 2011, Terry Huges and I attended the Software Craftsmanship North America conference in Chicago. We came back excited about what we had learned and out of that excitement was born The Gilded Rose Kata.

It has been adapted to many different languages; Ruby, C++, go, python just to name a few. It was included in Emily Bache's amazing book The Coding Dojo Handbook. And many people have recorded screencasts of themselves solving the kata with different approaches. In a typical month I see at least one to two forks of my original repository. It is by far the most popular thing I have ever put up on GitHub.

With the recent release of .NET Core, I wanted to adapt the kata to the new platform and release it into the wild. The source is available on GitHub and is released under the MIT license.

My hope is that it will help a new generation of developers get up and running quickly writing C#. It is truly a great language that no longer requires Visual Studio or Windows.

Getting Started

  1. Install .NET Core SDK 1.0.
  2. Install Visual Studio Code, the Insiders Edition is highly recommended.
  3. Clone the repository: git clone https://github.com/NotMyself/GildedRoseCore.git.
  4. Restore packages: ./script/restore.
  5. Run Console Application: ./script/run.
  6. Run Unit Tests: ./script/test.

If you see output similar to the following screenshots, you are ready to start refactoring. Note: For windows users ensure you download the SDK, it is not the first link on the page.

Bash

bash good restore, run, test output

PowerShell

powershell good restore, run, test output

Debugging in VSCode

The workspace comes preconfigured to debug the console application in VSCode. Simply, click the debug icon and then the play icon.

vscode debug console

To debug a unit test, locate the debug test link in the codelens display.

vscode debug test

"DSC_0056" By Orin Blomberg is licensed under CC BY 2.0

Share this story

Bobby Johnson

About Author

I am a passionate engineer with an interest in shipping quality software, building strong collaborative teams and continuous improvement of my skills, team and the product.

comments powered by Disqus
Back to top