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.
At the very least, I think the description should include the word delegate as a hint if it's going to be 8kyu. Otherwise, no beginner is going to figure that out
Agreed, this one's broken in Ruby. Worked in js...
Still, returning a function from within a function, also sometimes known as a delegate (like in C#) is a basic language feature.
8kyu really might be too difficult, but i think it shouldn't be any lower (or is it higher?) then 7kyu too.
Good point, I've added this to the test fixture now, thank you!
Hi! Nice Kata. If I may suggest something, I would add more detailed explanation what is your understanding of a valid email. As you said, the point is to learn programming language rather than implementing RFC. I think, most people will use regexp. so tuning in the requirements a little big will make them write their own regexps rather than reusing the ones found on the internet.
As an example, you may assume, that valid email should adjoining dots in the domain part. Or the domain should consist of maximum 5 parts (max 4 not adjoining dots). Etc. I think this will make people think and therefore promote this Kata to higher rank.
Good job!
This comment is hidden because it contains spoiler information about the solution
I think you probably need to add some complexity.
I boiled the validation down to (a) is there exactly 1 @ sign and (b) are there two parts separated by a dot after the @, which is not validation by any means. I'm actually not checking a character of the content apart from the @ and dot.
If you're going to change it, then it's probably better to do it now before are too many solutions that will be invalidated.
For example, your standard — not accepting
joe@server
— is more strict than the HTML5 willful-violation-of-the-RFC. So that's the sort of thing that should be spelled out clearly in the description.I can accept that. But if that's the case, then it seems worthwhile to make explicit in your description exactly what characters ARE expected to be OK in each part of the domain name. Otherwise, someone could start out expecting only subset A (alphanumerics?) and then learn that you want them to also allow subset B (punctuation), or what have you.
And then there can be a much higher-leveled kata that goes further, testing for unicode, escaped
@
signs, etc. — taking the goal to the next level.OK, changed the description - thanks
I see what you mean - but level doesn't light a bulb, neither...
Perhaps one of these would be more clear:
Other ideas?