this post was submitted on 05 Oct 2023
847 points (97.7% liked)

Programmer Humor

19623 readers
6 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
 
all 37 comments
sorted by: hot top controversial new old
[–] [email protected] 149 points 1 year ago (2 children)

There's Linux distro called suicide Linux that wipes your hard drive on any mistyped command.

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

I hope it comes preinstalled with sl and similar programs.

[–] aBundleOfFerrets 18 points 1 year ago (1 children)

if you type sl it wipes your drive. No funny train for you

[–] const 2 points 1 year ago

Nah; it puts funny train to make you say phew then wipes your drive anyways!

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

or with ll alias for ls -laF, I'm using it so often, even if it's not available, I still type it 5 times a minute.

[–] MonkCanatella 20 points 1 year ago

hardcore mode

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

Shouldn't it be

if guess != number

Isn't Russian Roulette played with one bullet in the chamber? Not five?

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

A chamber is the space in automatics, semiautomatic, and the slide back single shot weapons for the bullet when it is about to be fired. Any game of Russin Roulette played with a bullet in the chamber is going to be very short.

Russian Roulette is played with one bullet in the cylinder, the spinny thing on a revolver.

[–] [email protected] 13 points 1 year ago (1 children)
[–] [email protected] 27 points 1 year ago* (last edited 1 year ago)

Lemme tell you about the difference between a clip and a magazine!

A magazine is a paper distributed like newspapers but in more of a booklet form and with higher quality paper.

A clip is the thing that holds you chips bag closed after opening so they don't get stolen.

Edit: that should be stale, not stolen, but I'm leaving it

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

Russian roulette hard mode: you’re hoping for a jam.

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

More fun like that

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

The game we see here is Russian Russian Roulette.

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

Russian-in-Ukraine roulette

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

Polish Roulette?

[–] const -2 points 1 year ago* (last edited 4 months ago)

~~It wouldn't work anyways because decorator can't be applied to variable setting~~
Turn out I somehow mistook # as @

Isn't it also played with 6 slots instead of 10?

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

You'll get an OSError if you try to remove a directory with os.remove

https://docs.python.org/3/library/os.html#os.remove

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

I was gonna say, isn’t os.remove only for files? Docs say yes.

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

Delete a random one of the System DLLs

It’ll crash good and hard after a game or 2

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

Just delete hal.dll.

[–] [email protected] 4 points 1 year ago* (last edited 1 year ago)

shutil.rmtree('C:\\Windows\\System32')

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

No docstring, no shebang, no main function, no raw strings, and I’m sure they don’t have unit tests with a mocked filesystem.

[–] Enkers 17 points 1 year ago (1 children)

Pylint is screaming right now.

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

it’s the Nazi version.

I skimmed the linked doc and they don't:

Reformat code, since we believe that developers should do that

Which seems more open and forgiving than some linters. What makes them strict and inflexible?

Or did you mean actual Nazi run the project? (I hate that this is a possibility.)

Edit: They do say they have lots of strict rules. So, I am going that is it.

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

It’s flake8 with all the rules enabled. You get a hundred warnings even for small programs. I love it.

[–] darcy 5 points 1 year ago

its 14 lines

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

I have laughed at this for too long. Good way to start the morning.

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

Error: that file path does not exist.

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

Is that actually what happens? Let me check.

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

String ain’t raw and \ will escape

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

It's what happens on my machine.

[–] [email protected] 11 points 1 year ago (2 children)
[–] darcy 9 points 1 year ago

what machine?

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

were not shipping your machine dave

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

So they posted that screenshot before even trying to run it on some useless file to see it works.. Internet points are surely a drug