Ad
  • Custom User Avatar

    That's a fair point. I have changed part of the description to match my previous explanation:

    "At least 30min (0.5) is needed between each show (in order to make it to the next venue!) This means that if you see a 1 hour long show at 6pm (6), the next possible show that you could see would be at 7:30 (7.5) or later."

    Do you feel that is more clear now?

  • Custom User Avatar

    This is true, thanks @kontic! I have changed the description to reflect it!

  • Custom User Avatar

    I'm sorry but I'm not sure exactly what you are asking. Your example seems to fit with what I was trying to describe so maybe my description was unclear?

    Yes, your example would work, as the show goes for 1 hour (1), which leaves 30 min (0.5) to get to the next performance. You would in that case be able to see both. If on the other hand, the second show started at 7, you would not be able to make it as there wouldn't be the minimum of 30min buffer time. Is that more clear?

    Thanks for your feedback!

  • Custom User Avatar

    Thank you!
    I was having trouble with assertEquals and didn't realize that assertEquals was much better!
    I have also tried to implement all of your other suggestions.

  • Custom User Avatar

    I definitely didn't intend that, thanks for pointing it out! I have changed it now so that it should return either 1 or 2, rather than 0 or 1.

  • Custom User Avatar

    That's a really good point, thank you! I have added that should that situation arise, you should select the cheapest show in that time period. If there are multiple shows at the same time with the same low price, you should select the first one in the list.

  • Custom User Avatar

    Added a number of fixed tests to the kata.

  • Custom User Avatar

    I believe that adding fixed tests as you suggested in another comment has resolved this problem!

  • Custom User Avatar

    Thanks again for all of your suggestions! I cant find the option on mobile, but as soon as I get home I will un-publish and work through these issues.

  • Custom User Avatar

    Really appreciate the feedback @JohanWiltink! I was just looking to create something that pushed people to practice destructuring. Just like you said though, I couldn't think of anything that absolutely required it (which is probably why I got too focused on implementation). I will look into creating a kata with something else in mind in that case.

  • Custom User Avatar

    I found it hard to understand destructuring myself when I was learning it, so I thought that it would be a good opportunity to do some research and create a kata for the purpose of practicing destructuring. When I was doing some research I found that you could use it within function declarations which I found interesting, so I thought that I would focus on that in order to make the kata clear and precise.
    Unfortunately it looks like in doing so I focused too much on implementation, as you have pointed out. Moving forward would you suggest to focus on some kind of problem that needs to be solved? I think I got distracted by trying to be too specific. Do you have any suggestions for how to avoid that? Thanks so much for your feedback!

  • Custom User Avatar

    That's fair @requnix! In that case though, it might be worth mentioning something in the description? I went through some of the discourse here and didn't see where you had mentioned that previously. I think not being aware of certain things up front is what makes this kate frustrating.