Ad
  • Custom User Avatar

    Removed "clever" code, added normal code.

  • Custom User Avatar
  • Custom User Avatar

    I found the deescription confusing (mostly because of inconsistent use of terms), so I edited it accordingly. I tried not to allow any of my changes to provide spoilers, but only clearer communications about the requirements.

  • Custom User Avatar

    Changed it to include 2 left movement, not 1.

  • Custom User Avatar

    which you came up with, remember? Good point about the example.

  • Custom User Avatar

    I've got plenty of ideas that are not duplicates. However, if you can't solve most of my BF katas, I think you are gonna need to think for a bit on those. Stay tuned.

  • Custom User Avatar

    We don't have to worry about state, the star is used correctly here, if I understand what your concern is

  • Custom User Avatar

    Finally a YurichBRO kata that even I can solve :-) Thanks for the fun.

    I hope you can indeed create more installments in this series without duplication of existing kata. I would look forward to that.

  • Custom User Avatar

    Use built-in python integer division. And report a wrong case if it happens, not what you think could happen.

    Python random tests generator has a protection against generating division by zero in the expression, and there is no fixed test with division by zero either, so...

  • Custom User Avatar

    you're not saying that the tests generate such a case. you're not using those words. if it does, that is an issue. you're being vague about where 3 4 9 / / comes from, but I'm guessing you came up with it. which means it didn't happen in the kata. which means there is no issue to report.

    an issue needs to demonstrate the problem in a reproducible way. tbh, issue reviewers will probably dig more than they're willing to admit, but if your issue is incorrect and you're sharing something that's multiple steps of reasoning away from the bug itself, then the person reading your issue is not going to be making the same mistake as you and thus won't encounter anything being wrong and will therefore not "get it".

    I'm guessing your code divides by zero. cool. go debug it. start by finding out what input your code fails on.

  • Custom User Avatar

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

  • Custom User Avatar

    I prepared for this kata by reading about the Postfix Mail Transfer Agent. Only after doing that did I read the kata description :P

  • Custom User Avatar

    Nah, it won’t happen—I’ve added a line in the description to cover it.

  • Custom User Avatar

    Really enjoyed this, but I think the instructions should clarify the following:

    • Can a "hit" ever occur at the same location more than once?
    • And if so, how should the solution handle that? In other words, can we assume that the first hit at this location already caused as much damage as possible, or should the new hit cause further damage to the ship?
  • Custom User Avatar

    I was ashamed of the hard-coding in my first solution, so I came back and changed my medved function to iterate over (and test) all possibilities.

  • Loading more items...