You need to sign in or sign up before continuing.×
Ad
  • Custom User Avatar

    It was a joy to code. Unfortunatly, the high performance demand of the tests required sacrificing some of that joy while seeking better performance. Overall, nice kata. Thanks.

  • Custom User Avatar

    Accidentally submitted this when attempting to run the tests again after undoing a change. Oops. I would have cleaned this up, but at least it works. My first attempt at cleaning and extracting some of the duplication was too slow, so I undid changes until I got to the previous working state.

  • Custom User Avatar

    Fun fact, the bitwise operators can be used in boolean equations to prevent short circuiting. If you need both sides of an OR to run, use | (although maybe don't have boolean checks with side-effects).

  • Custom User Avatar

    When I did my solution for the first Battleship field validator, I wrote it will the possibility of adjacent ships then noticed the non-adjacency clause and added that to my code. If I had realized that clause sooner, I would have coded it very differently. This kata made me feel better about the way I coded it, since all I needed to do was to strip out of adjacency checks. Code re-use for the win.