Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
C0D4644175y@M1sf3t ya, but those crazy folk and their big noisy contraptions, what ever happened to the time of just walking to ma's cave. -
ffs, just use a boolean[] !!! Lookups by index are soooo much faster than all the if-elses. And much more readable!
/s -
Lyniven44015yI saw this kind of code (up to 100) in production for a fortune 500 company, and wasn't authorized to remove it... -
@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)! -
@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 -
@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. -
@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. -
@bittersweet Shes actually sound more impressive / legit if you oeft out the Bachelors.
Grads are never as good as they say.
Related Rants


Well yeah. He is right!
Give that man some HUGE FUCKING COOKIES!
Time complexity : O(😂)
joke/meme
foundontheinternet
programming
logic
joke