Ad
  • Custom User Avatar

    Smart observations: while I think my shortcomings mostly came from translating it while in lunch break (and talking with colleagues, on top of it), I would really like to see your fork/edit for this, once you approve it :)

  • Custom User Avatar

    Aww, come on, don't give up ;) When I wrote the test and the reference solution, I had like 5 hours of ruby experience. So you can do it, too :D

  • Custom User Avatar

    I get a "Parse error: Ruby is invalid." when I hit Test or Attempt.

    I guess Christmas is cancelled this year! I knew I should have been better...

  • Custom User Avatar

    Thanks for your feedback. I really messed that up. It's fixed now!

  • Custom User Avatar

    Fixed - thank you! :)

  • Custom User Avatar

    HA! Yes, it had a different name! I decided my original name (checkScores) made more sense, since it wasn't just comparing the results.

  • Custom User Avatar

    That got me thinking, and I realized I had another bug in my test: it was relying on assertSimilar, which (sadly) relies on the key order within an object. Therefore, if (for some reason), a solution had a different order for the results, it would fail while still being correct!

    I should eventually take the time to fork the kata test suite and add in better logic for testing objects. X-D

    Anyway, I fixed that, too.

  • Custom User Avatar

    OK, I've updated it with a better description, as well as moved the function into the test suite so it can be analyzed.

    (The function was already duplicated in the full test suite, anyway, to prevent someone from getting too tricky. :-)

    Thanks for the feedback!

  • Custom User Avatar

    Oh, thanks, I actually changed how the method worked about half-way through. I probably should just copy it into the example test cases, so it's easier to understand.

    I'll clarify it, too.

  • Custom User Avatar

    I have put a note in the description to clarify that.

  • Custom User Avatar

    I have noticed it is not simple to find existing Katas on a given topic. I typically do a search but get no results and suddenly somebody tells me it already existed. I guess it is because not all the time the title of the Katas is clear enough, but I think the search engine needs to be improved. Pretty much like Stackoverflow when you try to ask a new question. It shows you dozens of similar questios that may already answer yours. Perhaps in the future we'll have a feature like that here as well.

  • Custom User Avatar

    I agree I thinks it is very good that the test uses big maps, but I think it should be specified how big the largest map is. This might help people to get an understanding for complexity analysis of algorithms.

  • Custom User Avatar

    Allright, I see that I am a little outnumbered here :). I will add formulas suggested by wthit56. Thank you all for the feedback.

  • Custom User Avatar

    Nebril, this is it. CodeWars is about code, not about a physics lesson. Describe the math and let the coder figure out how to implement that elegantly within the constraints you specify.

  • Default User Avatar

    Thanks. It's fixed already.

  • Loading more items...