in reply to Questions: how to exclude substring having Evil meanings

lihao:

I've never had to do such a thing, but I'd suggest simply removing all vowels from the alphabet you use to generate the codes. That way there wouldn't be anything pronouncable. It's certainly a lot simpler than worrying about stop word lists and the attendant worries of missing some foul words in other languages...

...roboticus

Update: At least I hope that no languages have pronounceable words without vowels in the standard ASCII set.

  • Comment on Re: Questions: how to exclude substring having Evil meanings

Replies are listed 'Best First'.
Re^2: Questions: how to exclude substring having Evil meanings
by Fletch (Bishop) on Dec 02, 2009 at 17:08 UTC

    At least until someone gets in a huff about getting a code SH1T455 or 455H0L3 or . . . :)

    There's always Regexp::Common::profanity (and variants specialized for other locales and languages), but you'd (the OP, that is) want to examine them to make sure they handle everything you're worried about.

    Update: Or another idea: just use a hex representation of the record number (which'll be longer than 7 chars, but you'll only have to worry about offending Hindus or vegans with DEADBEEF :).

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

      Too true ... I think the problem is somewhat artificial, as people can find all sorts of things to be unreasonable about. ;^)

      Sure, we could omit digits that look like vowels from the alphabet (0, 1, 3, 4), but then someone'll complain about stuff when you turn the code upside down or some such.

      ...roboticus
      ... you'll only have to worry about ...  DEADBEEF ...

      I once had someone complain to me – only semi-facetiously – about the presence of 666 in some identifier or other. And then you have to worry about 13 (Europe/NA), 4 (China), etc., etc.

        Don't forget about the possibility that they might be standing on their heads when they see "5318008".
Re^2: Questions: how to exclude substring having Evil meanings
by ikegami (Patriarch) on Dec 02, 2009 at 17:23 UTC

    At least I hope that no languages have pronounceable words without vowels in the standard ASCII set.

    Words can still be quite readable when removing letters. Look at personalized license plates for an example. We're trained to see words in letters even when there aren't none.

      ikegami:

      True, but if you're going to try to prevent people from reading their own meaning into things, we may as well abandon all forms of communication.

      ...roboticus

        Hi MTHRFCKR*, I'm just trying to fulfill the OP's request. I didn't think much about the validity of the request, but I doubt it's as white and black as you say.

        * — Just a vowel-less random id example.

        Yes, yes yes.. rock on. I mean.. Will someone be offended if they have something like l053r, because it looks like loser? Grr.. Is this coding or PR under fascism? Give us a operating system to run our metro rail system.. and it must be in sentiment withour moral values and feelings about abortion and political inclinations..
Re^2: Questions: how to exclude substring having Evil meanings
by QM (Parson) on Dec 04, 2009 at 01:49 UTC
    Tsk tsk tsk, hmm, shh, and the rare cwm, to name a few.

    -QM
    --
    Quantum Mechanics: The dreams stuff is made of