Ad
  • Custom User Avatar

    ah yes, now it makes more sense :)

  • Custom User Avatar

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

  • Custom User Avatar

    Thanks! Completely misremembered how Object.seal works, and forgot to seal Cube anyway after moving some helpers to it as static methods.

    Should be pretty sturdy now.

  • Custom User Avatar

    Thanks for taking the time. I now completely removed the "Cheating" section, the main point to get across was that googling is not cheating

  • Custom User Avatar

    You can republish the kata after having found a robust way of dealing with these issues.

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    There's surprisingly few katas about the basics of dealing with multi-dimensional arrays.
    The 6kyu or lower ones, beginners don't really know how to start tackling.

    A kata about how to simply build 2d arrays of various sizes, emphasizing the difference between (x,y) and (y,x), and finding the index of each cell, is a good way to bridge the gap

  • Custom User Avatar

    Hi, thanks for the continued checking of the kata :)

    I don't remember fixing this, but it's fixed now, another thank you if you did it yourself.

  • Custom User Avatar

    The case I was surprised there was no test for was 1 + x + 2 should simplify to x + 3, but I definitely had fun regardless

  • Custom User Avatar

    (for the record, this discussion had a follow up on Discord)

  • Custom User Avatar

    I see thanks, I had no idea that discord existed!

    That was 24hrs of 4-8hrs over several days while I have a full-time job. I would have happily continued with this kata without workarounds if I knew, and if the tests accounted for some of these kinds of cheats (which many katas do) that would have been an easy way to realize it was indeed a cheat and not an intended solution. The moment I saw that the other answers weren't cheats I started writing the comment, which if you can't see, is also marked a "suggestion" to add a one-line test that I would be surprised would be left out if not intentionally. But it happens. The clues I refer to are some of the other comments in the discourse, that talk about "rewriting from scratch" and using different approaches. I originally considered those to mean using a different mathematical approach, but over time I started wondering. Would have been fixed by a one-line test.

    And yes I was slightly surprised that a 1 kyu kata might be solved with a workaround, but maybe that was exactly the point of why it was hard. Knowing that you can do the workaround is not to be expected, and getting there requires some relatively creative thinking. The test that would invalidate it would simply be helpful for people approaching the task normally. I haven't solved a lot of 1kyu katas, but for other kyus it's pretty common to have that kind of test or something that would invalidate the workaround. Maybe figuring out that wasn't being tested for was the challenge, I had no way of knowing. Also note this kata is marked as the easiest 1kyu. And for those that can't see the original comment: the workaround is not messing with any test functions or codewars/test internals, it's standalone javascript: I was returning an array of 4 elements that when squared and summed led to the answer, it was just enough in the spirit of the challenge that I figured that might be it. A similar argument can be made that a 1kyu kata might need to be better tested than higher kyu katas, but I don't know if that's really the case.

    I admit I did not see the tags at all, when you pointed those out I did feel pretty dumb. For sure in the future I'll double check on the discord or post a comment on the discourse before submitting an answer that I'm not 100% sure is in the spirit of the challenge. I already felt like I was cheating a little bit by looking at guidance on the discourse, let alone get help on a discord, but good to know that's better than experimenting yourself to see if you can solve the challenge, given your solution might not be in the spirit of it. I don't think I should have been penalized, or at least I should now have been able to submit another solution and get my score back, and my request for a one-line test shouldn't have been dismissed, and the fact that I immediately pointed it out in the discourse with a lengthy and respectful comment should have been rewarded rather than penalized.

    I'm clearly still a bit upset over losing several days of free time in the context of codewars score, but that's life, I'll move on. I'll look for the discord now, see you there :)

  • Loading more items...