Retired
Giving your twitter bot a brain (retired)
55tobyfee
Loading description...
Puzzles
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
The solution below shouldn't pass, add some tests to make it fail.
https://www.codewars.com/kata/reviews/5b4668e34d3b8468bc000bdc/groups/5d6cb441c968e8000108a2a2
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.
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.
The new tests only test
tweetArray[2]
and[1]
. Theni
already gets bigger than the current length. Incidentally,i
implicitly is a global variable, because you don't havelet
orvar
in front of it. This is now possible.You may want to
while ( tweetArray.length )
. And ramp up3
a bit again, andlet i
. (let
has less subtleties thanvar
. )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!
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.good note, fixed
This comment has been hidden.
"no because it won't pass the leng-"
d'oh, fixed!
Your test failure messages are useless for debugging. Tell us what you tested!
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!
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
.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