Ad
  • Custom User Avatar

    Nice kata. A couple of weird caveats thrown in that don't add anything to the challenge. And broken formatting at the start.

  • Custom User Avatar

    I would still say it's very tangential. As you said, it's not needed. I see almost no use of regex in the solutions. Even in yours it wasn't strictly necessary.

    To me the point of having a "regex" tag on a kata is so that people looking to practise using regex can find tests that make them use regex. Not because you could in theory use regex to solve it--that applies to any coding test you could imagine, I think.

  • Custom User Avatar
    • Description should be language-agnostic

    • Finally, as an additional constraint, your solution must contain no more than one for * loop, while loop, forEach, map, reduce, reduceRight, find, findIndex, filter, some, or every. Your code will be checked and an error will be thrown if it contains more than one of these.

      What is the point of such restrictions? You can might as well add Array to the tally... and if too, and it adds nothing to the original task

    • Input validation is artificial and adds nothing to the task. In fact, below does not make any sense...

      However, your implementation should explicitly throw an Error when n is a positive number with any non- zero digits after the decimal separator; negative numbers are OK:

    You could might as well just throw an Error for all non-integer inputs, and clamp negative ones up to 1, if you opt to keep the validation requirement. Otherwise, discard them all is the wiser choice.

  • Default User Avatar
  • Custom User Avatar

    Assume you want to have a spell named "history", the solution will instantly break. In addition, the instructions says only when a function is called will the name of the function be added to the history queue, instead of it being immediately added when accessed.

  • Custom User Avatar

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

  • Custom User Avatar

    that one's awesome.

  • Custom User Avatar

    Description formatting is broken.

  • Custom User Avatar

    Love the map(Number) to call the constructor, never seen that before.

  • Custom User Avatar

    For checking users' solutions, you can try this: https://www.codewars.com/kumite/579d80d97cb1f385ed000231?sel=579d80d97cb1f385ed000231
    I did it another way in a different kata though, so let me know if this doesn't work.

  • Custom User Avatar

    That really just depends on how you write your solution. You're right in a way though; they're not necessary, but could help someone get some ideas to form their answer.

  • Custom User Avatar

    I don't think this has anything to do with regular expressions?

  • Custom User Avatar

    After more than 500 warriors have solved the kata there is no way of adding that test, tests become locked.
    I've added a similar test in the sample tests, is the best I can do about it. Hopefully it'll filter some bad solutions.

  • Custom User Avatar

    I shortened the description a bit and gave the sections some headers; it's still long because of displaying the patterns, but hopefully it'll help others.

  • Custom User Avatar

    OK, I removed the invalid input tests section; also, removed a bunch of tests that, on second look, weren't providing much value. I left in the tests that demonstrate different truthy/falsey values, even though there's a lot of them. I probably wouldn't do this again in future katas, but I figure someone might learn something from reading through them.

  • Loading more items...