Ad
  • Default User Avatar

    Yes, it should be a 6 in my opinion too, but this is the average rating given by the beta solvers. This is basic CS stuff, so I guess people with CS background will rate it as easy.

  • Default User Avatar
  • Default User Avatar

    Resolving Haskell katas has become a pain in the last weeks. Most of the time the requests time out. Sometimes I have to hit Run Examples or Run suite several times in order to get a successful execution.
    It fails much more often than it succeeds.
    Today I get this output no matter what:

    {"stdout":"","stderr":"Process was terminated. It took longer than 6000ms to complete\n","status":"max_time_reached"}
    

    The status page shows everything is operational.
    Any idea what is going on with the Haskell environment? Javascript works ok most of the time (although there are frequent timeouts there too)

  • Default User Avatar

    Yes, that's what I said: Damjan fixed it, but I was suggesting to try the above (hardcoding those values) without his fix and try to figure out why it was not working, and why Damjan's changes fixed the issue.

    You might find it interesting, learn something, and save yourself a lot of trouble in the future by not making the same mistake.

    Anyway, that's up to you, I'm done with the suggestions on this matter. There is a random factor to the tests so were good. Thanks for considering my suggestions and improving your test.

  • Default User Avatar

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

  • Default User Avatar

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

  • Default User Avatar

    Then why do we have to write tests to validate the solution?
    Let's write no tests at all and just trust everybody is correct and writes a proper solution. :)

    I still argue that tests need to prevent cheating as much as possible, there are cheaters out there unfortunately.
    Look at the other katas you resolved, at their tests. I would say that a very large majority have random tests.

    I know, I don't like it very much having to write such tests either. But I take it as a challenge, and there is really something to be learned from writing them and putting yourself in the shoes of a cheater.

    "Clearly the real purpose for the site is about the intrinsic value of getting better at coding and not the extrinsic value of earning points. At the same time, even if it is all about the self-improvement, its kind of awesome to work hard and see yourself climb the ranks. There is something also to be said for its ability to act as an achievment on a CV. So... cheating does need to be handled when it happens."

    (jhoffner in https://github.com/Codewars/codewars.com/issues/214)

    You marked the issue as fixed, but it is not really.

  • Default User Avatar

    I only solved the JavaScript version of the problem you mention, so I can only guess about the Python translation.

    By looking in the JavaScript test cases, I see it uses the same MySolution function for testing purposes, but it has a guard to prevent its usage in solutions:

    var mySolution = new MySolution();
    Test.assertEquals(mySolution.getCallCount(), 0, 'Hey, now, stay out of my solution');
    

    I would expect a similar kind of check in Python tests.
    So, either this check is not yet in Python tests, or it was introduced at a later date, after the cheat solution you mention. Or maybe the author himself submitted it in the early stages of the kata?

    If Python does not have this check, then it should be marked as an issue in the kata for the author to fix it.

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

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

  • Default User Avatar

    Had fun on it, thanks for the kata. But you need some random tests. I was able to pass a solution that had month 12 hardcoded in the regex.
    The tests that validate the solution should be more complex than the sample tests, and should ideally cover all possible inputs.

  • Default User Avatar
  • Default User Avatar

    A Haskell translation was done and no action taken for more than two months.
    Is there anything that can be done in case the author is no longer active to approve it?

  • Default User Avatar
  • Loading more items...