Ad
  • Custom User Avatar

    I dislike it when "submit" tests completely hide what is tested and then catch you by surprise as you muddle through failed special case after failed special case -- this often turns what seemed like straight-forward and simple problem into a drawn out and unncessarily complex experience.

    Same. I've attempted several problems on here to find that I pass all the test cases but when I do the "submit" tests it fails. Just really frustrating and at a point I just move on from the kata.

  • Custom User Avatar

    As a CodeWarrior I dislike it when "submit" tests completely hide what is tested and then catch you by surprise as you muddle through failed special case after failed special case -- this often turns what seemed like straight-forward and simple problem into a drawn out and unncessarily complex experience. I also dislike it when a kata has "tricky" tests in the submit-tests but address it by burying the details in in text of the "details" section. My approach to deal with these issues for this Kata was to provide commented approaches with a second comment about the problem with that particular implementation. My approach gives both a hint on what the "submit" tests will enforce while educating on why that approach is bad. edit fixes double-mention about flaw comments

    MinBy is an eager LINQ operator -- meaning it immediately determines its result. For another challenge of implementing a different kind of LINQ operator you might try my SelectConsective kata.

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    Check the docs what are parameters of Enumerable.Range. I also got tripped by this once.

  • Custom User Avatar

    Log
    Low: 8, High: 97
    Test Failed
    Expected is <System.Int32[90]>, actual is <System.Int32[97]>
    Values differ at index [90]
    Extra: < 9604, 9801, 10000... >

  • Custom User Avatar

    What kind of error?

    Your range isn't really correct, try to look at error messages to see why.

  • Custom User Avatar

    why doesn't my statement work for the square function? It works for the samples fine but when I run the attempt it always gives an error.

    var result = Enumerable.Range(start, end).Select(x => x * x).ToArray();

  • Custom User Avatar

    I came to the comments solely to make sense of the parameters given since they were so poorly written. Thanks for elaborating on them.