Ad
  • Custom User Avatar

    2nd Time I Got Top answer, lets go

  • Custom User Avatar

    I think it's the first case, as you said it is written:

    Interesting numbers are 3-or-more digit numbers that meet one or more of the following criteria:

    So first and foremost, they need to have 3-or-more digits.

  • Custom User Avatar

    According to the description exactly as stated, if you put a 2-digit number in awesome_phrases (like 69) then it should not signal when reaching this number. Is that the expected behavior? Or should awesome_phrases be an exception to the 3-digit mileage rule?

  • Custom User Avatar

    I'm curious but why is the node version so low to not allow URLSearchParams iterating over that, splitting, and then reconstructing recersivly is still a good kata. Why teach 20 year old code practises?

  • Custom User Avatar
  • Custom User Avatar

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

  • Custom User Avatar

    Pretty interesting kata, thanks.

  • Custom User Avatar
  • Custom User Avatar

    Unfortunately, adding a couple more of fixed tests is not a complete solution, because fixed tests can be easily hardcoded. While a fixed test will point you to a flaw in your solution, it will not force you to fix it, but can be satisfied just by hardcoding it. The solution would be to add fixed tests and fix random tests so they are guaranteed to generate inputs of all kinds. And there is already many issues about this (I counted 7 issues related to insufficient tests).

    You can propose a fork with more fixed tests, but this is only a partial solution. If you created a fork with good random generators for all types of expected results, it would be great.

  • Custom User Avatar

    Adding a couple more of fixed tests isn't the solution.

    Yes, it is. I passed the kata without knowing I have an error. Only looking at other solutions made me realise I misunderstood the assignment (at first I assumed that 1 and 2 over interesting number should be classified as almost interesting).

    Palindrome error I made (my code worked for odd length input but didnt for even. e.g. 15751 was classified correctly but 1551 was not). This is exactly what edge case tests are for. For palindrome, one test case for even length and one for odd would catch that.

  • Custom User Avatar

    The random tests in Python don't cover much and their value isn't random afaik. There is an open issue about that saying there are no random tests, closing this one. Adding a couple more of fixed tests isn't the solution. I guess a much wider range should be checked the question is how.

  • Custom User Avatar

    Two issues with attempts:

    1. returning 0 for 1221 (even number of digits in a palindrome) passes the kata, should require 2
    2. returning 1 for 1235 (1 or 2 bigger then interesting given number 1234 -> 1235) passes the kata, should only allow 0

    Those are two bugs I had in my initial solution that were not checked in an attempt. Having more simple test for those edge cases would be helpful.

    #python

  • Custom User Avatar

    As the instructions said that name is a property of the object 'Players', Also we can't target the name of the player unless we use the Key Value which is the name: the structure is like that :
    Players[{name: "a"}, {name: "b"} ... {name: "z}];

  • Custom User Avatar

    Looking at this and realising assembly does not seem that bad.

  • Custom User Avatar

    Hi. With Java I've got "Cannot invoke "java.lang.Integer.intValue()" because the return value of "java.util.HashMap.get(Object)" is null" on some tests
    I try to make sure that Objects I create aren't null
    with a (if myObject == null || if myObject.size() == 0)
    still have the same problem

  • Loading more items...