this post was submitted on 16 Jul 2023
382 points (95.5% liked)

Programmer Humor

32045 readers
1922 users here now

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

Rules:

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

print "hello world";

or else;

[–] [email protected] 60 points 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.

[–] [email protected] 10 points 1 year ago (1 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.

[–] [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] 22 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] 11 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??