Giter Site home page Giter Site logo

dannylagrouw / gildedrose-refactoring-kata Goto Github PK

View Code? Open in Web Editor NEW

This project forked from emilybache/gildedrose-refactoring-kata

0.0 1.0 0.0 2.76 MB

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

License: MIT License

C 1.12% C++ 85.86% Makefile 0.43% Shell 0.15% Java 2.12% R 0.37% CMake 1.07% C# 2.32% Haskell 0.46% JavaScript 1.20% Perl 0.52% PHP 0.61% PLSQL 0.46% Python 0.40% Ruby 0.39% Scala 0.41% Elixir 0.36% Rust 0.45% Go 0.30% F# 0.98%

gildedrose-refactoring-kata's Introduction

Gilded Rose Refactoring Kata

This is my execution of the Gilded Rose Refactoring Kata, done in Kotlin.

My main goal doing this kata was to make the items' update behavior configurable, declarable -- because that's what I got from the requirements. New types of items will surely have to be added later on, bringing their own specific requirements. I believe that with a configuration approach, this will be much easier to maintain than in the original code, where requirements were scattered over an already complex calculation function. Even when new configuration options will be needed, it will be easier to extend the new ItemConfig class than to try and work them into the original code.

Easier to test as well. The fork now contains a working unit test, based on the original program's execution over 100 update cycles. Even so, I think the separate classes should get their own unit tests (in a next version).

It may be arguable that the item configuration should be external to the code, for example in a properties file or a script file. Thus allowing configuration change without the need to re-deploy. More specific (non-functional) requirements would be decisive in this choice. For now, I chose to do the config in code, because I wanted to show how Kotlin can be used to create this kind of configurability.

gildedrose-refactoring-kata's People

Contributors

anuchito avatar balp avatar bastifr avatar beryllium avatar claydowling avatar codecop avatar dannylagrouw avatar dependabot[bot] avatar diegorsousa avatar emilybache avatar fpellet avatar fs00 avatar georgberky avatar jonasg avatar jonreid avatar ldez avatar mdbergmann avatar mebusw avatar michelgrootjans-persgroep avatar naomi-dennis avatar neppord avatar onlydevelop avatar pclausen avatar pen-y-fan avatar pfichtner avatar rhatherall avatar rrokkam avatar samuel-dufour avatar tonvanbart avatar un1r8okq avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.