Ad
  • Custom User Avatar
  • Default User Avatar

    The issue is still not resolved...
    In addition the image link is not easily viewable (white on white, at least in night mode): if that could help, the url is https://m.imgur.com/zO5VwkV ;)

  • Custom User Avatar

    Actually, the main reason I wrote this kata was to have a kata where you figured out the details from the tests. :-)

    The intention was to capture the realistic flow of figuring out the details as you worked with a problem, much like most of my day-to-day programming work looks like.

    In retrospect, this was probably a bad idea. People in general seem to enjoy the kata per se, but react badly towards the lack of detail in the description. Or maybe I just should have been clearer with my intent.

    In any case, I appreciate you taking the time to write a well formulated and thorough comment. I don't spend much time here nowadays, but I might updated the description in line with your suggestions!

    Thanks! :-)

  • Default User Avatar

    True, but the way it is written it says "...that the customer need to pay how much money". Customer, singular, not customers, plural. That's a key difference, and changes what the answer should be. Most definitely a language issue, and not a big deal, but perhaps may be worth a rephrasing for the future.

  • Default User Avatar

    For JavaScript, it would appear that the tests are written with the "Expected" and "Actual" values swapped; verified by coding my method to always return the value -1, and every test failed by saying: "Expected '-1'".

  • Default User Avatar

    For me, the graphics showing how the letters are assigned isn't loading in the description any longer. It looks like the markdown code is not formatted properly. I was able to use the imgur links in a browser separately to view them, though.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Fixed.
    Thank you for your feedback ;-)

  • Default User Avatar

    Despite the kata details clearly stating that 1 <= subtrahend <= minuend, under the Javascript tests suite it appears that the random tests do not prevent the subtrahend from being greater than the minuend. I could not get my solution to pass the random tests because quite often I'd see something like "Testing a = 546, b = 578", which I imagine is saying the subtrahend (578) exceeds the minuend (546). Since my script was attempting to reference an array entry that did not exist, it was throwing exceptions in the JS engine. When I essentially "regrouped"/"borrowed" from a non-existent value, the tests pass.

    I believe the random JS tests should be examined to ensure that this situation cannot happen, or conversely the kata specification needs to indicate that negative answers are indeed possible.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    For Typescript (or Javascript) reread the description:

    If there are multiple solutions (and there will be), return the result with the largest possible values

    12 in your answer is smaller than 13 in the expected solution; in the same way 65 is smaller than 66.

  • Default User Avatar

    I believe the TypeScript test cases are also wrong. I've run a few times and consistently found the random tests are looking for the solution to be a "less" value than my algorithm found.

    Examples:

    20313: expected [ 1, 2, 3, 4, 5, 13, 201, 20312 ] to deeply equal [ 4, 8, 12, 201, 20312 ] (yet my 13 value is > solution's 12 value)
    2204: expected [ 1, 3, 4, 5, 66, 2203 ] to deeply equal [ 2, 3, 13, 65, 2203 ] (yet my 66 value is > solution's 65 value)

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Thanks for your message. There was a bug in the sample tests and it's fixed. A reset of solution is required to load a new test samples.

  • Default User Avatar

    Strange result for me in TypeScript. My solution passed the final tests and I submitted to get a passing result on the kata, but could not get the solution to work on the sample test. For the first sample test, I got this note:

    Fail: expected [ 20, 12, 18, 30, 21 ] to equal [ 20, 12, 18, 30, 21 ]

    For the life of me, cannot figure out what's going on with the chai test, and why it wouldn't recognize the two arrays as equal to give me passing credit on the sample test. Odd.

  • Loading more items...