Ad
  • Custom User Avatar

    It doesn't matter if the above solution is copy/paste, it is ridiculously big. The actual solution is very small and simple using traditional addition method.

  • Default User Avatar

    The failed test cases just say that I need to implement the count and depth methods recursively.. does that mean that I didn't implement them recursively, or does it mean something else?

  • Custom User Avatar

    The messages that you've recieved on your failed test cases tell you what you've done wrong, also I believe you're trying to traverse a bad tree looking at the test cases. :)

  • Default User Avatar

    Thanks for all your responses and the new feature. I have posted my non-working solution as a question on that kata, if you are curious. But I'm already cringing at the impending humiliation, haha.

  • Default User Avatar

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

  • Custom User Avatar

    Thanks for responding @taehwanjo. To follow up on some of your points:

    You are erroneously equating the solvability of a kata with it deserving to be on codewars

    Not my point. My point was that the kata is clearly solvable, so filing a bug that simply states that you were unable to pass a specific test case, without giving any additional details or eventually solving it and realizing a flaw in its wording, is not a substantiated bug report. It may just be that you got frustrated and filed a bug.

    either the test is wrong or I don't know what recursion is

    I'm sure you know what recursion is. However the kata has been around for almost 3 years and of all the issues mentioned in the kata, no one seems to be hung up on recursion. The kata does appear to have an issue with a test case involving removing a node, as opposed to inserting it - based off of the other comments. I haven't personally tried to solve the kata so I'm not sure about its details. This may be related to your issue. If so, its not clear that they are linked (and the issue is a duplicate), if not, then it would seem others did not stumble on that part as much, so more details would be useful.

    My overall point was that while the kata may not be perfect, it has received enough completions and up votes from the community that it seems to be liked by others. Even the issues logged seem to be more of improvements as opposed to a fatal flaws that make the challenge impossible to complete. In general, I do agree with you that there should be a better system in place to encourage community contributions to existing kata. Perhaps some sort of bounty page where people can earn honor working on issues that kata have. However taking the kata completely out of rotation just because an issue is logged, IMHO, is too much of an assumption to make. Hopefully for now, seeing that issues exist on kata will help users make a decision about wether they want to spend the time on a kata or not.

  • Default User Avatar

    In response to your first paragraph: You are erroneously equating the solvability of a kata with it deserving to be on codewars. Using that logic, almost any kata, no matter how bad, deserves to be on the site. If I create a kata that says "guess the correct code" in which the answer is a fixed alphanumeric string chosen by me, it is solvable, but that does not mean it should be on the site. Coding is about translating human thought/language into computer language. A user could be a coding savant but without understanding what the kata writer wants, there is no way he/she can complete the kata. The only way to achieve an understanding of what is required from the kata is through reading the specs and the tests. So if the specs and the tests are deficient, that is a problem with the kata.

    Likewise, in the previous example I gave you, the binary tree class that I wrote does everything that the specs ask it to do and then some. That is why it passes all the tests except for two that are attempting to detect the usage of recursion. It also should pass the test that it is failing. The problem is that the test is not checking for what it says it's checking for. If the test says that I'm not writing a recursive function, but I am in fact writing a recursive function, then either the test is wrong or I don't know what recursion is. I'm guessing you're assuming the latter.

    The fact that the kata has been solved by 287 people proves that the kata is solvable. But as I said earlier, the solvability of a kata is not as important as the degree to which that solvability is a test of coding ability or computer science knowledge versus being lucky enough to guess the kind of code that responds well to the tests.

    I could reduce this issue even further - let's say I write a kata that simply states "write a recursive function." When writing my tests, do I have an obligation to ensure that all recursive functions pass the tests? Or would it be okay that only some recursive functions pass the tests? The latter standard, in addition to being a terrible user experience, simply does not exist in the real world, because in the real world, no matter how obscure and arcane a bug might be, you can always trace it to something that makes theoretical sense. If your code is flawless you can trace the problem to the framework, and then to the framework's dependencies, and if that doesn't work, you can look at how the language itself works, and if that doesn't work you can trace it all the way down to the laws of physics that govern the hardware on which the software is running. But at some point, eventually, you are guaranteed to hit something that makes sense, always. Not so on code wars, because you cannot view the source code for the arbitrary tests written at the discretion of an imperfect human being.

    Anyway thanks for pushing the update. At least now I can avoid kata with lots of open issues.

  • Custom User Avatar

    I'm resolving this as an issue since the kata has been solved 287 times and the issue reported seems to be that the kata is not passable. If you can verify a specific issue thats not already logged than please file another issue with more details.

  • Custom User Avatar

    You make some fair points about lack of incentives to fix kata that are not in beta. However the example you gave is actually a perfect example of why we should not close the kata until the issue is resolved. You logged an issue that essentially states "I personally cannot solve this kata therefore there must be a bug with the kata". However the kata has been successfully solved by 287 people. It is clearly solvable.

    There is nothing stopping people from logging issues and there is no way for us to automatically determine which issues really are issues. As another example, some people log issues for kata because they do not have example test cases - which is A: only a best practice, not required and B: wasn't even a feature until later on in the site (after maybe 600 or so kata had already been created). Its probably fair to call it an issue (I would go with suggestion, but ok sure we can call it an issue) - but not enough of an issue that the kata should be closed automatically. Some people log issues over very minor typos in the description. Yes they are issues, no they are not bad enough that the kata should be taken out of rotation.

    With that said, I have recently deployed an update that will indicate the number of issues that are still active on a kata, that is visible from both the kata list and when training on the kata. This will at least warn users that there may be some issues. In terms of them being fixed, kata authors are notified about changes and many members in the community have the ability to contribute. Only at a certain point a kata becomes locked from major changes (500+ solutions). The description can always be modified. You are correct that there is room for improvements here, but I don't believe the fix is as simple as what you stated.

  • Custom User Avatar

    Maybe so.
    But most of the time, they are looking for the "X" button to close the page, or look at other people's code, simply do not think about upvote the kata. even there are a lot of users do not know this feature

  • Custom User Avatar

    if someone wants to upvote your kata then they will take the time to find the button to upvote.

  • Custom User Avatar

    As a Kata author, I want a huge upvote button, can I?

    When the kata is approved, the upvote button is equivalent to "disappearing"(only a small ^up vote, No one will notice it).

  • Custom User Avatar

    if you post your solution below and mark it as a spoiler maybe someone can help you :)

  • Custom User Avatar

    Code saves automatically if you've ran a test agains't it. :)

  • Default User Avatar

    Let me give you an example. The one and only kata I have not been able to complete in code wars is one that you, jhoffner, have contributed to: http://www.codewars.com/kata/functional-binary-trees

    I have an issue open on that kata for the past 5 days with no response. Since it is not in beta, there is no incentive to address my issue. If I were a moderator I would close the kata to the public until the issue is resolved.

  • Loading more items...