• Custom User Avatar

    From the description you can say that all parameters will be separated by space, and the testcase when they may not be separated by such is an extra one and not required for solution:

    Each switch or parameter is separated by a space. (For an extra challenge read: It is not mandatory that each element is separated by a space.)

    However, the actual testcases DO include that extra challenge, and due to the nature of test frameworks and Codewars itself, the kata can be completed if only all tests are passed. That means that extra challenge is actually mandatory for completing the kata, thus contraditing itself :/

    Either explicitily make that requirement as required (then the difficulty should increase from 6-5 to 5-4) or exclude that case at all or insert it as sample test.

  • Custom User Avatar

    Marked issue as resolved

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    Hi Voile, I'll checked the acceptance tests and specification and found out, that they are correct.
    I updated the description and added assertions in the test to make things more clear. All other hints in the next reply, since they contain spoilers.

  • Custom User Avatar

    This doesn't fully resolve the issue: -u http://abc.com/ falsepage.html should throw IllegalArgumentException because http://abc.com/ falsepage.html is not quoted, and must be parsed as ["-u", "http://abc.com/", "falsepage.html"], which is invalid.

  • Custom User Avatar

    2023-10-11, Republished the kata:

    • breaking change in the Interface: enterUrl() now takes a String and not an URL object. This change will make former solutions invalid. (anyways, thanks to Voile for pointing me to it)
    • fixes for the issues mentioned with the acceptance tests trying to get a return value from void parse() and passing the initially given tests (thanks to Abbe and Darnor). For some reason my former changes were not there anymore.
    • reworked the siren giving "sounds" (thanks to mawh)
    • refined the description text
  • Custom User Avatar

    Hi Voile, thanks for your feedback. I looked into it and find you are right. The Machinery indeed does not check the keyboard input itself but relies on the interface to only be fed a valid URL.
    I have republished the kata with a changed Interface. The url must now be given as String and the Machinery will give proper siren howls if the URL is malformed :)

  • Custom User Avatar

    Absolutley! :D
    I fixed the description. Your comment also inspired me to make the siren sounds more prominent :)

  • Custom User Avatar

    Tricky, a phrase like "the siren will go off" - does it mean it starts making a noise, or that it stops making a noise?

  • Custom User Avatar

    This kata's requirement does not make sense: -url "http://www.codewars.com or -u http://abc.com/ falsepage.html should simply not parse, because they are invalid.

  • Custom User Avatar

    Wow. I couldn't think of that. Thanks.

  • Custom User Avatar

    For future readers Collections.sort(..,Collections.reverseOrder());

  • Custom User Avatar

    I just added that the matrix is quadratic. Thanks for the suggestion!

  • Custom User Avatar

    I agree.
    Unless the list is immutable, which I am afraid that we could not guarantee merely from the description of the Kata.

  • Loading more items...