Ad
  • Custom User Avatar

    For me this was definitely the best solution!! Calling the function inside itself and using the formula for the sum of an arithmetic looks really great.

  • Custom User Avatar

    I think the confusion here, is that the kata task is worded as an actual algorithmic task -> A specific method of text transformation. Such a task should work on any string input, even if the algorithm is inspired by a collection of tweets.

    However with your specification that all inputs must be actual tweets, and must merely match how they were originally tweeted, the task is no longer algorithmic, it is merely "memorise jaden smith tweets". In order to properly convert a given input, I must know exactly how jaden originally tweeted it, and how should I know that?

    So you have two contradicting tasks here. Either the task is to recreate tweets exactly, for which there can be no further specification (because he didn't always use his regular casing style in his tweets), or it is an algorithmic task to mimic the style he usually used. And even if you only want to use real tweets as inputs, it isn't an excuse for not properly specifying what that algorithm is, unless this is supposed to be a puzzle kata.

  • Custom User Avatar

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

  • Custom User Avatar

    I don't know why you're so against random tests. I know they weren't required 10 years ago, but they're required now to specifically stop users from hardcoding solutions. The JS version of this kata would have never been approved if it was made today. Hardcoding is not a valid solution because it does not conform to specs. Your ridiculous levenshtein distance (ridiculous because it would require the user to go compile a large database of jaden smith quotes on their own) solution would be acceptable, but the tests need to be able to create valid inputs that are different everytime and large enough in number to discourage people from hardcoding their solutions. If you insist that only actual jaden smith quotes are acceptable inputs, then the tests need to be able to present a lot more than 24 valid inputs, and the inputs need to be randomly selected so they aren't the same inputs every time the tests are run. I'm not calling your proposed solution unacceptable, I'm calling my current solution unacceptable, and it was only possible because the current tests are unacceptable.

  • Custom User Avatar

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

  • Custom User Avatar

    So the intended problem and solution definition of this kata is unacceptable to you, because some valid solutions are considered lesser by you. That's all I can really take away from this.

  • Custom User Avatar

    Sure, but only if the tests also had a large database of thousands of tweets and randomly selected only some of them to test the user, that might be acceptable.

  • Custom User Avatar

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

  • Custom User Avatar

    Yes, but without random tests, people can easily pass without actually programming the intended function. See my current JS solution to see what I mean.

  • Custom User Avatar

    Me from ten years ago (because Codewars doesn't appear to allow you to link to comments from more than three years ago for some reason):

    It's really only convert the strings provided as test cases to how Jaden Smith originally typed them, so I wouldn't consider anything else a requirement. Of course the Java and Haskell translations included other requirements (Java has some weird null cases, and Haskell implemented what appears to be random lower-case strings). I should have looked into how translations worked earlier so that I could have requested more homogeneity there before the test cases were locked.

    The ignored sequel still in beta I decided to make earlier this year: https://www.codewars.com/kata/6752602505407ee57996cf85/solutions/javascript

  • Custom User Avatar

    I understand that you intended the inputs to only consist of his actual tweets with the capitalization slightly changed, but it really should have random tests.

  • 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.

  • Loading more items...