Retired
FIXME: String == String (retired)
Loading description...
Debugging
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.
This kata promotes bad coding habits.
java.util
is banned.There is no middle ground.
Yeah, true to your word.
How come nobody has raised an issue about the lack of random tests? ;-)
Also, the only test case returning true is when
a == "abc"
andb == "abc"
, so solution like this currently exists.Honestly, the tests would be easier if they used a stream tokenizer and check if the solution is equal to the reference solution.
But then, that's not the point of doing katas.
Also this and that and this stupid solution
Random tests added. Thanks.
This comment has been hidden.
Fair enough, if you have some optimal set of restrictions that allows only the interesting/creative solutions please let me know it and I will change the rules.
Should we add more "real equals" tests to samples? Such as:
I was quite surprised when I hit the "test" button with the initial solution and saw
You have passed all of the tests!
The "sample tests" are like those tests the original dev wrote. That is why their code is broken in the first place (because they all passed, so they thought it was OK)
Whereas the "solution tests" are like what happened when the code was used in the wild. So your "quite surprised" reaction, is same as the original dev would have when someone reported the bug, and is what I was aiming for :-)
~
Anyway, happy to change sample tests if more people agree with your suggestion than with my POV.
And the tests are a joke too: https://www.codewars.com/kata/reviews/5e9c43cb28d2270001b84b5d/groups/5e9c5e2e28d2270001b84f7e
Patched that hole.
I can do without the "tests are a joke" comment.
It's not expected to be perfect first time - that's what the Beta process is for.
Instead of getting angry at them, please just avoid my Kata.
Reimplementing string comparison is neither interesting nor worthwhile kata idea.
The goal of this Kata was to expose people to the Java String Pool, which they will learn when looking at the other solutions.
Your solution proves this Kata has worth.
-> you should say that you're talking about any kind of "equals", not only String.equals.
https://www.codewars.com/kata/reviews/5e9c43cb28d2270001b84b5d/groups/5e9c4a8d86e61700013576d2
Unnamed has found a bunch more for you... ;-)
OK. I didn't intend to ban everything, but there were too many options left available...
I've now banned most of the obvious ones - do you think is it enough?
Yeah.