6 points

isn’t randint range inclusive? thus random.randint(0, 6) == 1 has a 1 in 7 chance, not 1 in 6. Most revolvers, assuming this is emulating russian roulette, have 6 cylinders, not 7.

permalink
report
reply
0 points

You’re right. I didn’t make this, but maybe the creator was accounting for the round in the chamber? I don’t guns, so no clue.

permalink
report
parent
reply
4 points

Revolvers don’t have the concept of one-in-the-chamber, only semi-auto pistols do, and you can’t play russian roulette with semi-autos :P (well you could, but 99% of the time, barring unexpected jams, the first person to go would lose)

Anyway I’m guessing it’s a bug :) - as the saying goes “no code is too short to be bug-free”

permalink
report
parent
reply
2 points

Good to know! Makes it easier to decide what to get next time I play Russian roulette.

permalink
report
parent
reply
5 points

Let’s all love lain.

permalink
report
reply
6 points

Oh hell, you gave me a PTSD flashback!

It’s the late 90s. My mother suddenly discovers File Explorer on her refurbished commodity Wintel box and decides that all this messy clutter has to go. Never mind that the drive was 80% empty when delivered and I didn’t expect her to come close to filling it before it was replaced. Fortunately I had already backed up everything that looked important or interesting.

One day she calls from the office, “I don’t need this ‘Windows’ any more, do I?”

“What? Wait! Don’t do anything!” I walk in and she’s got C:/Windows highlighted and the cursor is hovering over “Delete”.

“I already have Windows installed on this computer, so I don’t need this any more, do I?” Spoken more as a statement than a question. It took several minutes of forced calm explanation to get her to accept that this “Windows” directory WAS the Windows that’s installed on the machine. She still wasn’t happy that she could see it in File Explorer, though. So untidy!

permalink
report
reply
8 points

Thought I’m on lainchan for a minute

permalink
report
reply
31 points

That can’t remove a directory.

permalink
report
reply

Programmer Humor

!programmer_humor@programming.dev

Create post

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

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics

Community stats

  • 3.3K

    Monthly active users

  • 1K

    Posts

  • 37K

    Comments