Ad
  • Custom User Avatar

    You are right, it can be frustrating for total beginners.
    Maybe it's just that I disagreed with blaming it on the description of the problem.

  • Default User Avatar

    Even an 8kyu kata can be frustrating if you're just starting out. You had to learn once, too.

  • Custom User Avatar

    Description is not 100% accurate, it should say if days are greater than 2 and less or equal to three then ripe.

  • Custom User Avatar

    'If the difference is exactly three days, return'

    not exacly it's more like more then two and less then ore equal to three

  • Custom User Avatar

    this helped me solve the kata, thx

  • Custom User Avatar

    Is this kata working? One of the random tests gave me a difference of 48.5 hours between days and it was expecting Perfect, anyone can explain?

  • Default User Avatar

    The description does not match the test cases, unless by some stretch 0.00001 of day #3 is considered a "full day" so that 2.00001 days is interpreted as "exactly three" full days. It is not the normal meaning of the word "full day", at least where I live, to consider any miniscule sliver of a fraction of a day as a full day. Quite the opposite, actually.

    The description says:

    ...the number of full days...
    If the difference is less than three days, return the string "Not ripe yet"
    If the difference is exactly three days, return "Perfect!"
    If the difference is more than three days, return "Too far"

    The test cases actually test for this:

    If the difference is two days or less, return the string "Not ripe yet"
    If the difference is more than two days but not more than three days, return "Perfect!"
    If the difference is more than three days, return "Too far"

  • Default User Avatar

    Maybe you could state in the description that the input for the function will be an object, I was a little confused about that.

  • Custom User Avatar

    I've updated the test cases, both issues should be fixed. Cheers!

  • Default User Avatar

    The 3 days exactly doesn't seem very intuitive, as you get perfect for 2.01 days and too ripe for 3.01 days.

    Also, the tests in JS have an extra parenthesis. E.g:
    Test.assertEquals(avocadoChecker((new Date(2016, 01, 01), new Date(2016, 01, 03)), "Not ripe yet", "Should return "Not ripe yet"");

    should be

    Test.assertEquals(avocadoChecker(new Date(2016, 01, 01), new Date(2016, 01, 03)), "Not ripe yet", "Should return "Not ripe yet"");

  • Custom User Avatar

    Fixed, cheers!

  • Custom User Avatar

    I've reworded the description to make it clearer that the test cases are looking at full days, thanks for pointing that out.

  • Default User Avatar

    Differences like 2.4 days are considered perfect which is not clear from the description:

    If the difference is less than three days, return the string "Not ripe yet"

  • Default User Avatar

    The example test cases use non-Date arguments.

  • Custom User Avatar

    Yup, sorry, forgot to change it before I published. Fixed now, thanks!

  • Loading more items...