Ad
  • Custom User Avatar

    Ahh, I forgot about slice_when. Really nice solution!

  • Custom User Avatar

    This would have been nice to know going in. I wound up with these numbers hard-coded based on test cases and had no idea why.

  • Custom User Avatar
    • I'll advocate removing the tests for invalid values. If that occurs, it's a bug in the calling code, not the lib. I think the lib should assume valid behaviour, or possibly raise specific errors, but definitely not mask the bug by returning false

    • The Ruby setup is syntactically invalid, and Ruby's predicate is a suffix of ? rather than a prefix of is_, hence:

      class Sudoku
        def initialize(board)
        end
        def valid?
        end
      end
      
    • Other than that, nice kata :)

  • Custom User Avatar
  • Custom User Avatar

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

  • Custom User Avatar

    The site would be much more engaging for me if I had a sense of progress. As a reference, see Project Euler's "progress" page, which shows me the last 25 that I worked on, and shows me all the problems that I have and haven't solved, so I can back in and try to fill in the gaps. Currently, I often feel like I somehow happen to arrive at a problem, with no real sense of how I got to it, how to find it again, where it's at in the sea of other problems, etc.