Ad
  • Custom User Avatar
  • Custom User Avatar

    A 7 year ago Ruby issue with Random Generator is not resolved:

    Testing for "Xe7b1  2Tm8g2qKT"
    expected: "-..- . --... -... .----     ..--- - -- ---.. --. ..--- --.- -.- -"
         got: "-..- . --... -... .----      ..--- - -- ---.. --. ..--- --.- -.- -"
    

    Need to click some times to bypass the faulty cases.

  • Custom User Avatar

    Thanks. This is Day 5 of the real world war.
    I’m not writing this for compassion — I’ve already solved this kata. I just want people to see the truth about what's happening to the people of Iran.

    I solved this while sitting in my home in Tehran, under bombardment. The internet was restricted by the Ayatollahs. The electricity went out. I was alone.
    My girlfriend had to leave town after President Trump warned civilians to evacuate for their safety.

    I leave this comment as a memory of a war I believe will only end when the Ayatollahs are gone — and when they are, I believe the world will finally breathe freer, rid of a regime that fuels terrorism and death with drones and propaganda.

    We — the people of Iran — are not them. We are just like you.
    We dream, we build, we write code, we love.
    We want freedom, too.

    Let this solution and this comment stand not only as code, but as truth from someone who has lived through the silence of bombs and the noise of lies.
    ... --- ...

  • Custom User Avatar
    • random triangles are not right angled
    • reference area is wrong
    • many cases have price ≃ 0.3*area and the result depends on floating point approximation
  • Custom User Avatar

    In ruby the name should be snake_case.

  • Custom User Avatar
  • Custom User Avatar

    From what I can tell, none of the translations use fixed-length arrays or tuples, and none of the reference solutions make any assumptions of outer/inner array length. The phrasing in the description may be brief, but it is sufficiently language-agnostic and it is very clear what is being asked for.

    Regarding the test inputs all being 3x3, why not? The kata description makes no statements regarding input size other than the single example earthquake which is 3x3. Also, if a particular language's tests show the input upon failure (which they really should for a 7 kyu), having a smaller array will make it easier to debug your failing solution.

  • Custom User Avatar

    Based on the author's solution, there seems to be an implicit assumption that whatever the size of the outer array, is also the size of each of the inner arrays. If this is the case, it needs to be explictized (and will probably invalidate some answers). All the current tests hardcode a length of 3, and the random tests of the Python translation hardcode the inner array size as 3. The description should be cleaned up to sort this out, as it makes adapting this Kata awkward into languages that support tuples or compile-time sized arrays because each person who adapts this Kata seems to make a different set of assumptions.

  • Custom User Avatar

    Haskell fork

    • Added random tests
  • Custom User Avatar

    Not a kata issue! Your code has incorrect spacing count when encountered character is a space

  • Custom User Avatar

    Ruby should be updated to v3 (new test framework) + needs random tests

  • Custom User Avatar

    Approved, although sample tests should include the example in the description.

  • Custom User Avatar

    modified your fork a bit

  • Custom User Avatar
  • Custom User Avatar
  • Loading more items...