Ad
  • Default User Avatar
  • Custom User Avatar

    Just curious, what does output handler have to do with any kind of randomness?

  • Default User Avatar

    Done.

    The default output handler of busted automatically sets a random seed, but the codewar output handler doesn't. I think a better way is to set the seed directly in the output handler.

  • Default User Avatar
  • Custom User Avatar
  • Default User Avatar
  • Custom User Avatar

    Okay, thanks for the feedback :)

  • Custom User Avatar

    I published the new kata according to what @Kacarott pointed out.

  • Custom User Avatar

    In my opinion it is OK for different languages to have slightly different return types if it is more ideomatic for that language. Python could return a Fraction and other languages without fraction types could return tuples. The initial solution could make it clear what the return type should be.

  • Custom User Avatar

    I've made a sketch of it; could you please check?

    I left out the story because, looking back at it, it's kind of creepy and weird, which I guess was the point, but I'm not a fan of it anymore, and I'm also out of creativity to make a new one.

    There are a few more points I'd like your input on before publishing:

    • Should I retire this kata? And if I do so, should I take its name for the new one?
    • The maximum values are kind of low right now; simple solutions are able to pass; should I increase them to make an expected solution closer to yours?
    • Regarding Python and Fraction, I could make it so you can return either a Fraction or tuple[int, int] and leave a comment on the initial code warning the user of this. It won't affect other languages if this gets translated, but it also removes the inconvenience in Python. I'm just wondering if there are any problems with this.
  • Custom User Avatar

    God, it pains me to read the things I wrote just a year ago.

    That seems like an interesting idea. I'm rewriting the tests at the moment, and I'd like to have your opinion on a few things.

    • Should I make this about performance? Your approach seems to be considerably faster than a standard solution; it wouldn't be hard to timeout most current solutions. Now, I don't know if that would be fun.

    • Should the user return a Fraction or tuple[int, int]? I feel like everyone will end up using Fraction, but by making the user return tuple[int, int], you don't force them to do so. It seems a bit minor, but I'd like to have your opinion on it.

    • Doesn't it make more sense to retire the kata and create a new one? All the current solutions will be invalidated, and the current feedback won't reflect on the actual one, both regarding satisfaction and difficulty.

  • Custom User Avatar
  • Default User Avatar
  • Custom User Avatar

    How ? I don't have the Republish button anymore --- only Publish ? Should I press it ?

  • Custom User Avatar

    You've closed the issue before fixing it. Better to fix it first.

  • Loading more items...