Ad
  • Default User Avatar

    Interpreting instructions in a real-world application is not always easy either. I like to think of these as practice for dense or unclear legacy code or hard to read documentation. It is also often the case that the author's first language is not English, in which case I'm sure a suggestion for clearer instruction would be helpful

  • Default User Avatar
  • Custom User Avatar

    Fixed.

  • Custom User Avatar

    Hmm... You might be right. I believe the wording might've been different at the time I solved it, so I'll admit that I jumped the gun here... My mistake.

    Nevertheless, I didn't close the issue initially, because I think we both agree that the description is inadequate and needs to be changed to minimize confusion.

  • Default User Avatar

    Thank you for your response.

    I do not equate "non-string integers" to "string integers". Please read the kata description carefully, especially where it says "...subtract this FROM the total of the string integers".

    The sentence "take the sum a and subtract it FROM b" equates to this: b - a
    while the sentence "take the sum a and subtract b" equates to this: a - b

  • Custom User Avatar

    How do you equate "non-string integers (sum)" (from description) to mean "string integer sum" (your interpretation) ?

    The description is far from ideal, but it's not inaccurate to my knowledge.

  • Default User Avatar

    Kata description does not accurately describe expected result. From the kata description: "add up the non-string integers and subtract this from the total of the string integers."

    This would mean **(string integer sum) - (non-string integer sum) = result

    However, when attempting the kata and looking at the sample tests provided, it is clear that the actual expected solution is the opposite:

    **(non-string integer sum) - (string integer sum) = result

    To resolve this issue, the kata description should read: "add up the non-string integers and subtract the total of the string integers."
    Or, alternatively: "add up the string integers and subtract this from the total of the non-string integers."

  • Default User Avatar

    You would never need to calculate whether the shark reaches your starting position to solve this one. You are correct in saying that if the shark reaches the pontoon first, you haven't made it in time. That is the reason for my issue. The test cases test for that exact condition, but the description does not match. Nothing needs to be added to the description, see my original comment for the simple fix.

  • Custom User Avatar
  • Default User Avatar

    The kata description should mention expected output. From the docs; "The description should clearly state all requirements the user is expected to fulfill to complete the kata."

    The description clearly states what inputs to look for, but does not specify or even allude to an expected output.

  • Default User Avatar

    make sure you check that n!=0, otherwise you will have an endless loop that would cause the timeout. otherwise, idk either

  • Default User Avatar

    Perhaps this would have been better as a suggestion, and not an issue. I still believe it is important for the kata description to accurately lay out what is expected. I like having to puzzle out solutions too, but this is a case of being asked to solve the wrong thing.

  • Custom User Avatar

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

  • Default User Avatar

    Personally, I think it's a trick to solve this question, rather than a issue.

  • Default User Avatar

    Although the variable name is bad, but the description says:

    sharkDistance = distance from the shark to the pontoon. The shark will eat you if it reaches you before you escape to the pontoon.
    

    So it really doesn't need to concern.

  • Loading more items...