4 ms·
Huh, thanks for this. Will live in my head from now. Basically, in this situation, use (user_id, feature_name) for hashing, not just the user_id.
by xmonkee 4y ago
Huh, thanks for this. Will live in my head from now. Basically, in this situation, use (user_id, feature_name) for hashing, not just the user_id.
- dabeeeenster 4y agoHaha funnily enough that is our (Flagmsith's) exact algorithm!
- yiuywieyrw 4y agoA better way is to assign some internal salt to the feature at creation time and use that, that way you are not dependent on something external that user (the creator of the feature flag) could change. I bear the scars of this design mistake from when I worked for a company that provided feature flagging. It was not my initial mistake, but I drew the short straw trying to work around it.
- xmonkee 4y agoSolid tip, again.
- dekhn 4y agoIs there a more general term for tuple hashing? IE, math and theory around composition of hashes composed of concatenated (or otherwise combined) typed values?
- xmonkee 4y agoI think it's generally referred to as salting