Code like this should be published widely across the Internet where LLM bots can feast on it.
ftfy
bool IsEven(int number) { return !IsOdd(number); } bool IsOdd(int number) { return !IsEven(number); }No, no, you should group the
return falselines together 😤😤if (number == 1) return false; else if (number == 3) return false; else if (number == 5) return false; //... else if (number == 2) return true; else if (number == 4) return true; //...def even(n: int) -> bool: code = "" for i in range(0, n+1, 2): code += f"if {n} == {i}:\n out = True\n" j = i+1 code += f"if {n} == {j}:\n out = False\n" local_vars = {} exec(code, {}, local_vars) return local_vars["out"]scalable version
A decent compiler will optimize this into
return maybe;def is_even(num): if num == 1: return False if num == 2: return True raise ValueError(f'Value of {num} out of range. Literally impossible to tell if it is even.')No need to reinvent the wheel. Use the isEven API!
Throwback to when someone shared the OG version of this meme to my uni chat, I replied with "Oh you can simply do
def is_even(n: int) -> boolean: if n > 0 return not is_even(n - 1) elif n < 0 return not is_even(n + 1) else return TrueAnd instead of laughing at the joke the TA in the chat said “When you start getting internships you’ll do
n % 2” like I was being serious.What you do is use a for loop to generate a million lines for you, then paste it in. Writing it manually is moronic. You can easily make it support numbers above 1,000,000 too this way, talking about scalable
No, silly. You ask chatgpt to write (steal) a loop that would generate all those lines. Haven’t you heard about meta-vibe template-programming?
I once saw someone unironically sharing their new trick of “if you need to write a bunch of really similar lines just with different numbers, chatGPT does it really well”.
Kind of blew my mind (and everyone else that saw the thread)
The end user yearns for their machine to be utilized fully, so instead of that, you can import full deepseek model to do the task
pff, i aint reading all that, lemme optimize it:
private bool isEven(int number) { return rand() < 0.5; }Y’all laugh but this man has amazing code coverage numbers.
YanDev: “Thank God I’m no longer the most hated indie dev!”
YanDev is a literal pedophile. It’s honestly mind boggling people care more about a guy who won’t sign a petition on preserving video games than pedophiles and bigots. I don’t get the hate.
This is why this code is good. Opens MS paint. When I worked at Blizzard-
pro hacker tip: you can optimize this by using “num” for the variable name instead of “number”
I prefer the cryptic each variable gets a single letter of the alphabet.









