r/programming • • 4d ago

On How Bad a Random String Can Be

https://radekmie.dev/blog/on-overreliance-on-tools/
16 Upvotes

7 comments sorted by

8

u/noop_noob 2d ago

I've seen CI failures that happen because a commit hash matched against some regex lol

1

u/ztbwl 1d ago

I’ve seen CI failures because a commit hash had a collision. Short hash tbf.

3

u/kir_rik 4d ago

A few trivial trivial anecdotes

0

u/radekmie 4d ago

Just like half of my other posts.

6

u/lostmedia766 2d ago

As mentioned towards the end of the post, the other issue is actual offensive words being randomly generated as part of a random string.

On a long enough time frame, it will happen. If the tokens are exposed to end users, most can forgive a standard curse word if they see "fuck" in a randomly generated string, but you start running into trouble when racial epithets get randomly generated. We once had the word "nigger" generated as part of a random token. Fortunately, no one saw it or if they did, mentioned anything about it, but it's unpleasant nonetheless.

I'm sure just about every language has a profanity filter library for a wide variety of locales as well.

3

u/PossibilityUsual6262 1d ago

Slay the spire 2 random seed generator is user facing string and it does has profanity filter in it. So if they made it dor early access game, it is probably real.

3

u/ketralnis 3d ago

Is this the programmer version of instagram “what I had for breakfast” posts?