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

Programmer Humor

32483 readers
424 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
[–] Hupf@feddit.de 88 points 1 year ago* (last edited 1 year ago)

print "hello world";

or else;

[–] Aurenkin@sh.itjust.works 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.

[–] JackGreenEarth@lemm.ee 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?

[–] dukk@programming.dev 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.

[–] mvee@lemmy.ml 25 points 1 year ago (1 children)

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

[–] GlitchyDigiBun@lemmy.dbzer0.com 4 points 1 year ago (1 children)

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

[–] mvee@lemmy.ml 3 points 1 year ago (1 children)

Exactly, just remove the os 😅

[–] treesoid@lemmy.world 2 points 1 year ago

os.del_universe()

For quantom bogo sort

[–] NorthWestWind@lemmy.world 22 points 1 year ago (1 children)
[–] programmer_belch@lemmy.dbzer0.com 10 points 1 year ago (2 children)
[–] vettnerk@lemmy.ml 26 points 1 year ago* (last edited 1 year ago) (3 children)
[–] Hotzilla@sopuli.xyz 10 points 1 year ago (1 children)

Real men execute everything as root

[–] flashgnash@lemm.ee 11 points 1 year ago

You guys have normal user accounts?

[–] kionite231@lemmy.ca 5 points 1 year ago (1 children)
[–] vettnerk@lemmy.ml 6 points 1 year ago* (last edited 1 year ago)

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

[–] vkirlin@lemmy.world 1 points 1 year ago

~

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

[–] Ultra980@lemmy.world 3 points 1 year ago

laughs in NixOS

[–] Knusper@feddit.de 17 points 1 year ago (1 children)
[–] bhez@lemmy.ml 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.

[–] james@lemmy.jamesj999.co.uk 16 points 1 year ago

Permadeath programming, love it

[–] clutchmatic@lemmy.world 16 points 1 year ago

This is the scorched earth approach to error handling

[–] Morphit@feddit.uk 15 points 1 year ago
[–] speaker_hat@lemmy.one 11 points 1 year ago

rm -rf / and chill

[–] tracyspcy@lemmy.ml 10 points 1 year ago (1 children)
[–] clutchmatic@lemmy.world 5 points 1 year ago (1 children)
[–] tracyspcy@lemmy.ml 6 points 1 year ago

No one promised more ;)

Survival mode programming

[–] mvirts@lemmy.world 8 points 1 year ago

Container orchestrators hate this one simple trick!

[–] JohnSaveourSocks@lemmy.world 5 points 1 year ago

Russian Roulette: Programming Edition

[–] AstralWeekends@lemm.ee 5 points 1 year ago

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

[–] pythonoob@programming.dev 3 points 1 year ago

A new type of singleton maybe??