7 kyu
Guava against Million dollar error
130 of 131Javatlacati
Loading description...
Fundamentals
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.
Are the arguments guaranteed to not be
NaN
? Some solutions returnNaN
now, while others throw an exception.yes they are generated randomly in certain small range
When there are all these specifications for such a simple function, I'd expect this case to be mentioned in the description too.
Should say
if this is NOT the case
...Fixed
zeroTest doesn't expect an exception. The exception message for zero isn't specified.
Fixed the requirement, now it is a bit different so every earlier solution will become invalid.
Also clarified that the checks should done in order and what to do when both numbers are non-positive.
Approved ;-)
thank you sir
Well,now there are a whole lot of newly introduced issues.
@Voile - this should never have been approved until at least your own was valid
@dinglemouse: Well, the (used to be) new author requirement was flawed anyway so I revamped it. It took like less than 15 minutes.
Also, I rely on CW being agile and believe that kata authors are smart enough when they make fixes that they won't screw it up big. Anyways, the fix is done 8 hours after approval, which 7 of them was me sleeping, waking up and transiting to work place, and an 8 hour fix is pretty quick considering how long most common fixes are done; Rather it's more like lots of us are being too active and actually pointed at the issues in an hour of so, instead of not pointing them and just press the
very satisfied
button (see: Base91 kata?). So all in all it just shows that CW is working as intended. Seems that you're the impatient one here ;-)Okay, so you told us to check that
parameters are not null
andparameters are positive
, but what should we do if they're not? I only found that you expect us to throwNullPointerException
for the former after looking at the sample tests (andIllegalArgumentException
for the latter after bumping against the actual tests).The thing that we should do if input validation failed should be put in the descriptions.
(Also, note that you haven't enforced the use of
com.google.common.base.Preconditions
, so the above applies. For people who're implementing this manually, they need to know the expected exception.)All of the issues seem to have been fixed. Thank you for your time, please try again. I will not enforce the use of any library so others can know the equivalent; also is some sort of language philosophy that you should learn to do all manually and by this being ready to take full advantage of framewoks, libaries and tools.
To avoid confusion maybe
that parameters are positive
maybe should say do you really want> 0
or>= 0
As there is no test case for
0
so either currently works...Added test case and fixed description.
Nice idea to introduce Guava :-)
testGreet
... have no meaningfight agains
PS: pre-release I'll improve tests later IYKWIM
- You risk getting lots of issues and a low satisfaction score with this approach. Really you should get the Kata to a publishable state, and only THEN publish it.Thank you for your suggestions I'm starting fixing. Unpublished. I only wanted to make sure thast no one accepted it sonner than it should be.
All of them seem to hafve been fixed thank you for your time, please try again.
These are still present...
Changed