Retired

License Plate maker (retired)

Description
Loading description...
Fundamentals
Strings
Data Types
Functions
Control Flow
Basic Language Features
Loops
  • Please sign in or sign up to leave a comment.
  • PaulCalvelage Avatar

    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.

  • PaulCalvelage Avatar

    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.

  • Insti Avatar

    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.

  • OverZealous Avatar

    There's some information missing in the description:

    • You say 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.
    • Similar issue for 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:

      U is the first letter in the province, and V is the first consonant that occurs after U.

      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.

    • franzmoro88 Avatar
      • WX is a two-digit string which can represent the years from 1950 up to 2174, from 2175 to 2299. As per inding out the base is part of the problem. Perhaps the description is now more clear.
      • I modified the description for the UV digits, and cleared up the issue with provinces with no vowels after the first letter. Thanks for spotting out the issue.
      • Take a look at the description test case for a hint on which base to use for YZ.
    • OverZealous Avatar

      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.

    • franzmoro88 Avatar

      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.

      Issue marked resolved by franzmoro88 9 years ago