37
Comments
  • 10
    This makes me irrationally angry lol
  • 6
    Let's write other bizarre ways to solve this is your preferred language. I'll start:
    ```
    def is_odd(pony):
    return int(str(pony)[-1]) in [0,2,4,6,8]
    ```

    😁
  • 3
    It's not wrong.....
  • 1
    @M1sf3t ya, but those crazy folk and their big noisy contraptions, what ever happened to the time of just walking to ma's cave.
  • 7
    ffs, just use a boolean[] !!! Lookups by index are soooo much faster than all the if-elses. And much more readable!

    /s
  • 1
    Is it even done yet ?
  • 5
    lemme guess, #girlswhocode ?

    (sorry ladies, didn't mean you!)
  • 1
    Omg this is just horrible
  • 1
    I wanna know where they stopped...
  • 1
    So, using the LSB of the number as inverted boolean value was too complex?
  • 4
    I saw this kind of code (up to 100) in production for a fortune 500 company, and wasn't authorized to remove it...
  • 2
    I prefer my solution. Very efficient !
    @highlight
  • 4
  • 2
    That's horrible! 0 is missing!
  • 4
    @rooter

    isOdd in JS + regex, because both languages represent the apex of memeability.

    isOdd = (n) => /(?<!.).(..)*(?!.)/.test('penis'.repeat(n))

    Also, added bonus: Odd numbers will be found in O(n), while even numbers will take O(2^n)!
  • 3
    @bittersweet I'm not good in regex. Is a penis odd?
  • 4
    @rooter depends on the context. On the bus window? Yes, it's odd. In the wallet? Definitely yes. In your pants? Depends, whose penis is it..

    So yeah, I guess a penis is mostly odd
  • 3
    @rooter (?<!.).(..)*(?!.) will just match any string with an odd length. It would also match titties, but not boob or dick.

    1 penis has length 5 (really, just measure it! You can use "penis".length), so that's odd

    2 penises have length 10, so that's even

    3 penises have length 15, so that's odd

    So as long as the penises together have an odd length, it's a match.
  • 2
    Everyday we stray further away from the light
  • 1
    This is an old one
  • 1
    @dontknowshit The joke, probably. But the screenshot is actually 6 days old and really originally made by Kat Maddox a.k.a. Katerina Borodina-Petrovic.

    Of course the screenie is a troll, because she's a skilled Australian hacker with a CS Bachelor from the University of New South Wales.
  • 0
    @bittersweet I’ve seen the same joke many times before, if i type an old joke and screenshot it, does that make a difference?

    What’s with the background info on this person, why should I care about them? Doesn’t seem particularly more talented than anyone else I’m seeing?
  • 2
    return !(number%2)
  • 1
    Aren't else it's expensive?
  • 0
    @bittersweet Shes actually sound more impressive / legit if you oeft out the Bachelors.

    Grads are never as good as they say.
  • 1
Add Comment