Troll the Trolls Part 2 Instructions and Test

Trolls can view the posts made by everyone, while the posts made by trolls can be viewed only by other trolls. This might not be so clear from the instructions which say " Make sure that the trolls can only interact with each other.". Also, the solution which denies trolls to view posts made by non-trolls

bool display_post(AccountStatus poster_status, AccountStatus viewer_status) {
  bool poster_troll = poster_status == AccountStatus::troll;
  bool viewer_troll = viewer_status == AccountStatus::troll;
  return poster_troll == viewer_troll;
}

passes all the test. Any thoughts on this?

Sorry for the late reply.

If I understood @vaeng correctly, this task #2 of the Troll the Trolls exercise is based on how social media companies “shadow-ban” misbehaving users. Their posts will only be shown to themselves and other trolls but not to “normal users”, while the posts of normal users will be shown to everybody. That way the trolls can scream into the void without affecting the “good users” and they cannot detect easily that they are being shadow-banned.

I think you’re right, I’ve seen many solutions that did not implement this function display_post() in the spirit of shadow-bans. We should probably improve the instructions and add another test.

Thanks for the reminder, we’ve put it on the TODO list of the C++ track but haven’t been working on the issue yet.

1 Like