Ad
  • Custom User Avatar

    Trivial map/filter/reduce is not a novel kata idea.

  • Custom User Avatar

    Ruby 3.0 should be enabled, see this to learn how to do it

    Please organize the structure of test fixture as following (although it has been mentioned in the attached link, I'm repeated here again)

    describe "<This message should describe the categories of test groups inside this block>" do
      it "<A short message describing this test group>" do
        expect(...).to eq(...) #Assertions
        #Or Test.assert_equals(user_response, reference_response)
      end
    end
    
  • Default User Avatar

    The random tests are making problems some times it expects 18 and the actual result is 9 (I think this is appropriate) and some times it expects 9 in case I change the "magic number" to 18. My solution passed on random generated value but please fix the tests. Thank you.

  • Custom User Avatar
    • explicit edge cases for 11,22,33 are missing from random tests, unless randomized by (bad) luck. My solution does not even account for master numbers 22 and 33, and it's highly probable it will pass.
    • explicit edge cases 22,33 are missing from fixed tests, only 11 is covered by "Jesus"
    • Are numerology values like 15 or 21 correct, or should they be reduced further to 6 or 3? I'm not an expert on numerology, but implementation of tests do only single round of reduction, which for veeeery long words would end up with values not reduced to 1-9. Whereas the first online numerology calculator I tried, does full reduction until single digit is reached. However, random tests go only with words of 16 letters, so such case won't be encountered - which should be either changed, or mentioned in input specs.
  • Custom User Avatar

    Why return the square root of the digit sum of the string as a string instead of just returning it as-is (i.e. as a double)? It adds an extra unnecessary step to the process and is a prime example of an anti-pattern (i.e. a practice discouraged in production environments) because the resulting value cannot be directly used in calculations (at least not before parsing the double from the string returned).