Coder Social home page Coder Social logo

Comments (5)

emilybache avatar emilybache commented on June 11, 2024

yes that's right.

from gildedrose-refactoring-kata.

marshalltower avatar marshalltower commented on June 11, 2024

Perhaps the requirements need to be clarified that conjured items degrade in twice twice as fast as normal items, once the sell by date has passed.

Currently they degrade at the same rate as normal if above the sell by date.

from gildedrose-refactoring-kata.

emilybache avatar emilybache commented on June 11, 2024

yes. This is an exercise left for you to fix.

from gildedrose-refactoring-kata.

marshalltower avatar marshalltower commented on June 11, 2024

Sorry I believe you're missing the details. I'm well away of the point of the exercise; however, either the data that your are providing as test data to test against in texttest is either incorrect or the requirements could use some clarity. I will outline the issues below:

  • The requirements indicate that normal items degrade at rate of 1 which doubles to 2 once the sell by date is past.
  • The requirements also indicate that the conjured items degrade at twice the rate of normal items. This can be construed two ways:
  1. Conjured items degrade at a rate of 2 which double to 4 once the sell by date is past (i.e how i interpreted it)
  2. Conjured items degrade at a rate of 1 and then 4 once the sell by is past (at double normal degrade rate of normal once past the sell by date).
  • The current texttest values for conjured items degrade at 1 (same as normal) which doubles to 2 (same as normal) once the sell by date is past.

The only other way I can interpret your response "This is an exercise left for you to fix" would be that the texttest themselves are also incorrect and need refactoring/correcting; which gives conflicting thoughts given that people will likely be using the original texttest values to compare whether or not their solutions are functional (especially given their intent to allow people to pass on making the tests and go straight to refactoring).

from gildedrose-refactoring-kata.

emilybache avatar emilybache commented on June 11, 2024

The current texttests reflect the current behaviour of the system. That is by design, it is not a mistake. The tests are intended as an aid to refactoring, not as an aid to implementing the new feature. They are not a requirements document. Requirements are provided only as a plain text description of what the owner of the fictional inn would like, as you have quoted.

When you do this exercise, the first thing to do is to refactor. For that you need green tests. Once you have done refactoring, then you can go on to add the new feature. These are separate activities, I read in your question that you have conflated them. With an approval test it is essential to know whether you are refactoring or whether you are adding a new feature. Once you have added support for conjured items you will no doubt want to approve a new version of the texttest output with updated values for conjured items. This is how approval testing works.

It is meaningless to say 'the texttest themselves are incorrect and need refactoring/correcting'. Approval testing means 'this is what I approve today, this is how the system works. I may approve something different tomorrow when we have new requirements'. Approval testing does not say 'this is correct for all time and forever'.

I hope that clarifies the situation and why the texttests are perfectly fine as they are, a starting point for this exercise.

from gildedrose-refactoring-kata.

Related Issues (20)

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.