Ad
  • Custom User Avatar

    Yeah my code doesn't assure that this mix of "text", "number" always occurs, it just "goes" with whatever input has, just raised the issue because I thought this rule was a rule that the tests always followed. Thanks for clarification πŸ™

  • Custom User Avatar

    it is stated that text and numbers alternate, which it does not do in your output

    it is however a problem that the tests don't consistently catch that

  • Custom User Avatar

    JS test gen does not obey given constraint:

    Following this rule, each number tested begins with encoded text and ends with an encoded number.

    After the text, there is a binary number.

    Testing for '1051209811098120113115108121126110981198106105112122117981198116102108124981001000010010098114110120119108101121111114116'
    It should work for random inputs too - Expected: 'et, 6, tmohuzj, 3, felvq, 3, pbhx, 9252, njtshauknp', instead got: 'et, 6, tmohuzj, 3, felvq, 3, pbhx, 9252'
    

    expected answer ends in text, it should end in a number

    Ruby as well:

    expected: "opbkrfrpk, 542, toixqsrtx, 4, hfvzzgyiuy, 344, uvr, 7, krrk"
         got: nil
    
    (compared using ==)
    

    and Crystal:

    Expected: "stxaifmr, 6, zqnigbynah, 6425, albief, 1098, etmf, 788, gxxbuyvc, 84, uksexpybwkyei"
         got: nil
    
  • Custom User Avatar

    It's your solution. Your solution fails on inputs where encoded text could also be a binary number, and you can see it in the output of the test that you included. Expected: 'wrqjvi, 0, dubb, 13, j... Your solution produced: instead got: 'wrqjvi, 0, dubb, 13, 6..., notice that you have two numbers in a row? Because j is 110, which can also be interpreted as a binary number. Your solution will fail on similar tests, you can add this to the sample tests: Test.assertEquals(decode('1011011011019800110110'), "aaa, 54"); to see it failing in real time.

    You just got lucky when you resubmitted your solution and the tests didn't generate a case like this one. The random tests might need to be hardened to make sure to include a "tricky" case like this, but as it is, there is nothing going "wrong" with the tests.

  • Custom User Avatar

    Really fun kata, just a minor issue with a random test.
    I don't have the best solution ever but I encountered a random test that my code fails (49/50 tests worked), one resubmit did the job to register my code as a valid solution.

    Raising an issue as I don't have a clue if this test breaks a declared constraint of the kata or it's just my solution.
    Test:
    Testing for '12311811711012210998098104121102102981101981109811000101000001109811612510310511411111910711598100100100010101019811810112511711810498100110011101198119105110120111104104981101111110001111' It should work for random inputs too - Expected: 'wrqjvi, 0, dubb, 13, j, 50438, pycenksgo, 74837, rayqrd, 4923, sejtkdd, 57231', instead got: 'wrqjvi, 0, dubb, 13, 6, 50438, pycenksgo, 74837, rayqrd, 4923, sejtkdd, 57231'.

  • Custom User Avatar

    Leading zeroes must be discarded in Python too.

  • Custom User Avatar

    Had to do a research to refresh some concepts haha, nice kata as always :p

  • Custom User Avatar

    Really simple yet cool kata :D (I took the easy way)

  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar

    TL;DR (sorry 4 the yapping): bad title and really weak tests (maybe consider a proper "Issue" tag for tests).

    About tags:

    • I would consider adding the "ASCII Art" tag.

    About tests:

    • Definitely add heavier and/or more random tests. Also, make sure the tests cover odd sizes, as currently, there's only one test with an odd size (5).

    About the kata itself:

    • Personally I would add sizes from 0 to 4, I know they don't exactly form a "wave effect matrix" but they can be easily generated. However, there's nothing wrong by keeping the "size >= 5" constraint.
    • Lastly, I'm not a big fan of the title but I would at least add a space before the parentheses start.

    Really nice yet simple kata, hope you update it :D
    It's a simple kata that perfectly fits the 6 kyu range, hope I see it approved soon. πŸ‘

  • Custom User Avatar

    Fun kata, my solution is kinda sloppy but hehe.

  • Custom User Avatar

    It's a really interesting fact about palindromes that I didn't think of. I really liked this kata πŸ‘

  • Custom User Avatar

    Nice one, I struggled a bit because I did not read correctly πŸ€™

  • Custom User Avatar

    Do not raise an "Issue" to ask a question, you should be using "Question" tag even if you think there's an error on the tests.
    Read the description of the kata again, that array contains all rotations of "bsjq" meaning that the function should return true, it does not matter if there are extra strings.
    If the input array contains all rotations of the desired strings return true, simple as that.

    If any mod is reading this, you can mark it as "Resolved" πŸ‘Œ

  • Loading more items...