Retired
Validate NIF (retired)
Loading description...
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.
Hi,
A fixed tests with a number of digits different of 8 but everything else consistent is missing. Currently, the tests with wrong lengths can be spotted using other requierments.
Cheers
According to the description, this input isn't even valid:
You are right, I removed 'of exactly 8 digits and 1 letter' from the sentence. Thank you.
Hi @Blinf4Basics, I added those extra cases. Thank you!
nope, not good: this should pass the fixed tests (btw, if you're the one who upvoted my shitty solution, please remove the vote: I totally messed up the last part (see the initial fork of the solution for a correct approach)
I'm trying to understand your solution and I think it assumes the given string 'nif' is always going to be 8 numbers and 1 letter, which was correct because the description I wrote in the first place said that, my bad. Now I have changed the description and some test cases so that you have to validate the length. I added cases where letters are inserted between the digits. Also, added cases with lowercase letters. Maybe I'm wrong again.
I did'nt upvote your solution but I will upvote your fork since I learned the unpackage thingy which seems so useful :)
yeah, that's it. And to make it fail, you need an input that satisfies all other criteria. For instance, something like this:
Makes sense, I have added fixed ones. I will be adding random ones of those too asap. Thank you so much for the feedback, it's my first time creating a kata or tests in general (outside of very simple college activities) an this is truly helping me understand what good tests are. ^^
Random cases added too.
My solution passed tests but it doesn't check length. Probably it will be good to add tests for something like valid NIF + letters/digits/etc e.g. '49921020A1D'
Hey, I was sometimes checking those cases on the random cases but not always were generated since it needed to highroll lol. I have added fixed cases to make it functional by now but I will refactor the entire random tests generation to make sure it works there too 100% of the times.
Thank you!
Hi @Blind4Basics, may I know the exact reason the kata was retired? Just so that I can improve next time. Was it the poor tests, was the kata concept itself? Apart from that, was'nt the kata retired too fast? I mean, is the first kata I try to release, but I tried my best to be working on its fixes and I was thinking about refactoring the entire tests this weekend, free of college, but not even 48 hours past before it was retired. I feel like I needed more feedback about how much time I had to fix it + what can I improve.
Thank you.
Hi,
In the present case, the retirement comes from a rule saying that if the kata requires more than X very satisfied votes in a row to reach approval state (iirc, X=10), it's just retired. The odds are really low that approval will ever happen in such situtation, and the kata would acutally just linger in beta state forever.
So, in the end, quality was correct, interest was at least average, but it suffered from its early days mistakes, and probably the fact the idea is very close to Luhn algorithm (but simplified), meaning it probably gave a "meh/déjà-vu" vibe to the beta testers.
Your kata might also have been just a bit out of luck: it didn't get 2 simultaneously active issues, which are automatically pushing the kata back into draft and forbid new completions (hence, votes) until it's fixed and republished. But again, I think the general idea behind the task was its main problem (imo, at least).
Cheers
Why does "T" occur twice in the list-which-is-actually-a-tuple? And why is there a comma after the second occurrence of "T" in that tuple?
Hey, I used the word 'list' to refer to list as a concept, not the python keyword, I don't even use tuple or list in my solution, but instead an string version of it. I thought it would look more clear if I separated the chars with comas and parenthesis on the markdown, bad decision. The 'T' and the comma was a mistake. I will fix all things, thank you for the feedback.
No Sample Tests
My bad, samples should be added now, thank you.
I'm trying to update the "Initial solution" field on the kata but the changes do not apply when previewing or releasing the kata. It stays if I leave and join again the edit view however. And yes, I'm clicking save button. Am I missing something?
Did you just reinvent the
String
here? Would"TRWAGMYFPDXBNJZSQVHLCKET"
work just as well?Hey, I'm using
String
in my solution, I just thought it would look more clear on description, bad decision. I will fix it so that it looks more clear. Thank you for the feedback.