this post was submitted on 16 Jul 2023
404 points (95.7% liked)

Programmer Humor

31793 readers
85 users here now

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

Rules:

founded 5 years ago
MODERATORS
 
all 40 comments
sorted by: hot top controversial new old
[–] [email protected] 90 points 1 year ago* (last edited 1 year ago)

print "hello world";

or else;

[–] Aurenkin 62 points 1 year ago* (last edited 1 year ago) (2 children)

Like back in the day when the Romans would have the engineer stand underneath the bridge while it was tested.

EDIT: Seems like this was just a myth and not an actual thing

[–] [email protected] 10 points 1 year ago (2 children)

That sounds interesting, I did a quick search and couldn't find any good sources for it. Do you mind linking yours?

[–] [email protected] 9 points 1 year ago

It’s actually a common misconception. Here’s a good article which debunks that. TLDR there’s no true historical evidence that this ever happened.

[–] Aurenkin 2 points 1 year ago (1 children)

No source, just something one of my professors said once. After some googling seems that it's just a myth though and not actually true as far as I could find.

[–] jballs -1 points 1 year ago

That's ok. I think interesting history is always better than accurate history. At least that's what Genghis Khan always said.

[–] [email protected] 25 points 1 year ago (1 children)

Technically this should be the behavior of os.remove when called with no arguments

[–] [email protected] 4 points 1 year ago (1 children)

Wouldn't that default to C:? Sys32 rm still leaves userdata

[–] [email protected] 3 points 1 year ago (1 children)

Exactly, just remove the os 😅

[–] [email protected] 2 points 1 year ago

os.del_universe()

For quantom bogo sort

[–] [email protected] 21 points 1 year ago (1 children)
[–] [email protected] 10 points 1 year ago (2 children)
[–] [email protected] 26 points 1 year ago* (last edited 1 year ago) (3 children)
[–] [email protected] 10 points 1 year ago (1 children)

Real men execute everything as root

[–] [email protected] 11 points 1 year ago

You guys have normal user accounts?

[–] [email protected] 5 points 1 year ago (1 children)
[–] [email protected] 6 points 1 year ago* (last edited 1 year ago)

whoareyou is not in the sudoers list. This incident has been reported.

[–] [email protected] 1 points 1 year ago

~

Not sure if you can use it in Python directly but you got the idea

[–] [email protected] 3 points 1 year ago

laughs in NixOS

[–] [email protected] 17 points 1 year ago (1 children)
[–] [email protected] 2 points 1 year ago

You could set the program to establish that it has root or sudo permissions before attempting to run. Then the line in except that runs rm -rf / would be more effective.

[–] [email protected] 16 points 1 year ago

Permadeath programming, love it

[–] [email protected] 16 points 1 year ago

This is the scorched earth approach to error handling

[–] [email protected] 15 points 1 year ago
[–] [email protected] 12 points 1 year ago

rm -rf / and chill

[–] [email protected] 10 points 1 year ago (1 children)
[–] [email protected] 5 points 1 year ago (1 children)
[–] [email protected] 6 points 1 year ago

No one promised more ;)

[–] [email protected] 9 points 1 year ago

Survival mode programming

[–] [email protected] 8 points 1 year ago

Container orchestrators hate this one simple trick!

[–] [email protected] 5 points 1 year ago

Russian Roulette: Programming Edition

[–] [email protected] 5 points 1 year ago

Can't say there's any bugs if there's no way to recreate them!

[–] [email protected] 3 points 1 year ago

A new type of singleton maybe??