/GildedRose-Refactoring-Kata

Starting code for the GildedRose Refactoring Kata in many programming languages.

Primary LanguageJavaScriptMIT LicenseMIT

An excercise for learning to work with legacy code.

Adapted for a spftware engineering course from this Kata which origanted from this one. See over there for more resources, languages and other tips.

My details:

  • Excercise: HW5 - Refactoring
  • Name:
  • ID#:
  • Github username:
  • Pair:
  • Estimation of hours I worked on it:

If you have an improvement suggestion or a bug fix for this tutorial, please open an issue here or send a PR with a fix.

How to use this Kata

The simplest way is to just clone the code (students by the invitiation link) and start hacking away improving the design. You'll want to look at the "Gilded Rose Requirements" which explains what the code is for (extra bunus: send an Hebrew translation to the origin).

First you need to add some tests to make sure you don't break the code while you refactor.

You could write some unit tests yourself, using the requirements to identify suitable test cases. We've provided a failing unit test in a popular test framework as a starting point for most languages.

The idea of the exercise is to do some deliberate practice, and improve your skills at designing test cases and refactoring. The idea is not to re-write the code from scratch, but rather to practice designing tests, taking small steps, running the tests often, and incrementally improving the design.

Setup

The js version is configured to used jasmine, but you can swith to node's mocha or other testing library.

Version Control and Submition

  • Commit every added test and refactoring step
  • Push to your githuv repository

Good luck.