Ad
  • Default User Avatar

    I literally made sure, that it does check for multiple values in a really efficient manner, then realized it's only for 2 values in total.
    Wish I realized earlier...

  • Default User Avatar

    Really good Kata, had fun solving it :)

  • Default User Avatar

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

  • Custom User Avatar

    doesn't have random test cases atm

    So it should've been immediately be downvoted by everyone, but somehow I was the only one. It must have random test cases when you publish it (with very few exceptions). That's the current acceptable standart of publishing katas.

    At least a simple 'return 0' won't do the job anymore.

    Genuinely, how did it even survive to this point at all? It's good that non-solutions don't work anymore, but having 2 or 3 fixed tests in total is just embarrasing. There should be test cases for edge cases, considerations for performance requirements, etc. But there's none of that. Not to mention that this kata is very likely a duplicate (I remember at least 2/3 solved katas using the same approach).

    If the kata wasn't ready, you could've easily just put it back to draft, and published it once it's ready, but you just left lying around completely broken... Hence the rating, and retirement.

  • Default User Avatar

    Retired due to low satisfaction rating.

  • Default User Avatar

    Shouldn't be the case anymore, doesn't have random test cases atm, but later will.
    At least a simple 'return 0' won't do the job anymore.

  • Custom User Avatar

    The kata is sitting for 3 days with no tests at all, and yet it somehow has positive rating (including my downvote)?! What the fuck?

  • Default User Avatar

    Perhaps the portion of the Documentation on Random Tests can help you.

  • Custom User Avatar
  • Custom User Avatar
    • Sample tests noItemsJustMoreTimesDeclared and someNoValuesAsWellAsSomeHaveValuesAssigned are expecting incorrect results
    • Please remove unexplained weird special cases like "empty data containers"
    • Author's solution occasionally but reproducibly times out. The performance tests need to be more lenient.
    • Please provide number of random tests and input size in kata description.
    • Please use Markdown formatting and follow kata description [structure guideline]. The current conversational style has a lot of useful information but it's poorly formatted, completely mixed up, and mixed in with a lot of unnecessary words, so it's very difficult to refer to when coding.

    Some possible improvements

    • Better feedback in random tests: Consider adding a print every, say, 100 tests to let user know how much more to optimize.

    More comments in spoilered comment below:

  • Custom User Avatar

    Why don't you unpublish this kata in the meantime?

  • Custom User Avatar

    Coding style and practices:

    • items should be passed as a const reference to the user solution,
    • Snowhouse has EqualsWithDelta matcher, there is no need to calculate the tolerance by yourself.
    • Why are items represented as vector of a fixed size of 3? What's wrong with making them a dedicated structure, or at least a 3-tuple?
  • Custom User Avatar

    Still :
    ./tests.cpp:4:18: error: no matching function for call to 'amount'

  • Default User Avatar

    Will look into that, was super confused, when I saw your solution.

  • Custom User Avatar

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

  • Loading more items...