Retired

Giving your twitter bot a brain (retired)

Description
Loading description...
Puzzles
  • Please sign in or sign up to leave a comment.
  • aweleshetu Avatar

    The solution below shouldn't pass, add some tests to make it fail.

    https://www.codewars.com/kata/reviews/5b4668e34d3b8468bc000bdc/groups/5d6cb441c968e8000108a2a2

  • Konstantin Modin Avatar

    Hello! Good kata, but my proposal is that random string should not contain any numbers (should contain characters a-z). Otherwise kata becomes very simple.

  • Torkel Avatar

    Title sounds interesting, idea is good, but the actual kata is very boring. Is this clickbait?

    Not sure what you could do to improve it though.

  • JohanWiltink Avatar

    The new tests only test tweetArray[2] and [1]. Then i already gets bigger than the current length. Incidentally, i implicitly is a global variable, because you don't have let or var in front of it. This is now possible.

    You may want to while ( tweetArray.length ). And ramp up 3 a bit again, and let i. ( let has less subtleties than var. )

    • tobyfee Avatar

      oh gosh am I embarassed, left the number of iterations at 3 rather than 500 :/ also I did not think about a global being grabbed by the solution code, so I'll make that change too. Thank you!

      Suggestion marked resolved by tobyfee 7 years ago
  • JohanWiltink Avatar

    assertEquals takes its arguments in the order (actual,expected). When directly comparing user solution generated values to reference ( correct, expected ) values, having them switched around leads to major confusion.

  • Firefly2002 Avatar

    This comment has been hidden.

  • JohanWiltink Avatar

    Your test failure messages are useless for debugging. Tell us what you tested!

    • tobyfee Avatar

      added messages to all failures, though I didn't know a great way to have the duplicate test give useful output without several more lines of code.

      Side note: hope you don't talk to your team this way!

      Issue marked resolved by tobyfee 7 years ago
  • JohanWiltink Avatar

    I've done this before.

    Also, you're not testing for "cannot be more than 180 characters" - you're testing for <180 instead of <=180.

    • tobyfee Avatar

      if you find a duplicate, please let me know! I really thought 'unique strings' would exist in this format, though while I found the opposite (detect IF strings are unique) I couldn't find this one.

      length is resolved

      Issue marked resolved by tobyfee 7 years ago