460
(page 3) 50 comments
sorted by: hot top controversial new old
[-] Packet@hexbear.net 3 points 1 week 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

[-] Randomgal@lemmy.ca 3 points 1 week ago

Yeah but did you know he worked for Blizzard tho

[-] dsilverz@calckey.world 2 points 2 weeks ago

@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 1 week 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
[-] tulliandar@lemmy.world 2 points 2 weeks ago

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

load more comments (1 replies)
[-] jerkface@lemmy.ca 2 points 2 weeks ago

what's the humour supposed to be

load more comments (8 replies)
[-] DrunkAnRoot@sh.itjust.works 2 points 1 week ago

this is like the making chess one

[-] 6stringringer@lemmy.zip 2 points 1 week ago

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

[-] helvetpuli@sopuli.xyz 2 points 1 week ago

Oh. I thought that was Elixir until I zoomed in.

[-] CanadaPlus@lemmy.sdf.org 1 points 1 week ago* (last edited 1 week ago)

deleted by creator

[-] WraithGear@lemmy.world 1 points 1 week ago* (last edited 1 week ago)

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

[-] queueBenSis@sh.itjust.works 3 points 1 week ago

well that’s the joke, isn’t it

load more comments (3 replies)
[-] Valmond@lemmy.world 1 points 1 week ago
load more comments
view more: ‹ prev next ›
this post was submitted on 15 Jul 2025
460 points (94.7% liked)

Programmer Humor

37457 readers
8 users here now

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

Rules:

founded 6 years ago
MODERATORS