• Custom User Avatar

    Honestly, I don't think Cyrillic vs Latin would matter at all to someone who doesn't know Russian. I'd just be copy and pasting everything either way, so if Cyrillic is easier for Russian speakers it seems fine to me.

  • Custom User Avatar

    Writing this through my phone, no access to the laptop.

    I have noticed the tendency of people creating their own dictionaries for this kata, instead of using the given ones. And honestly, I don't blame them. The current description is still a complete dogwater, even after so many issues resolved.

    I'm highly considering on removing the dictionaries entirely and make the description only in Latin. For Russian speakers, I will just put a disclaimer, saying that they don't have to read the following instructions and that the Cyrillic inputs will be valid. But I have a dilemma with russian_to_num(). Should I keep its inputs Cyrillic or change it to Latin?

    If you have any more suggestions or you see a problem in my considerations, please, share them. When I arrive home, I'll get on fixing them, since this kata was abandoned by me since the end of May.

  • Custom User Avatar

    A few suggestions from someone who knows zero Russian:

    • I'd definitely prefer just sticking to either Latin or Cyrillic, rather than the mix of both. I understand you're trying to make it easier, but I don't understand Russian regardless of the script, so I'd rather not understand one thing than two.
    • Currently the paragraph about gender omits Cyrillic, as opposed to the rest of the description which uses both.
    • I'm not sure why you've complicated the description of "десятых", "сотых", "тысячных", and "десятитысячных". If I'm understanding correctly, they have direct English counterparts of "tenths", "hundredths", "thousandths" and "ten-thousandths" and are used the same way.
    • Same thing with translating "целых", googling this tells me this means "whole" or "unit", which makes sense (5.2 is "five whole units and 2 tenths") rather than "replaces the dot". It also clarifies why 1 might be a special case.
    • I might just omit the preloaded dictionaries. Figuring out why some values are included and others aren't is harder than just building your own dictionary and including whatever you want. Even in your own solution you ended up extending the dictionary for the teens.

    Could definitely be a cool kata, but the above were some pain points for someone coming in with no background.

  • Custom User Avatar

    I've updated the description with a detailed specification of the input.

  • Custom User Avatar

    You need to specify the input in the description. e.g. the image is represented as single char * split over multiple lines, it will always have length/width of blah, holes in circles will never include the circle's edge, etc.

  • Custom User Avatar

    When there's a misspelling, it's difficult to know whether the case should be preserved without considering wider context, for example is it the first word of a sentence? But you're right that my solution assumes that the case should be preserved if it's a single letter. Let me modify the description to clarify this.

  • Custom User Avatar

    Looks like there's still one underspecified case, when the word is a single uppercase letter. It seems from tests that it's supposed to capitalize the first letter of the result, even if that letter wasn't in the original text? e.g. F -> If

  • Custom User Avatar

    That still leaves this test in a confusing spot:

    text: "WOULD'NT"
    word_list: ["wouldn't"]
    

    As the 'N' is in the incorrect position, but remains uppercase in the expected result.

    Edit: Nevermind, I just understood the entirely uppercase exception.

  • Custom User Avatar

    Modified the description to "Characters in a misspelled word that are in the correct position preserve their case. Incorrect characters should be corrected to be lowercase, unless the misspelled word is entirely uppercase and longer than one character."

  • Custom User Avatar

    The case doesn't depend on the correction, because the rule is: "Correct characters in a misspelled word preserve their case. Incorrect characters should be corrected to be lowercase, unless the misspelled word is entirely uppercase and longer than one character." Since the "BE" are not "correct", because they're in the wrong place, they need to be corrected to lowercase. The "ING" are correct, so the correction is "ill-beING". (Maybe I should clarify that "correct" means being in the correct position?)

    Deciding on the rule for case corrections was the hardest thing in creating the kata, because there are different possibilities, and it's not clear which is best.

  • Custom User Avatar

    Perhaps I missed something, but this case seems ambiguous:

    text: "illBE-ING"
    word_list: ["ill-being"]
    

    As it could be solved with two transpositions, which would correct the "BE-" to lowercase "-be", but could also be done by a deletion of the '-' and an insertion of an '-', which would leave the "BE" uppercase.

  • Custom User Avatar

    Still too much code repetition, imo ;)

  • Custom User Avatar

    Looks good to me!

  • Custom User Avatar

    Thank you for the feedback! I tried addressing these issues. Hope the kata is better now.

  • Custom User Avatar

    A few issues with this:

    • The original method needs to be static
    • You're testing for valid/invalid input, but haven't specified what values count as valid
    • You need to specify intermediate rounding that you're doing for each tenant as well as the overall rounding (also should specify half-up/down/even)
    • Missing random tests
    • The specifications of brackets could be more clear. The example table is good, but you still need to specify where those values came from.
  • Loading more items...