Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Too bad the explanation is not very clear...
I don´t see the ATM words in the requirements, so there could be other rules. Cheers my friend. Ending this discussion from my side.
ATM PIN codes have not meaningfully changed format since 1967. YAGNI.
Of course the Kata is not meant not change, agree on that. But training also for readable & maintable code is much better than saving 3 lines of code. If you have worked in some companies you might agree with me. The kata doesnt say anithing, but it mention "rules" and rules are likely meant to change, different from a kata that explicity say "add two numbers" and nothing else. Do you see my point? Its a programmer challenge to identify requisites that likely to change, like this. That's what I mean, not that the code is wrong.
Unless you want to maintain some dead code or another too-generic hell,
you probably don't want to anticipate that much, especially on such a simple piece of code.
That is what uses cases and product rules are for:
if a rule is meant to be changed at a later point, you simply rewrite the rule and delete the old one.
Also you can't be sure that a rule is meant to evolve - it can be discussed at some point and then it can be cancelled - or the rule is not meant to be changed at all.
The same logic applies to this kata: the description gives a simple rule, kata are not meant to be changed after leaving beta, so the rule is not likely changing at any point.
when you solve a problem you should also consider how probabl is that rules change over the time, and do your on future changes :)
its a 7 kyu challenge, wdym?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
If long pins was a concern you could check the 6th index and bin the pin if it is not null/none.
Tho I don't know how big the pins has to be before it becomes a problem
oh just relized what you meant srry
I just don't fully understand its function
Loading more items...