Ad
  • Default User Avatar
  • Default User Avatar

    Point taken. I'll add info about the linear relationship to the kata description.

    Your comment, especially the final paragraph, raises an interesting question about how much information should be provided in a kata description. Opinions vary. I tend to agree with your statement about including all necessary information. But Codewars is hardly unanimous on this issue. For example, I recently completed a kata whose description plainly stated that only the chickens inside the cages were safe. Then testing revealed that some of the chickens outside the cages were also safe. When I complained, the response was that this discovery was all "part of the fun."

    In fact, I have tackled plenty of kata on Codewars that required running the sample tests to discover what was really required of my code. For those kata authors, this is apparently also part of the fun. I'm really not crazy about playing guessing games or being misled when I come here to work on coding skills, so it was not my intention to put anyone through that with this kata.

  • Default User Avatar

    Your defense of your kata is unsound.

    We are given two data points. There are countless functions which include these two data points, only one of which is linear. We do not recognize that the solution is linear, we guess and that is the flaw in your kata. A problem in a mathematical text will include this relevant information (either explicitly, by definining it as a linear relationship, or contextually, by including it in the linear equation section). Your kata description lacks this information. This is why the more explicit kata are clearer.

    A warrior can better guess the nature of the function by plotting the points in the sample tests, but sample tests should be used for testing, not relaying necessary information (with some caveats that do not apply to your kata). All necessary information for solving a kata (short of the actual method) should be within the kata description.

  • Default User Avatar

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

  • Default User Avatar

    I'm sorry you didn't like it. If it's really a duplicate, please refer to the name of the previous kata that it duplicates.

    We're all looking forward to your first kata, where you can show us how it's done right.