this post was submitted on 16 Jul 2023
350 points (95.6% liked)

Programmer Humor

32042 readers
1229 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 78 points 1 year ago* (last edited 1 year ago)

print "hello world";

or else;

[–] Aurenkin@sh.itjust.works 51 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 9 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 7 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 22 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 9 points 1 year ago (2 children)
[–] vettnerk@lemmy.ml 23 points 1 year ago* (last edited 1 year ago) (3 children)
[–] Hotzilla@sopuli.xyz 9 points 1 year ago (1 children)

Real men execute everything as root

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

You guys have normal user accounts?

[–] kionite231@lemmy.ca 4 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 16 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 14 points 1 year ago

Permadeath programming, love it

[–] Morphit@feddit.uk 14 points 1 year ago
[–] clutchmatic@lemmy.world 13 points 1 year ago

This is the scorched earth approach to error handling

[–] speaker_hat@lemmy.one 11 points 1 year ago

rm -rf / and chill

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

No one promised more ;)

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

Container orchestrators hate this one simple trick!

Survival mode programming

[–] ProcurementCat@feddit.de 6 points 1 year ago

Thanks for posting this, it sent me into a several minutes long focus on exceptions in python and how to handle them. I learned something valuable!

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

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

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

Russian Roulette: Programming Edition

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

A new type of singleton maybe??

load more comments
view more: next ›