Ad
  • Custom User Avatar

    This looks very inefficient.

  • Custom User Avatar

    Kudos for just typing a space instead of \s

  • Custom User Avatar

    Oh wow iterating through each letter is actually not that hard.

  • Custom User Avatar

    What on earth is this syntax? I'm new to Python. I just learned about list comprehensions, and now this: sign, n = (1, -1)[n < 0], abs(n). I have not the slightest idea what it does. Could you maybe please point me in the right direction?

  • Custom User Avatar

    The only way to do this properly is to write a function that checks for all the TLDs that have two parts (co.uk, co.sg, co.il, etc.).
    Technically the first part of the hostname does not have to be www. For example, it can be mail.zombie-thing.co.uk.
    Since it would be tedious to collect all the TLDs that have two parts, I'll just assume that the subdomain can only be www.
    The question should make the expectations clearer. Others have pointed it out, it is not very well formulated.

  • Custom User Avatar

    You should probably assign (.indexOf (seq xs) item) to a variable instead of calling it twice.

  • Custom User Avatar

    Tail recursion. And readable code. Awesome.

  • Custom User Avatar

    I don't understand (recur ...) (yet!).

  • Custom User Avatar

    That exercice took me ages to complete. It was open in my browser for like a week, and i worked on it overall several hours. In JavaScript it would have taken me 5 minutes.
    But I have a big smile on my face now that I wrote a maybe-not-very-elegant solution.

  • Custom User Avatar

    I had the same message because I used double quotes instead of single quotes (as expected) inside the A element.
    I understand that the author is not going to write or instanciate an HTML parser to check the answer against all different ways of writing an A element, but a helpful error message or a tip is in order here, if no other change is reasonable. It is an issue.

  • Custom User Avatar

    There is a small typo in the example, inside instructions. One of the "trigrams" in the examples is actually a, uh, bigram?

  • Custom User Avatar

    No problem, and thanks.

  • Custom User Avatar

    Please validate emails properly. If you don't use the "+" sign in your email, it doesn't mean that nobody does. Over the world, probably millions do.
    So now that we have established the need to properly validate - the official and authoritative specifications for valid emails is pretty complicated, actually.
    That's where the idea of server-side validation comes from, to avoid loading big libraries on the client for a simple and one time only task such as validation. The email will be transmitted to the server anyway - there is no use of validating an email address if it's not for sending it to a server. So might as well do the important part of the validation on the server.
    You could implement it client side and it has it's advantages. Depending on the case and needs, either approach can be favorable.

  • Custom User Avatar

    I disagree with this being a "major issue". I've seen much worse (bugs in BabelJS when recursing, falsely failing final tests) but was not able to report them. Anyway I've added a random test.

  • Custom User Avatar

    I'm having the same problem.
    I also found a bug in another kata.
    Always to do with recursion - probably BabelJS at fault.
    It's starting to become a problem.

  • Loading more items...