Ad
  • Custom User Avatar

    Resolved in above fork

  • Custom User Avatar

    Resolved

  • Custom User Avatar

    pravoozed

  • Custom User Avatar

    Python fork

    • Address the print and input mutation [issue]
    • Address the snake_case [issue]
    • Added the examples in the description as fixed tests.
  • Custom User Avatar

    In python, the tests log the inputs for some reason (please remove all print functions from tests).

    But more importantly, the tests are vulnerable to users mutating the input

    test.assert_equals(operationArguments(testArr), testCaseOperationArguments(testArr))
                                          ^^^^^^^                              ^^^^^^^
    

    In fact, mutating the input causes random tests to consistently throw an error.

  • Custom User Avatar

    Python: function name should be snake_case

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

    Please approve this fork addressing test suite maintainability, futureproofing, and robustness, and description consistency.

  • Custom User Avatar

    This is a good Kata! Maybe I'm just stupid, but it took me forever to notice that the 'Window' of the submarine was an 'O' and not a '0'. My RegExp suffers.

  • Custom User Avatar

    Having an example of "how not to do it" in the description is not working for me. I'd suggest just taking that out.

  • Custom User Avatar

    I have removed the reference solution from the fixed tests.

  • Custom User Avatar

    Fixed tests should have fixed expected values. Do not rely on a reference solution, as the "with functions" fixed test does.

  • Custom User Avatar

    Please read https://docs.codewars.com/authoring/guidelines/description.

    I'm not complaining about lack of clarity, I'm complaining about specification by example, which in practice is an invitation to solvers to read author's mind, something solvers are notoriously bad at.

    ETA: just noticed that you already updated the description. what you have now is not bad at all! it could be more clear that multiple functions working on a single argument result in a single element in the output; [0,inc,dec] could also result in [1,-1], but that's not the intention. the "collapsing" could be expanded on, or an example could specifically clarify this ( this is what examples are for! ).

  • Custom User Avatar

    I had to guess what to do from the examples, because the description does not say:

    • that numbers that are not followed by a function should appear as-is in the output
    • that "closest number to the left" applies to the output array being constructed, not to the input array, i.e. functions can be called with the result of the preceding one
  • Loading more items...