Retired
License Plate maker (retired)
Loading description...
Fundamentals
Strings
Data Types
Functions
Control Flow
Basic Language Features
Loops
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 description doesn't mention that month and day values outside the valid range should be accepted as equivalent to the nearest valid value. A solution that rejects invalid input would meet the requirements of the description yet fail the test cases--a false negative.
This kata has no random test cases. Thus, it is possible to pass the tests by regurgitating the expected responses in the proper order, as has been demonstrated.
I agree with OverZealous about missing information. Codewars kata in which the puzzle is to work out what the kata is supposed to be doing are not good.
The test cases spend a lot of time dealing with invalid input dates, but this is not specified in the description either.
There needs to be random test cases.
There's some information missing in the description:
WX
represents the years passed from 1950, yet then it repeats in 2175? What about the years from 2150 to 2174? You don't specify a base, so it's logical to assume base-10. Base-36 would allow for 1296 years before looping. Even base-16, the most logical base in computing, allows for much longer runs before looping.YZ
: without knowing the base to represent the numbers in, only 100 days can be represented in base-10 (out of a potential 366). Base-16 doesn't allow for enough either.Some other notes:
The description for
UV
is overly complicated. It could be simplified to:Though both leave an unspecified area on how to handle provinces with a leading consonant followed only by vowels.
I also think it would be a better API to only accept
Date
objects, rather than strings, so we don't have to deal with date processing ambiguities.My point about WX and YZ stands. I can pick any base that is large enough, and since you don't specify which one, this means there's an infinite number of valid solutions, but most likely only one will pass your tests.
Say I want to solve it using base-36. This means the values will go from 00..69, then I can arbitrarily choose to reset at 69 to 00, which meets all the specifications. Guessing an arbitrary base doesn't make for a very good or fun kata.
Using example test cases to guess on a base doesn't make for a good kata, either, unless it's a puzzle, and this is more a data-driven kata.
You don't have to fix it, I'm just making recommendations. As it stands, this isn't a very fun kata IMO.
I made the description of the WX and YZ more clear. Yes, if you are the license plate maker you can produce whichever result, but then you wouldn't be able to test for that. I gave instructions so that you can find out which base to use. Sorry you don't like the kata, but you can't equate that to a technical issue.