Skip to content

Make auto-generated usernames for anonymous users less "evil" or negative #1

Description

@supermacro

The autogenerated usernames for anonymous users have a negative / evil tone to them.

Desired Outcome:

  • Prevent usage of negative words
  • Ensure there is still a high degree of words to prevent unique constraint violations

Other conversations from Linear:

Source: https://repl.it/@gDelgado14/QuirkyForsakenBrowsers

The goby package has a 1 in 5000 (0.02%) chance of creating a duplicate username with the following config:

goby.generate(['adj', 'pre', 'suf'])

Desired Outcome

Improve upon the current anonymous username generation code to reduce the likelihood of collisions.


"i think the negative/evil tone maybe because goby use comic book style names, i'm not sure why we can't check if a username already exists in db and filter based on that. or are anonymous users not stored in db"


Yeah, it's the goby package. You can modify / enhance their dictionary, but I have not gotten around to that.

i'm not sure why we can't check if a username already exists in db and filter based on that.

Hmm, yes we could do that. I would be concerned over performance. But I have telemetry that tells me if a particular endpoint is being "slow":

https://github.com/parlez-vous/server/blob/master/src/index.ts#L21

Also, I just realized there is no unique constraint on anonymous usernames:

https://github.com/parlez-vous/server/blob/master/schema.prisma#L48

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions