Ad
  • Custom User Avatar

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

  • Custom User Avatar

    I would argue that it's not, but I think it comes down to personal preference.

  • 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

    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

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

  • Custom User Avatar

    Case 2 makes the assumption that the API is configured properly to only accept expected input. From a cybersecurity perspective, even this is a bad idea. eval() should never be used in code that can be used by anyone aside from the author.

  • Custom User Avatar

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

  • Custom User Avatar

    kata definition is Jaden tweets with capitalization as originally typed

    Does the "as originally typed" refer to kata input, or expected kata output? If this describes the input, then it is not a good specification, because it's not very specific. If it's about the expected output, then what are possible inputs? Are inputs "liKE thIS" possible? If no, it should be specified, and random tests which generate them should be removed. If yes, then it should be explained if the Jaden-cased form is "Like This", or "LiKE ThIS". Since you happen to be around, you can clarify this doubt, but whatever you decide, existing translations would have to be reviewed to conform to the refined requirements.

  • Custom User Avatar

    @massey-n, the tests were intended to be exclusively Jaden tweets. I didn't author or approve the translations that have random tests, I originally stopped using Codewars because I was quite frustrated with the translations functionality as it was 10+ years ago. That said, the kata definition is Jaden tweets with capitalization as originally typed based on the provided test cases, which, at least for the Javascript implementation, was very intentional in allowing the solution of ignoring everything past the first character of a word or word contraction.

  • Custom User Avatar

    Oh you're right, I don't know how I misread that. I'm working on no sleep. I'll edit the comment above.

  • Custom User Avatar

    I'm also confused as to how this is resolved. The test cases in question are typically gibberish, not Jaden tweets. They're test cases that exist to test a requirement that is not communicated in the description.

    EDIT: BobtheLantern, Python does expect the other letters to be lower case, but this is only made evident in the "Attempt" test cases. I can go back and retreive the actual cases if any mod needs them.

  • Custom User Avatar

    I forked the JS version to update the description here, but I'm unable to check every translation.

    I checked these translations:

    • JS is the original language, but it lacks random tests and all of the tested inputs only include capital letters as the first letter in a word.
    • PHP has random tests, but it's the same as JS, where only the first letters of some of the random words are capitalized in the input strings.
    • Python has random tests, and the input strings contain random uppercase and lowercase letters throughout the input strings. The tests expect a return string with only the first letters of the words capitalized and all other letters lowercase.

    I don't want to solve this kata in an additional 15 languages, so that's as far as my testing can go, maybe a mod or a mender can look at the other ones. This may just be an issue with the python random tests generating input strings that the other languages do not.

  • Custom User Avatar

    Why is this issue marked as resolved? I think the issue is valid: description says that words should be capitalized, but it does not explain whether words like "abcDE" ahould be changed to "AbcDE" or maybe rather "Abcde". Such words are produced by random tests, and probably handled differently by different translations.

  • Loading more items...