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.
Nothing is clear, but very interesting :)
I totally agree with this approach. Although in the kata is said that
list
will always be filled, it is a good practise to use the null operator or checking if the list has something.Nice!
Cool!
description updated
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
Yet when you try to access the property:
'Kata' does not contain a definition for 'Firstname'
Capitalizing the N in name seems to work (just for
FirstName
,Surname
is correct apparently). Please fix the comments so we don't have to waste time guessing at someone's property naming style, and fix the partial class to use consitent naming.I don't think there's anything wrong with condensing code, especially when you are taking advantage of language features, as long as what you're doing in the condensing isn't incredibly difficult. Writing code vertically helps when debugging, and there is absolutely nothing wrong with it. When you're writing quite a lot of code, or repetitive code, sometimes you decide to use the languages features to save you time/gain performance. I would think by this time you have an understanding of the underlying concepts (reference vs value, heap vs stack, classes, pointers, interfaces, etc) which allow you to do more complicated things in shorter amount of lines (although line counts are a bad metric to measure performance or elegance!)
To me, the following is reasonable and readable.
This was a clever approach regardless. Unfortunately the casts here are pretty expensive, so it loses out to the built-in methods on char. On large strings though I've seen custom code have 20% improvement against the methods on char.
Switching to IEnumerable is a good call here. I wasn't sure if the test case equality would break, but it seems to have been written well on this Kata. Nice job.
This comment is hidden because it contains spoiler information about the solution
Since last change on github it can be done, please review :) It was my first try to translate something on C# sorry for the inconveniences.
Why is it outside of your control? Is the setup.cs file something that CodeWars maintains?
Loading more items...