Ad
  • Custom User Avatar

    Too late to change, and this is not a good idea at all.

  • Default User Avatar

    JohanWiltink, i just thought that removing that detail from the spec would add a little more challenge/fun to the kata. I didn't want in any way to deliberately misguide anyone.

    I thought it was a logical step to return the entire alphabet when an empty string is passed as input, but clearly that's not true for the people that are trying to solve the kata.

    I'll change the spec.

    At this point it does not make any sense to pass an empty string as input, i'll pass only lowercase letters.

  • Custom User Avatar

    Hadn't read this before posting above.

    I just changed my vote on this kata.

    If you willfully hide booby-traps in a kata, you're going against everything I hold dear. Specifications should be complete; there is no place for surprises.

    Adding the puzzle tag feels quite misplaced on this kata. You're just unwilling to write complete specs, and it's unclear to me why. This is not a puzzle.

  • Custom User Avatar

    No language specified. Issue not reproducible. Closing.

  • Custom User Avatar

    The correct mark to display in monospace is not <xmp> but Markdown code block

    Also I have not touched the desc, i dont know what it looks like on your browser, but in the main page this is what i get
    Main page
    Maybe your browser have some custom styles (or mine)?

    You can have no worry click approve button, and you will get notice if there are merge conflicts. And you can edit your kata after that

    Anyway, changed.

  • Default User Avatar

    Solved

  • Custom User Avatar

    hi thnks for pointing to the >>> myJourney issue...
    i fixed it already...

    as for 'testAssertContains' i dont understand what you are asking for... as BOTH the
    Test.assertContains(Journey(5, "Dalston", "Crystal Palace"), "YES! You can make it! You will have £2 left on your card.");
    Test.assertContains(Journey(1, "Dalston", "Crystal Palace"), "NO WAY! Top-up £2 or more for this journey.");

    test cases contain the full string with the correct integer (credit remain on card when YES ... OR the amount missing (top-up) + full string sentence)...

    do you mean that i shall change Test.assertContains >>> to contain less? like "YES you can make it" AND "NO WAY!" ?
    OR do you mean that i shall change >>>
    Test.assertContains(Journey(5, "Dalston", "Crystal Palace"), "YES! You can make it! You will have £2 left on your card.");

    TO >>>
    Test.assertEquals(Journey(5, "Dalston", "Crystal Palace"), "YES! You can make it! You will have £2 left on your card.");

    sorry to ask this but i validated all test cases and they all come back as green. please explain what you think the problem is. and waht could be the solution.

    thank you.
    z

  • Default User Avatar

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

  • Custom User Avatar

    Ah yes of course you can't print before these specific tests because they're appendices to the tst right before them. Dunno if I should wrap the couple in a it though, it could make the ouput slightly overcrowded.
    Edit: Nah it's just clearer to wrap every parts of a single test in a it. Description updated and added a few other arrays as well.

  • Custom User Avatar

    Kata edited! The description and tests ouput should be clearer as what's going wrong. Also added input safety check directly in the example testcases so you can see what's going on.

  • Custom User Avatar

    Argh! Lost my answer in the limbs of Internet! Well, thanks for making me realize that I did it too quickly and didn't take enough time to make it clearer. So, what did go wrong?

    You are not supposed to modify the input array/list.
    It's just that I (originally) used the same matrix as input for your solution and the validator, and when blind4Basics told me that this exposes the kata to hacks I replaced it with the test that you failed.

    Which language was it though? It might not be very clear either but it should have shown you the expected value of the parameter array (unchanged) and the array after calling your function.

    Edit: Well, I can't update the kata right now because the server times out while trying o_O

  • Custom User Avatar

    Sometimes, regular expression is a good friend of string ;-)

  • Custom User Avatar

    Watch out for floating point errors!

    http://0.30000000000000004.com/

  • Custom User Avatar

    Just checked, its fine. Maybe you should look at your code instead.

    Also, if you have problems with your own code you should raise it as a question instead.