News for hackers. Stuff that matters.
Re:I booted Linux 292,612 times by Thorrez on Wednesday June 14, 2023 @11:43AM (#36327670)
Always base the probability on something stable, such as hash of the username.
Re:I booted Linux 292,612 times by IshKebab on Wednesday June 14, 2023 @02:41PM (#36330593)
Bug report: changing my username breaks $product.

Yeah no thanks. It's probably better than completely random but software should be predictable and unsurprising.

Re:I booted Linux 292,612 times by burnished on Wednesday June 14, 2023 @04:10PM (#36331860)
The important part is the stability - if your usernames can change then they aren't stable so you don't select it.

I think it is a good reminder that most things you think of as being unchanging that are also directly related to a person.. aren't unchanging. Or at least any conceivable attribute probably has some compelling reason why some one will need to change it.

Re:I booted Linux 292,612 times by robocat on Wednesday June 14, 2023 @04:35PM (#36332230)
> changing my username breaks $product.

https://m.youtube.com/watch?v=r-TLSBdHe1A&t=14m10s

Discussing a performance regression due to longer username due to username being in ENVIRONMENT variable which changes memory layout of process.

Re:I booted Linux 292,612 times by btilly on Wednesday June 14, 2023 @04:42PM (#36332334)
I've used the hash of username+string trick before for a flag. I used it to replace a home-grown heavyweight A/B testing framework which had turned into a performance bottleneck.

It worked quite well.

Re:I booted Linux 292,612 times by dietr1ch on Wednesday June 14, 2023 @05:24PM (#36332927)
That's why you have internal user ids instead of using data directly provided by users.

Will it cost an extra lookup? It's cheap, and if you really need to, you could embed the lookup in some encrypted cookie so you can verify you approved some name->id mapping recently without doing a lookup.

Re:I booted Linux 292,612 times by hedora on Wednesday June 14, 2023 @08:52PM (#36335019)
Wait, we're talking about maliciously injecting bugs into your employer's software so they have the maximum impact, right?

Clearly, making sure that 1% of all teams gets fired for being unable to run unit tests, then slowly ramping that by a few percent each review cycle is a good strategy.

Ideally, the probability of breaking would drop off exponentially as you moved up the org chart. Something like "p ^ 1/hops_to_director_of_engineering" would work well. The trick would be getting the dependency to query ldap without being detected...

Re:I booted Linux 292,612 times by Thorrez on Wednesday June 14, 2023 @09:08PM (#36335135)
This is about a feature flag. It should be safe to flip it on and off, otherwise rollouts and rollbacks won't work.
Re:I booted Linux 292,612 times by patmorgan23 on Wednesday June 14, 2023 @07:00PM (#36334053)
You just need to be able to look up what feature flags where enabled on a given request (maybe by correlation I'd)
Re:I booted Linux 292,612 times by robertlagrant on Thursday June 15, 2023 @06:48AM (#36338650)
Or have the username be a number that is all the feature flags when converted to a binary representation. Then you can just have one username for each combination you want to test.
Re:I booted Linux 292,612 times by gurchik on Wednesday June 14, 2023 @08:53PM (#36335023)
You just need to make sure that this doesn't mean people are consistently "lucky" or "unlucky."

I was on a team where app updates were deployed using a canary system. A small percentage of users (say, 1%) received the update first, then the team watched for incoming crash reports from that cohort. If it looked good, the feature was rolled out to a few more people, and this was repeated. This allows you to identify a problem by only negatively impacting a relatively small percentage of customers.

The problem occurs when the calculation to determine which cohort the user belongs to is deterministic. In this case, the calculation was based on the internal ID of the user. This means some users always get the updates first, and deal with bugs more frequently than other users. Conversely, some users are so high in the list that they virtually never get an update until it's been tested by a wide user base, so their experience is consistently stable.

Or you might have a problem where some players in a video game consistently take more damage than their friends: https://news.ycombinator.com/item?id=34742505