Starting code for the GildedRose Refactoring Kata in many programming languages.
Go to file
Felipe Gaete 47faaf2950
Merge pull request #3 from bukhr/test/sulfura-no-cambia-dias-para-vender
test: sulfuras no cambia los días para vender
2024-08-12 09:27:04 -04: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
C
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 Update gilded-rose.lisp 2023-07-27 11:55:50 +02:00
commonlisp added functional version. 2022-01-20 08:53:01 +01:00
cpp Updated googletest to release-1.12.1 and catch2 to v3.3.2 2023-06-09 14:21:43 +02:00
cpp-catch2 Update version of approval tests 2024-04-18 09:25:44 +02:00
csharp.NUnit Refactoring c# projects (#544) 2024-06-06 14:13:44 +02:00
csharp.xUnit Refactoring c# projects (#544) 2024-06-06 14:13:44 +02:00
d
dart
Delphi
elixir
elm
erlang
fortran
fsharp
fsharp-core Upgrade to F#6 2021-12-26 17:16:07 +01:00
gleam Add Gleam implementation (#548) 2024-06-09 21:37:41 +02:00
go feat: update go boilerplate 2022-04-26 16:27:42 +01:00
Groovy Added Gradle to Groovy project. 2022-08-26 13:51:13 -05:00
haskell
janet updated tests and added README, based on review feedback. 2023-07-13 11:01:41 +01:00
Java tweak docs 2023-11-03 16:31:14 +01:00
Java-Approvals update java version 2024-06-06 18:00:54 +02:00
Java-Cucumber Migrated to apache maven wrapper 2022-01-03 22:18:08 +01:00
Java-Spock
jq - r jq: jaq -> jq, rm foreach 2024-01-05 09:21:12 +01:00
js-jasmine
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 make julia compatible with texttests 2023-06-12 16:41:55 +03:00
Kotlin Fixed texttests for Kotlin 2023-11-03 16:11:26 +01:00
lfe failing unit test with 'fixme != 'foo' 2022-01-23 19:06:42 +01:00
Matlab Add Matlab files 2023-09-21 21:47:48 +02:00
nim Standard ignores for Nim. 2023-12-07 13:07:29 +01:00
ocaml Support texttest with OCaml 2023-10-24 14:04:28 +02:00
pascal
perl
perl6
php Update ApprovalTest substitute the deprecated approveString method with the recommended 2024-04-09 15:59:02 +03:00
plantuml
plpgsql
plsql
python Improve docs for python version 2024-06-01 10:13:32 +02:00
R
rescript adding yarn texttest 2023-09-07 17:07:56 +09:30
ruby Merge branch 'main' into test/sulfura-no-cambia-dias-para-vender 2024-08-12 09:26:44 -04:00
rust Make rust loop worse to make it closer to the original 2023-05-21 10:36:45 +02:00
scala add empty README for Scala 2023-11-03 15:59:46 +01:00
scheme
Smalltalk
sql
swift swift: use && instead of , for beginners and for automated mutation 2024-03-18 16:03:09 -07:00
texttests Add Zig implementation 2024-06-02 17:15:37 +02:00
TypeScript sourceMap must be true for coverage to work with correct line numbers. 2023-11-29 12:13:35 +01:00
vbnet Add VB.NET implementation 2022-03-16 20:35:25 -04:00
xslt
zig Add Zig implementation 2024-06-02 17:15:37 +02:00
.gitignore ignore mac DS_Store 2024-02-13 16:53:41 +01:00
CONTRIBUTING.md Add a CONTRIBUTING.md to clarify project structure and valid contributions (#550) 2024-06-12 17:46:09 +02:00
GildedRoseRequirements_de.md improve language 2022-02-11 21:08:27 +01:00
GildedRoseRequirements_es.md
GildedRoseRequirements_eu.md Add Basque (Euskara) requirements translation 2023-11-07 17:25:00 +01:00
GildedRoseRequirements_fr.md removed a word that didn't mean anything in the sentence in french 2022-11-07 09:31:27 +01:00
GildedRoseRequirements_it.md Update Italian translation: 2023-09-06 12:38:04 +02:00
GildedRoseRequirements_jp.md
GildedRoseRequirements_kr.md Update GildedRoseRequirements_kr.md 2023-01-12 14:08:50 +09:00
GildedRoseRequirements_nl.md Added Dutch requirement specification Markdown translation 2024-04-25 14:44:22 +02:00
GildedRoseRequirements_pl.md add polish translation of requirements 2022-06-09 20:17:36 +02:00
GildedRoseRequirements_pt-BR.md
GildedRoseRequirements_ru.md Improve the translation of the specification in Russian 2024-07-20 00:17:53 +00:00
GildedRoseRequirements_th.md
GildedRoseRequirements_zh.txt
GildedRoseRequirements.md doc: use markdown for english requirements 2023-12-08 21:13:27 +01:00
license.txt
README.md Update README.md 2024-07-20 00:27:27 +00:00
start_texttest_from_python.bat Update convenience texttest scripts for windows and docs 2023-11-03 13:42:00 +00:00
start_texttest.bat Update convenience texttest scripts for windows and docs 2023-11-03 13:42:00 +00:00
start_texttest.sh Add convenience shell script for running texttests 2023-11-03 14:08:40 +01:00

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. See also Bobby Johnson's description of the kata.

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", 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.