this post was submitted on 21 Sep 2023
1259 points (94.8% liked)

Programmer Humor

19471 readers
1327 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] whileloop@lemmy.world 133 points 1 year ago (7 children)

This could be so much longer.

Killing children, class systems, so many programming language names, the ridiculous ways equality and order-of-operations are done sometimes. Plenty of recursion jokes to be made. Big O notation. Any other ideas?

[–] MxM111@kbin.social 36 points 1 year ago (1 children)
[–] Hoimo@ani.social 42 points 1 year ago (2 children)

GOTO is the only thing that makes sense. It's the "high-level" concepts like for-loops, functions and list comprehension that ruined programming.

series.append(series[k-1]+series[k-2]) for k in range(2,5)]

RAVINGS DREAMT UP BY THE UTTERLY DERANGED

[–] ChickenLadyLovesLife@lemmy.world 15 points 1 year ago (1 children)

I started coding with TurboBasic, which included the helpful innovation of GOTO {label} instead of GOTO {line number}, which allowed you to have marginally-better-looking code like:

GOTO bob
...
bob:
{do some useless shit}
return

which meant you essentially had actual, normal methods and you didn't have to put line numbers in front of everything. The problem was that labels (like variables) could be as long as you wanted them to be, but the compiler only looked at the first two letters. Great fun debugging that sort of nonsense.

load more comments (1 replies)
[–] Vilian@lemmy.ca 14 points 1 year ago* (last edited 1 year ago) (1 children)

if goto make sense why don't you go to get some bitches

[–] newIdentity@sh.itjust.works 12 points 1 year ago* (last edited 1 year ago)

Because "get some bitches" is an invalid instruction

[–] Gork@lemm.ee 32 points 1 year ago

Big Orgasm notation

[–] dukk@programming.dev 19 points 1 year ago

A monad is just a monoid in the category of endofunctors.

[–] Lightor@lemmy.world 11 points 1 year ago* (last edited 1 year ago) (1 children)

Masters and slaves

Cloning

Deploying code (that's what you do with soldiers!!!1)

Using Git to rewrite history.

Atomic values (like the bomb!)

These people are madmen.

[–] Gustephan@lemmy.world 7 points 1 year ago

One of the slave node's child process failed, so the master node sent a signal to terminate the child and restart the slave

There's pretty solid reason my research group is pushing to use "head node and executor nodes" nomenclature rather than the old-school "master node and slave nodes" nomenclature, haha

load more comments (3 replies)
[–] Rin@lemm.ee 119 points 1 year ago* (last edited 1 year ago) (3 children)

while (true) { print(money) }

isn't that just crypto mining?

[–] NaibofTabr@infosec.pub 28 points 1 year ago (1 children)

Three years ago, yes. Now? not so much.

[–] Rin@lemm.ee 12 points 1 year ago (3 children)

i mine monero while idle and it prints a massive 0.03GBP a day :)

[–] ThanksForAllTheFish@sh.itjust.works 15 points 1 year ago (2 children)

Serious question, wouldn't it be cheaper to buy it?

[–] Rin@lemm.ee 8 points 1 year ago

given i have solar panels, it's technically free money.

load more comments (2 replies)
[–] joyjoy@lemm.ee 13 points 1 year ago

JavaScript will actually open the print dialog.

load more comments (1 replies)
[–] tias@discuss.tchncs.de 34 points 1 year ago (6 children)

I actually have that teapot and I use it several times a week.

[–] protput@lemmy.world 10 points 1 year ago (1 children)
[–] tias@discuss.tchncs.de 14 points 1 year ago* (last edited 1 year ago) (2 children)

Thanks! In computer graphics it's referred to as the "Utah teapot" because the 3D model was created at the University of Utah. But it was originally a Melitta brand teapot. It is still manufactured by German company Friesland, which I bought it from.

Unfortunately it appears they recently had a fire and their webshop is temporarily closed, but I think you can also get it off of Amazon.

load more comments (2 replies)
load more comments (5 replies)
[–] HiddenLayer5@lemmy.ml 27 points 1 year ago (3 children)

