Ad
  • Custom User Avatar

    highkey rude, I was being a dirk

  • Custom User Avatar

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

  • Custom User Avatar

    Yeah, i'm not only an asshole, i'm an idiot! Nah, just had a miserable night and morning, thanks for not responding in kind. Looks like from doing some testing you're mostly right, though it varies, and funnily your own solution is five times slower than a regex one, guessing it's the iterators under the hood in those native method loops, but it looks clean and is very descriptive.

  • Custom User Avatar
  • Custom User Avatar

    The fact that this got nearly 500 best practices votes and it uses a completely unnecessary/deleterious loop inside of a loop says a lot about a lot of programmers 😅

  • Custom User Avatar

    I've never seen anything so sanitized

    ...and yet so filthy 🤮

  • Custom User Avatar

    More code is not always bad, and in fact, in production sometimes more code is good. Safety checks which do not slow your code down appreciably are virtually always beneficial-- and there is such a thing as syntactic salt.

    However, there is also such a thing as more code in a bad way, and this is that. This is bad.

    So I agree with you regarding this one--principally, though, higher IQ absolutely does not correspond to smaller code.

    ( to be clear--it is very obvious this is purposefully overdone, employing a bunch of tricky tricks and clever cleveries, so it's probably not actually "bad" in that sense-- just if someone were to take it seriously and try to actually do it this way )

  • Custom User Avatar

    Ah heh, "no numbers", I see. My bad.

  • Custom User Avatar

    Am I just an idiot... I solved this, but, it seems to me that nowhere in the description does it clarify that certain teams are considered valid and others not... as in, the Los Angeles 9nines are considered invalid whereas the Los Angeles Vulcans are valid and must be added to the total. I googled it to be sure, and the Vulcans are not a real LA team (unless they're small enough that google wouldn't show them).

    Anyway, just curious cause it was giving me trouble until I noticed that and it didn't seem to be mentioned in the notes.

  • Custom User Avatar

    Man, I was looking all over for a regex that would match only one ocurrence from a range. I can't quite figure out how the characters in the second parens are doing that, but obviously they are. This is awesome. How does it work?

  • Custom User Avatar

    Hi, I see that your issue was solved, but the comments are hidden, because I have not solved it yet. But--I do pass all input tests, I'm just getting the same error as you involving Object and join, which I did not use in the function. So, how did you resolve it? Thanks!