Starting code for the GildedRose Refactoring Kata in many programming languages.
Go to file
Karim Fadel 0155b204a2 em
2026-01-14 08:42:53 +02:00
.github Add a CONTRIBUTING.md to clarify project structure and valid contributions (#550) 2024-06-12 17:46:09 +02:00
abap
Ada
bash . t bash/texttest_fixture.sh temp file -> variable 2024-01-05 09:11:57 +01:00
c99 Add CMake and Unity test framework for c99 2018-10-30 18:29:14 +01:00
C only need one item in array 2021-10-12 11:19:56 +02:00
c_cmocka remove unneeded files 2023-11-08 13:48:45 +01:00
clojure Add Clojure translation 2022-09-25 20:41:30 +02:00
COBOL Add add script that helps you add items 2022-09-26 15:28:05 +02:00
common-lisp-parachute
commonlisp
cpp Introduce four CMake options to enable/disabled test variants or test frameworks 2025-02-15 09:38:07 +01:00
csharp.NUnit upgrade nunit projcet to dotnet 10 LTS 2026-01-07 00:17:07 +04:00
csharp.xUnit upgrade xunit projcet to dotnet 10 LTS 2026-01-07 00:15:23 +04:00
d
dart
Delphi Add .res files to .gitignore 2020-01-20 11:54:27 +00:00
elisp
elixir
elm
erlang
fortran Adding missing call to update_quality in GildedRose_unity_test 2021-05-26 21:45:07 +02:00
fsharp
fsharp-core
gleam refactor: update gleam_stdlib and glint version 2024-11-17 16:01:36 +07:00
go feat: update go boilerplate 2022-04-26 16:27:42 +01:00
Groovy
haskell add working directories to haskel .gitignore 2024-09-14 13:14:49 +02:00
io Port TextTestFixture. 2024-12-13 01:46:44 +01:00
janet
Java Make Gradle Java projects compatible with Java 17+ 2024-11-21 16:12:55 +01:00
Java-Approvals em 2026-01-14 08:42:53 +02:00
Java-Cucumber Make Gradle Java projects compatible with Java 17+ 2024-11-21 16:12:55 +01:00
Java-Spock Make Gradle Java projects compatible with Java 17+ 2024-11-21 16:12:55 +01:00
jq
js-jasmine Update dependencies for JavaScript 2021-05-14 11:22:05 +02:00
js-jest Get texttests working for Javascript-Jest 2023-11-03 15:36:54 +01:00
js-mocha Make javascript mocha texttests work 2023-11-03 15:39:50 +01:00
julia
Kotlin Reformat Item ctor and simplify toString 2025-05-12 09:39:48 +01:00
lfe
lua add Lua lang 2025-09-02 15:34:44 +02:00
Matlab
nim
ocaml Support texttest with OCaml 2023-10-24 14:04:28 +02:00
odin separate files based on feedback 2025-05-04 13:29:08 +02:00
pascal Port to (Turbo) Pascal. Feeling retro ;-) 2017-12-08 15:53:56 +01:00
perl
perl6 Moves language specific Git ignores into language subfolders. 2018-12-02 20:31:26 +01:00
php add composer.phar 2024-12-10 15:20:12 +01:00
plantuml
plpgsql
plsql Updated gilded rose to utplsql version 3 2019-07-02 15:40:46 +02:00
python Update README.md with -m unittest 2025-07-17 15:44:35 +02:00
R Eclipse/StatET R environment configuration (can be imported as existing 2014-12-05 20:09:51 +01:00
rescript adding yarn texttest 2023-09-07 17:07:56 +09:30
ruby Omit parentheses in no‑arg defs 2025-09-03 14:50:22 +09:00
rust
scala
scheme Fixes bug in Scheme version, not deeply nested enough. 2018-12-03 22:45:26 +01:00
Smalltalk
sql
swift
texttests docs: improve Windows setup instructions for TextTest with Python 2025-10-28 22:13:36 +03:00
TypeScript
TypeScript-deno fix: typo 2025-01-22 18:36:51 +01:00
vbnet
xslt Description how to run the XSLT. 2018-12-07 23:53:54 +01:00
zig
.gitignore
CONTRIBUTING.md Add a CONTRIBUTING.md to clarify project structure and valid contributions (#550) 2024-06-12 17:46:09 +02:00
GildedRoseRequirements_ar.md Update GildedRoseRequirements_ar.md 2025-04-28 16:31:46 +01:00
GildedRoseRequirements_de.md
GildedRoseRequirements_es.md
GildedRoseRequirements_eu.md
GildedRoseRequirements_fr.md
GildedRoseRequirements_gl.md
GildedRoseRequirements_it.md
GildedRoseRequirements_jp.md Update GildedRoseRequirements_jp.md 2020-08-17 10:47:34 +09:00
GildedRoseRequirements_kr.md
GildedRoseRequirements_nl.md
GildedRoseRequirements_pl.md
GildedRoseRequirements_pt-BR.md
GildedRoseRequirements_ru.md
GildedRoseRequirements_th.md
GildedRoseRequirements_ua.md
GildedRoseRequirements_zh.txt
GildedRoseRequirements.md
license.txt
README.md docs: Add reference to the Requirements file in Galician to README 2025-09-22 14:23:44 +02:00
start_texttest_from_python.bat
start_texttest.bat Update convenience texttest scripts for windows and docs 2023-11-03 13:42:00 +00:00
start_texttest.sh

Support this and all my katas via Patreon

Gilded Rose Refactoring Kata

You can find out more about this exercise in my YouTube video Why Developers LOVE The Gilded Rose Kata. I also have a video of a worked solution in Java - Gilded Rose Kata, Hands-on

I use this kata as part of my work as a technical coach. I wrote a lot about the coaching method I use in this book Technical Agile Coaching with the Samman method. A while back I wrote this article "Writing Good Tests for the Gilded Rose Kata" about how you could use this kata in a coding dojo.

How to use this Kata

The simplest way is to just clone the code and start hacking away improving the design. You'll want to look at the "Gilded Rose Requirements" which explains what the code is for. I strongly advise you that you'll also need some tests if you want 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. I've provided a failing unit test in a popular test framework as a starting point for most languages.

Alternatively, use the Approval tests provided in this repository. (Read more about that in the section "Text-based Approval Testing").

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 taking small steps, running the tests often, and incrementally improving the design.

Gilded Rose Requirements in other languages

Text-Based Approval Testing

Most language versions of this code have a TextTest fixture for Approval testing. For information about this, see the TextTests README

History of the exercise

This Kata was originally created by Terry Hughes (http://twitter.com/TerryHughes). It is already on GitHub here. Bobby Johnson described the kata in an article titled "Refactor This: The Gilded Rose Kata", but unfortunately it is no longer on the internet. I found it on the Wayback Machine here.

I translated the original C# into a few other languages, (with a little help from my friends!), and slightly changed the starting position. This means I've actually done a small amount of refactoring already compared with the original form of the kata, and made it easier to get going with writing tests by giving you one failing unit test to start with. I also added test fixtures for Text-Based approval testing with TextTest (see the TextTests)

As Bobby Johnson points out in his article "Why Most Solutions to Gilded Rose Miss The Bigger Picture" (on the Wayback Machine here), it'll actually give you better practice at handling a legacy code situation if you do this Kata in the original C#. However, I think this kata is also really useful for practicing writing good tests using different frameworks and approaches, and the small changes I've made help with that. I think it's also interesting to compare what the refactored code and tests look like in different programming languages.

Contributing

Contributions are encouraged! You could add a translations of the specification in another language or a new starting point for your favorite programming language. Please see CONTRIBUTING.md for more details.