this post was submitted on 15 Jul 2025
457 points (94.9% liked)

Programmer Humor

37253 readers
47 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 6 years ago
MODERATORS
(page 3) 50 comments
sorted by: hot top controversial new old
[–] Midnitte@beehaw.org 5 points 4 days ago

When did Thor become the dev for Yandere Simulator?

[–] 6stringringer@lemmy.zip 2 points 4 days ago

Thanks to goodness, finally. A (giggle & snort) solid algorithm. There ya’s go set yer clocks & go get a haircut.

[–] DrunkAnRoot@sh.itjust.works 2 points 4 days ago

this is like the making chess one

[–] Packet@hexbear.net 3 points 4 days ago

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

[–] FunkyStuff@hexbear.net 4 points 4 days ago* (last edited 4 days ago)

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 True

And 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.

[–] dsilverz@calckey.world 3 points 4 days ago (1 children)

@sirico@feddit.uk

private bool isEven(int number){
    	bool result = true;
    	while (number > 0){
    		number = number - 1;
    		if (result == true)
    			result = false;
    		else
    			result = true;
    	}
    	return result;
    }

(P.S.: Only works for positive numbers)

[–] jaupsinluggies@feddit.uk 3 points 4 days ago

This works for both positive and negative numbers:

private static bool isEven(int number)
{
	bool result = true;

	while (number < 0)
	{
		number = number - 1;
		if (result == true)
			result = false;
		else
			result = true;
	}
	while (number > 0)
	{
		number = number - 1;
		if (result == true)
			result = false;
		else
			result = true;
	}
	return result;
}

Output:

isEven(4) = True
isEven(5) = False
isEven(-4) = True
isEven(-5) = False
[–] WraithGear@lemmy.world 1 points 3 days ago* (last edited 3 days ago) (4 children)

Would this be a case of modulo saving the day?

Like: If Number modulo 2 = 0, true

This has to be taken out of context

load more comments (4 replies)
[–] Valmond@lemmy.world 1 points 4 days ago
[–] jerkface@lemmy.ca 2 points 4 days ago (8 children)

what's the humour supposed to be

load more comments (8 replies)
[–] tulliandar@lemmy.world 2 points 4 days ago (1 children)

Why is it all in italics?! I’d reject the PR just for that. Otherwise LGTM

load more comments
view more: ‹ prev next ›