Ad
  • Custom User Avatar

    Yes I was not trying to tell what is or isnt an edge case, I was just trying to explain the reason why most katas need fixed and random tests.

    Unfortunately, no one can delete the kata. I know there is a 'delete' button, but as soon as anyone solves the kata it cannot be deleted anymore. (It is a bit strange, I know)

    But it has already been automatically retired because of being too similar to other katas, so it won't show up in the kata list anymore.

    is also better than many other tests in codewars

    You are right here, many older katas tests in Codewars are very bad. But this is why the beta process now is so strict now, to make sure that all the issues are already solved before approval so we don't get even more bad ones. And we are working on fixing the older ones, but it takes a long time :)

  • Default User Avatar

    @Kacarott

    And edge cases are testet in attempt part.

    ??? But they aren't? The attempt part only contains 20 random tests. If a user solution for some reason failed a test like A = [[0, 0, 0], [0, 0, 0], [0, 0, 0]], x = [0, 0, 0] then they can just ignore it because the chance of that exact test appearing in the random tests is incredibly rare.

    My mistake, I used wrong words. The question was not about edge cases or not. It was about fixed tests in attempt part or not. In most cases I would say it's necessary to take fixed tests in attempt part and I understand your arguments. But in this concrete case I think it's not, because my tests do not check edge cases at all. I don't think that A = [[0, 0, 0], [0, 0, 0], [0, 0, 0]], x = [0, 0, 0] is an edge case, because if the algorithm works this case should also work. Yes, we can argue about it, but I think it's enough for this kata and it is also better than many other tests in codewars where I did mistakes and got nevertheless points for the katas.

    Thank you that you gave me clear answers to my questions.

    Can you delete this kata now, please.

  • Default User Avatar

    @FArekkusu

    No, you haven't addressed that point at all. I don't understand based on what you've come to this conclusion after I literally said "a different part of the description became wrong".

    Because you wrote that's the same problem as the one rowcased described and rowcased maked his problem as resolved.

    General-case solutions spoil the other katas, and there're already quite a few general-case solutions submitted here. Even if a mod hides them all, you can't stop people from submitting those unless you forbid importing specific/any libraries.

    I sill don't get the point. The are a lot of katas (not Beta) where katas spoil other katas. In my oppinion you try to find a reason why this kata is a bad idea. May be I am wrong, but it's not important anymore.

    Please delete this kata. I tried it before, but I don't have permissions.

  • Custom User Avatar

    And edge cases are testet in attempt part.

    ??? But they aren't? The attempt part only contains 20 random tests. If a user solution for some reason failed a test like A = [[0, 0, 0], [0, 0, 0], [0, 0, 0]], x = [0, 0, 0] then they can just ignore it because the chance of that exact test appearing in the random tests is incredibly rare.

  • Default User Avatar

    @Kacarott

    Importing in any way you like does not include choosing to not import. It means you can choose to do from solution import * or import solution as foo or from solution import bar as x if you wish, but you must still import.

    That makes sense.

    It works currently without errors, to support older katas which are not yet updated. But all katas should follow the guidelines regardless. It could be in the future that it will be changed to only work with imports, at which point your kata will be broken.

    This makes sense, too. This explains why the tests works without import.

    The sample tests are just for user convenience. The solver does not have to run them in order to pass the kata, which is why they are not relevant here (they are important in a kata, but not the topic of the issue). If a sample test contains an edge case, for example, and the full tests do not contain that edge case, then the solver can simply ignore it and solve anyway. See the issue?

    No I don't. In my case all fixed tests are available for solver in sample test. They can see them, use them and extend them. And edge cases are testet in attempt part. The solver are not able to ignore the edge cases and solve the kata anyway.

  • Custom User Avatar

    So this is already solved.

    No, you haven't addressed that point at all. I don't understand based on what you've come to this conclusion after I literally said "a different part of the description became wrong".

    But I also found: "This is a convention used in many Python kata, but it's not a requirement, and authors can choose to import the module in any way they find suitable for them." And can you also answer my other question related to this: „Why? It works without errors.“?

    1. "This is a convention used in many Python kata, but it's not a requirement" - aliasing codewars_test as test is a convention, importing the test framework is a requirement.
    2. "It works without errors" - no, it doesn't; you can get away with not importing anything due to a hack introduced for backwards compatibility, but deliberately doing so only creates more work for other people.

    Where in the guideline can I find that sample tests are irrelevant and fixed tests should always be in „Test Case“-Block and not in „Example Test Case“-Block? And what is the sense behind it?

    1. "Where in the guideline can I find that sample tests are irrelevant?" - I never said that
    2. "fixed tests should not be in „Example Test Case“-Block?" - never said this either
    3. "fixed tests should be in „Test Case“-Block?" - this is mentioned in the documentation

    Yes, it can be solved with the same code, but only if you solve it for the general case. In this kata it is not necessary to solve the general case.

    General-case solutions spoil the other katas, and there're already quite a few general-case solutions submitted here. Even if a mod hides them all, you can't stop people from submitting those unless you forbid importing specific/any libraries.

  • Custom User Avatar

    and authors can choose to import the module in any way they find suitable for them.

    Importing in any way you like does not include choosing to not import. It means you can choose to do from solution import * or import solution as foo or from solution import bar as x if you wish, but you must still import.

    Why? It works without errors.

    It works currently without errors, to support older katas which are not yet updated. But all katas should follow the guidelines regardless. It could be in the future that it will be changed to only work with imports, at which point your kata will be broken.

    What does „almost“ mean in this context?

    Almost means all katas, with a few unique exceptions, for which random or fixed tests simply do not make sense. For example.

    And what is the sense behind it?

    The sample tests are just for user convenience. The solver does not have to run them in order to pass the kata, which is why they are not relevant here (they are important in a kata, but not the topic of the issue). If a sample test contains an edge case, for example, and the full tests do not contain that edge case, then the solver can simply ignore it and solve anyway. See the issue?

  • Default User Avatar

    Why has the second argument (of what?) has the form [[x], [y], [z]]?

    Because you made the random input generator create such arrays? Also, a different part of the description became wrong after you'd fixed the issue above.

    Is this the same issue like "Sample tests expect a different return format than the ATTEMPT tests." and "^ The same issue is true for the function output"?

    Yes.

    So this is already solved.

    What did I miss here? Quote[Imports]: „This is a convention used in many Python kata, but it's not a requirement, and authors can choose to import the module in any way they find suitable for them.“

    The fact that you have to import the test framework.

    Why is it a fact? In the guideline I found:

    „For simplicity, through the rest of this article it's assumed that the codewars_test module is imported and aliased as test with the following statement.“ (your point)

    But I also found:

    „This is a convention used in many Python kata, but it's not a requirement, and authors can choose to import the module in any way they find suitable for them.„ (my point)

    I think it's not clear.

    Can you explain why it is a fact? And can you also answer my other question related to this: „Why? It works without errors.“

    What did I miss here? The „Example Test Case“ has fixed test and the „Test Case“ has only random tests. I think its enough for solving the problem and this kata consists of fixed tests and random tests. Why is this not enough? And where did I break the guidelines?

    Final tests (almost) always must include fixed tests and random tests. The contents of the sample tests are irrelevant here.

    What does „almost“ mean in this context? Where in the guideline can I find that sample tests are irrelevant and fixed tests should always be in „Test Case“-Block and not in „Example Test Case“-Block? And what is the sense behind it?

    This is a similar problem, not the same.

    Even if we assume that it's okay for this kata to exist because it's a special case simplifying the problem, it can be solved with exactly same code as those other matrix multiplication katas, so they'll inevitably spoil one another. And in that case I can just as well say that this is trivial map/filter/reduce task lacking any novelty (or considering you can solve it like this, it might be more appropriate to say that this kata is doing basic arithmetics).

    I still don't get the point. The large part of all katas in codewars are trivial map, filter and reduce tasks. Yes, it can be solved with the same code, but only if you solve it for the general case. In this kata it is not necessary to solve the general case. The solution of this kata (special case) cannot be used for the other kata (general case). So it's not the same problem and therefore no duplicate.

    My argument is that this kata is easier to solve for beginners, because they don't need to solve the general case.

  • Custom User Avatar

    Why has the second argument (of what?) has the form [[x], [y], [z]]?

    Because you made the random input generator create such arrays? Also, a different part of the description became wrong after you'd fixed the issue above.

    Is this the same issue like "Sample tests expect a different return format than the ATTEMPT tests." and "^ The same issue is true for the function output"?

    Yes.

    What did I miss here? Quote[Imports]: „This is a convention used in many Python kata, but it's not a requirement, and authors can choose to import the module in any way they find suitable for them.“

    The fact that you have to import the test framework.

    What did I miss here? The „Example Test Case“ has fixed test and the „Test Case“ has only random tests. I think its enough for solving the problem and this kata consists of fixed tests and random tests. Why is this not enough? And where did I break the guidelines?

    Final tests (almost) always must include fixed tests and random tests. The contents of the sample tests are irrelevant here.

    This is a similar problem, not the same.

    Even if we assume that it's okay for this kata to exist because it's a special case simplifying the problem, it can be solved with exactly same code as those other matrix multiplication katas, so they'll inevitably spoil one another. And in that case I can just as well say that this is trivial map/filter/reduce task lacking any novelty (or considering you can solve it like this, it might be more appropriate to say that this kata is doing basic arithmetics).

  • Default User Avatar
  • Default User Avatar
    • The second argument has the form [[x], [y], [z]] instead of [x, y, z] as stated by the description (the latter is wrong)

    Is this the same issue like "Sample tests expect a different return format than the ATTEMPT tests." and "^ The same issue is true for the function output"?

  • Default User Avatar
    • Sample tests expect a different return format than the ATTEMPT tests.

    Solved.

  • Default User Avatar

    Sample tests expect a different return format than the ATTEMPT tests.

  • Default User Avatar

    What did I miss here? Quote[Imports]: „This is a convention used in many Python kata, but it's not a requirement, and authors can choose to import the module in any way they find suitable for them.“

    What did I miss here? The „Example Test Case“ has fixed test and the „Test Case“ has only random tests. I think its enough for solving the problem and this kata consists of fixed tests and random tests. Why is this not enough? And where did I break the guidelines?

  • Default User Avatar
    • The second argument has the form [[x], [y], [z]] instead of [x, y, z] as stated by the description (the latter is wrong)

    Why has the second argument (of what?) has the form [[x], [y], [z]]?

    • Duplicate (considering your solution performs multiplication for matrices of arbitrary size, I don't understand what's the point of this kata at all - to make a kata about matrix multiplication that is not 100% copy of the existing ones? looking at your completed katas list, I can see that you haven't done any of the existing matrix multiplication katas, so you've added this restriction just for the sake of it?)

    I don't get the point. Why is it important, that you understand my intention? Why is my completed kata list important?

  • Loading more items...