Cat is a fluffy animal, not for reading shit

[–] the_lemming@lemm.ee 8 points 1 year ago

Writing 'echo' cannot do anything. Everyone knows echo works with sound only.

Cat is a fluffy animal, and for shreading shit

[–] nyan@lemmy.cafe 24 points 1 year ago (1 children)

Enough people have thought of while (true){ print(money); } for manufacturers to have built stuff into printers to prevent that, alas.

load more comments (1 replies)
[–] Isoprenoid@programming.dev 23 points 1 year ago (3 children)

Can someone explain this joke to me

"I'm writing a recursive method with threads to optimize the CPU usage in a 0.02%"

I understand everything apart from the "in a 0.02%". What does that mean? How can something be in a percentage?

[–] obosob@feddit.uk 39 points 1 year ago

It's a nonsensical statement to us programmers too.

[–] Sheik@lemmy.world 24 points 1 year ago

I think they meant « by ».

[–] peopleproblems@lemmy.world 8 points 1 year ago (1 children)

It's a double joke. For programmers, it's pretty useless unless your in high performance computing.

If you're on the nitty gritty OS or CPU itself, 0.02% optimization can mean significant improvememt of different things but because it is otherwise unitless, it is equally useless to the reader.

load more comments (1 replies)
[–] LillyPip@lemmy.ca 20 points 1 year ago* (last edited 1 year ago) (5 children)

Socrates said books were dumbing down humanity because, since people could just look things up in books they wouldn’t have to memorise information anymore, and that made their brains soft.

Ever since society began, some people have been convinced the next generation’s technology was going to be society’s downfall, whether it was Socrates’ books, the telegraph in the 1800s, radio, the (land line) telephone, dishwashers (women will become lazy and unsuitable wives and mothers), screened windows (society will collapse because you won’t hear your neighbours and pedestrians on the street, we’ll all become hermits and die holed up in our homes), comic books would rot the brains of the youth, then music, then video games… it goes on and on.

So far, those predictions have never been true. Every older generation freaks out when the ones after come of age. It’s like societal growing pains.

[–] eldain@feddit.nl 7 points 1 year ago (2 children)

I think this is one step further, that technology has become so abstract and complex that people who focus on different crafts and careers are using magical black boxes. It blows my mind how my neighbour goes through life without any concept of what a phone app is. He just uses functionality and memorized the associated logo. I'm an engineering wizard to him.

load more comments (2 replies)
load more comments (4 replies)
[–] 1024_Kibibytes@lemm.ee 14 points 1 year ago (3 children)

Increasing the CPU optimization by 0.02% does seem crazy to me. If you're going to spend time working on something, make it worthwhile. Also, isn't while(true) {print(money)} Microsoft, Apple and Amazon:s business model?

load more comments (3 replies)
[–] Kolanaki@yiffit.net 11 points 1 year ago* (last edited 1 year ago) (2 children)

while{true}{print "money"};

moneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoney

[–] funkajunk@lemm.ee 6 points 1 year ago (2 children)

moneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoneymoney

load more comments (2 replies)
load more comments (1 replies)
[–] dylanTheDeveloper@lemmy.world 11 points 1 year ago (1 children)

I bet ATMs would have a while true print money function

[–] coloredgrayscale@programming.dev 7 points 1 year ago (1 children)

Almost:

While (hasMoney())
Print(money)

load more comments (1 replies)
[–] somegeek@programming.dev 8 points 1 year ago

Math professorss be like:

[–] spez@sh.itjust.works 6 points 1 year ago* (last edited 1 year ago) (1 children)

I always wonder what the original post was. Something like "Stop doing science!" or some shit but seriously rather than sarcastically.

[–] d_k_bo@feddit.de 29 points 1 year ago (2 children)
[–] spez@sh.itjust.works 6 points 1 year ago

Ah ha! Thanks, I thought this spawned on some conspiracy facebook group

load more comments (1 replies)
[–] Ogeon@programming.dev 6 points 1 year ago (4 children)

To make things worse, that teapot doesn't have a bottom surface.

load more comments (4 replies)
load more comments
view more: next ›