Ad
  • Default User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    lol forget that already its self xD

  • Custom User Avatar

    I am of the same opinion :)

  • Custom User Avatar

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

  • Custom User Avatar

    Pretty confusing description. It took me longer to understand the question than to solve it. I'll re-edit this post, and try to rephrase the description. This puzzle is fun but if we can't understand the instructions, it really ruins the fun.

  • Custom User Avatar

    If you do feel stuck on a test (often they aren't clear on what they are trying to do), the first step is to check the input and verify that things are all working as you expect them to. If you don't find any bugs, then you can try adding console.log([].slice.call(arguments.caller.callee.toString())); to the top of your function. This will show you the source of the test fixture (or at least part of it).

  • Custom User Avatar

    It would be nice to be able to mark a suggestion as resolved without having to add a no-content ("Great thanks!") comment.

  • Custom User Avatar

    I agree and understand the intent it's just that some katas', as you mentioned, have a vague description and as a non-native english speaker, I sometimes guess what they want me to do. But I think it's still a nice feature to have, as a newbie programmer, I still have a lot to understand especially when some of the kata's test specs are very tricky that I haven't even experienced and will not really understand what I did wrong.

  • Custom User Avatar

    This is an intended feature. Knowing the tests would make you directly aware of some of the complexities you wouldn't have thought off otherwise.

    I can undertand your request, but I think the idea behind code katas and codewars is not to provide software specs so you comply to them, but to force you to write rather generic code that would hold against sneaky edge cases you might not have thought of.

    Of course the success of this approach is debatable, as I see some katas where people do just that: write something that complies to the test and that would be a dreadful piece of code to use in enterprise software.

    Maybe the issue lies more with the kata's description than with the tests. I think it's a judgment call, and it'd be hard for them to make it work both ways. It's just too bad that some katas try to have you guess while others try to enforce specs that sometime seem silly.

  • Custom User Avatar

    Knowing what the specs of the test is. Sometimes when I try to submit my solution, it's failing on some tests and I don't know what should I change in my code.