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.
Why on earth check on private class state anyway???
https://www.w3schools.com/cs/cs_oop.php
fixed
fixed
You are linking to a now retired kata.
The exception does not get tested.
It would be helpful to inform the user on the appropriate values to populate the dictionary with in the instructions. Took me a while to find this out.
While this is a good learning Kata for C#, throwing an InvalidOperationException for a missing key is not best practice.
From Microsoft C# docs:
The hint in the starter code suggests using a dictionary as the underlying data structure. A dictionary would throw a "KeyNotFoundException" if the key isn't null and dictionary is not referenced with the TryGetValue method.
I'd suggest changing that test case to accept KeyNotFoundException as well.
As many top 'coding craftsman' already said, when your variable needs an explaining comment you did something wrong
Yes he's a cheater.
Because he's a spammer, and quite a possibly a cheater (as you said). Not surprising that his "moderation" is a joke as well.
Well, the Kata author did admit right in the Kata description that the tests allow a solution keeping the original switch/case to pass ;)
It is beyond me how a (supposed)
1 danmoderator could approve such an obviously problematic Kata :/The exception message is not tested.
The kata's proposed design for such a
Optiontype is nonsense:IEnumerable? WhatIEnumerablemeans is that thisOptionaltype can have0 to manyvalues. So the problem is not resolved at all, in fact it's even worse (it was0 or 1before).IEnumerable<Customer>? Why not make it a generic type? Why is it namedKataand not something more meaningful (likeIMaybe)?.Customerand.GetEnumerator()? It cannot be both a plain value or a collection of values at the same time: if it's a plain value you need to lift it to get a collection, if it's a collection you need toFind/Firstfrom it to get a plain value.Loading more items...