ocf / ocflib

Python libraries for account and server management
https://pypi.python.org/pypi/ocflib
Other
15 stars 32 forks source link

similarity_heuristic is bad #136

Closed bjb568 closed 4 years ago

bjb568 commented 6 years ago

The code smells and it has a ton of false positives and false negatives. I couldn't even describe to you what the function does without specifying the names of the multiple algorithms involved as well as the order and limits with which it processes match attempts. It would better off returning random.choice([0, 3]). This isn't to say that there's a better algorithm that can be used or that the code ought to be cleaned up, though those are probably both true statements, but the fundamental problem with requiring a similar username and real name is that not only is that similarity subjective, but nobody even knows what it means. That makes this not just a code smell, but a UX smell.

gpl commented 6 years ago

lol

kkuehlz commented 6 years ago

thanks!

kkuehlz commented 5 years ago

@bjb568 have you gotten the chance to work on this at all?

bjb568 commented 5 years ago

I don't think a good programatic solution exists.

dkess commented 5 years ago

It's fine if you want to make it more strict-- it'll just lead to more manual approvals over IRC.

bjb568 commented 5 years ago

I don't want to make it more strict. 💯

itskevinwang commented 4 years ago

aww my username got rejected :(

daradib commented 4 years ago

As the author of this special snowflake of a function, I want to apologize for all its defects and limitations. I'm rather surprised it hasn't been replaced in over 7 years. That said, I'd like to think it did a relatively decent job at minimizing the effort of a real name policy. ML would create an even more draconian code smell wrapped in an opaque box.

Without a real name checker, groups creating individual accounts, requests for account name changes, or offensive/hateful/trademark names might become more common, but I'm sure you've all judged the tradeoff to be worth it. Perhaps individual web hosting (where the username is public) is less applicable today.

bjb568 commented 4 years ago

TODO: add text to tell the user that their OCF account is tied to their calnet account.