the-algorithm/home-mixer/server/src/main/scala/com/twitter/home_mixer/functional_component/decorator/HomeTweetTypePredicates.scala at 7f90d0ca342b928b479b512ec51ac2c3821f5922 · twitter/the-algorithm

Source code for Twitter's Recommendation Algorithm - twitter/the-algorithm

GitHub
@fribbledom My reaction was closer to "WTF", but yours is "appropriate for all audiences". 
@fribbledom I definitely lack Scala knowledge, because that looks like some shit code to me.
@johnhattan @fribbledom this bit of code is building a giant map from string -> function (candidate -> bool). most of the Scala I've seen in here so far (very little) looks like pretty normal, serviceable Scala code.
@fribbledom incredible. any clues on what it does with that or

@fribbledom ah, found an apparent clue: https://github.com/twitter/the-algorithm/blob/7f90d0ca342b928b479b512ec51ac2c3821f5922/home-mixer/server/src/main/scala/com/twitter/home_mixer/functional_component/feature_hydrator/RequestQueryFeatureHydrator.scala#L86-L93

These author ID lists are used purely for metrics collection. We track how often we are serving Tweets from these authors and how often their tweets are being impressed by users. This helps us validate in our A/B experimentation platform that we do not ship changes that negatively impacts one group over others.

is this actually true? eh, hard to say, but it's not the most unbelievable lie they could've published. I'm not the most fluent Scala user, but it looks like this is a from a hardcoded list fed in from outside or something.

the-algorithm/RequestQueryFeatureHydrator.scala at 7f90d0ca342b928b479b512ec51ac2c3821f5922 · twitter/the-algorithm

Source code for Twitter's Recommendation Algorithm - the-algorithm/RequestQueryFeatureHydrator.scala at 7f90d0ca342b928b479b512ec51ac2c3821f5922 · twitter/the-algorithm

GitHub
@cxberger why should it be a lie? They got accused of favoring one group over the other so many times it makes sense to have some actual numbers.
@indyjonas i honestly don't care what they're doing with those numbers in the least right now but would rather not be crucified for "uncritically parroting whatever Twitter says" or something like that. i can't actually verify or refute that claim so it's just however much you trust Twitter's word on it

@cxberger @fribbledom Some people on birdsite said it's just for reporting. I searched for occurrences of the containing class and followed the chain up, it seems to be only used in 1 file, with the following comment:

/**
* Side effect that logs served tweet metrics to Scribe as client events.
*/

So, at a glance it seems like they're right. I'd guess the elon field got added when he was demanding to know why his tweets weren't getting more impressions.

@cxberger @fribbledom OK now this is an interesting conspiracy: https://mastodon.social/@rodhilton/110120753311723993
It could all be for show, and they specifically added it so that they could remove it and say "hey look we're taking politics out of the code"
@fribbledom
If author_is_elon
{
candidate=/=credible
}
Break
Loop
(Sorry I'm not a programmer lol)
@[email protected]
@fribbledom I thought it was a joke but is it REAL??? 🤯
@fribbledom a little bit embarrassing for sure but it makes sense for them to collect metrics on whether certain groups of people (including the singleton group consisting of just Elon) are getting underrepresented by the actual algorithm.
@fribbledom does political affiliation shows up as donkey/elephant shaped checkmark?
@fribbledom wondering if elon asked to add last lines just before release or not. To show how badly previous twitter was affiliated with govt.
the-algorithm/HomeTweetTypePredicates.scala at main · twitter/the-algorithm

Source code for Twitter's Recommendation Algorithm - the-algorithm/HomeTweetTypePredicates.scala at main · twitter/the-algorithm

GitHub

@jgg

That's the same file after they removed that part of the code.

@fribbledom "This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository." - Not on the main repository any more.

@fribbledom Now the page shows this:

"This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository."

But… on archive.org the first four snapshots don't have that message. Did the commit get force-pushed away?

@ixn

Yep, they wiped it from the branch's history, but not from the ref log.

@fribbledom Tf is this goofy shit
@d10d @fribbledom i know that you can "inject" fake commits by forking a github repo, adding a crafted commit to your fork, and then crafting a URL on the main repo with your specific commit hash. Due to internal details, Github will happily display your commit. So, without any additional proof, it seems to be more fake than real :-s

@tgoldoin @d10d

Nah, this isn't fake. It's been part of the original release, but they quickly wiped the branch's history.

@fribbledom @d10d Indeed, it seems I was wrong, as this subject is heavily discussed on HN: https://news.ycombinator.com/item?id=35391433
Twitter's Recommendation Algorithm | Hacker News

@fribbledom
Have you noticed the date when "the algorithm" was published?
@fribbledom I thought it became general consensus that this was actually just a measurement tool to demonstrate if there was algorithmic bias.