r/programming • • 5d ago

On How Bad a Random String Can Be

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

7 comments sorted by

9

u/noop_noob 3d ago

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

2

u/ztbwl 2d ago

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

3

u/kir_rik 5d ago

A few trivial trivial anecdotes

0

u/radekmie 5d ago

Just like half of my other posts.

7

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 2d 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 4d ago

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