• I changed it to:

    "If any pair of consecutive words fails to mesh, your code should return "failed to mesh"."

    Is that acceptable? Clearer?

  • I would word it something like If any pair of words fails to mesh, you should return "failed to mesh".

    If all the words don't mesh together, then your code should return "failed to mesh"
    sounds like every pair of words has to not mesh in order to return 'failed to mesh'.

  • I knew I had touched the random tests but wasn't sure why or how, but nah I don't think I weakened it (or strengthened it).

    I mixed in some cases with duplicated words and made it less random in what it chooses to test. There's no attempt at completeness in testing though, that'd take some re-inventing of things. I sprinkled on some extra cases of my own but who knows if that makes any difference I'm just amusing myself tbh xD
    updated python
    If you're not willing to review/approve that's fine, I'll ask elsewhere.

    I'm not feeling too responsible for other languages (I just wanted to make sure to fix it in case it was my fault when I touched the python version a couple days ago)

  • Sure, no problem. It's also the same with Ruby.

  • Thank you that really helps. Will get back to it later today when I have the time to retrace my steps and reevaluate what I did. It's definitely weak, doing a single very specific thing to generate non-meshing inputs.
    (getting back to the python version anyway - since I very recently touched it)

  • UPDATE: JavaScript has the same issue.

  • How did you figure that one out?

    I was trying to create an early return condition based on string length. Luckily, it did not pass the first run, but I noticed by only one random test. So, I ran it again and it passed.

    Here is an example of a solution that mishandles this.

    I suggest that the random generation of arrays should (at some mimumum frequency) simply insert a doubling of one of the strings somewhere in the array.

  • Oh. Okay (: I'll take a look at that and whether I managed to introduce that weakness compared to previous version. How did you figure that one out?
    Do you you have an example of what it should/shouldn't do or an example of a solution that mishandles this? Any suggestions on how to generate better tests? Simply forcibly add a couple of those or generate them differently altogether? Maybe there's another language with better ones?
    Not trying to get you to fix it for me, fishing for whatever information you might already have.

  • Python: Incorrect solutions that mishandle cases where consecutive words are identical can pass the kata. Random testing needs to be strengthened to assure more such cases.

  • i guess i didnt read it properly.

    thanks a lot!

  • If all the words don't mesh together, then your code should return "failed to mesh".

  • Where in your mesh are chlorine and brinemore?

  • i am getting this message when trying to submit my solution:

    word_mesh(['chlorine', 'brinemore', 'oregon', 'gonzaga', 'gambino', 'inoculate'])
    'oregongaino' should equal 'failed to mesh'

    unless i got something wrong, apparently my code is producing the correct output and is not being validated as a viable solution. I cant see how this list is not "meshable"

    Can the creator of the kata check it?

  • merged

  • Loading more items...