Ad
  • Custom User Avatar

    Passing the boolean values in as an array would make the code more readable and the booleans more navigable. Either way it is a lot of hard coding, unless you wanted to make it into more of a HashMap kata where the parts are the key and the boolean is the value of those keys. It's not bad though, I think it will be great.

  • Default User Avatar

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

  • Custom User Avatar

    We already have many katas asking you to "compare numbers and return a corresponding string", so it's a duplicate.

  • Custom User Avatar

    Modern era: 1911 - present

    I don't see how present is the same as 2019.

    Also passing an integer as a string is a very stupid idea...

  • Custom User Avatar

    Hi,

    Issue part:

    • your kata needs random tests
    • the "No items bought!" case should be in the sample tests too

    Suggestions part (for further kata creations):

    It's generally better to isolate the edge cases in different methods. For instance, current second and last assertions should both have their dedicated method

    About kata ideas, now:

    Note that your current/last publishing attempts all involve especially basic things. We already have plenty of that kind of stuff, so there are little chances that one of those get passed the "autoretirement thing": users who do beta are generally power users who really get bored with that kind of problems. For instance, I strongly doubt that your music history kata will "stay alive".

    Speaking for myself, I'll make an exception for the present one, because the way you setup your kata creates an interesting side effect: the task is mainly uninteresting/boring (sorry... ;) ), but it can be interesting for beginners, once they have solved it, since the kata can be redesigned to be solved in a different way. But I'm not sure others will think the same about it.

    I'll leave a comment under your solution: there are things you need to learn yet. ;)

    cheers.