Ad
  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar

    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

  • Custom User Avatar

    Agreed, this one's broken in Ruby. Worked in js...

  • Custom User Avatar

    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.

  • Custom User Avatar

    Good point, I've added this to the test fixture now, thank you!

  • Custom User Avatar

    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!

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    OK, changed the description - thanks

  • Custom User Avatar

    I see what you mean - but level doesn't light a bulb, neither...

    Perhaps one of these would be more clear:

    • step1, step2, ...
    • branch1, branch2, ...
    • key1, key2, ...

    Other ideas?