Ad
  • Custom User Avatar

    Very fun kata! I really like practical (data/analysis) puzzles like these.

    I've made a PHP translation, if you're okay with that, I'd appreciate a review.

  • Custom User Avatar

    I think the risk of being marked/banned as a 'cheater' for anything to do with this particular kata is low.
    It turns out to be very challenging to write a mystery puzzle like this and not inadvertently leave in some way to beat it the 'wrong' way.

    If you have some more information about what happened, and it is something that can be fixed in the kata itself, it should be fixed, of course!

  • Custom User Avatar

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

  • Default User Avatar

    Fun small-scoped kata. It's really is one of those challenges that you run across in practice.

    Very tiny improvement: fix the typo in test_it_wont_assign_people_to_who_they_gifts_to_last_year to test_it_wont_assign_people_to_who_they_gave_to_last_year.

  • Default User Avatar

    Great! I'll use that approach instead of the spy, that's much cleaner. Updated again.

  • Default User Avatar

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

  • Default User Avatar

    Woah, thanks for pointing this out!
    So die() is not considered a failure? That's a shame; I was looking for a simple way to do this; do I have to resort to a 'spy'-solution, where I use state to detect 'incorrect' calls and fail them in the test, instead?

  • Default User Avatar

    Bonus points for naming: Unraveller and ->unravel().

  • Default User Avatar

    I was, but I was wrong. Somehow it never popped up for me on many runs, even though the bug was still in there.
    I am sure it's fixed now, though, updated again.

  • Default User Avatar

    I've made an update that forces an element of the puzzle that was unintentionally optional and prevents some 'brute force'.
    This is likely to invalidate current solutions. Sorry ;]

  • Default User Avatar

    Increased the random amount to at least 100.

  • Default User Avatar

    Fixed!

  • Default User Avatar

    Good catch! I'll fix it. I thought I made it impossible for that to happen, but I guess I missed a duplicate value somewhere.

  • Default User Avatar

    Fair enough, I can easily increase the amount. Since the tests are fasts, I don't see a downside.

  • Default User Avatar

    Yup, looks like you won the brownie prize :D

  • Loading more items...