Bad actors vs bad behaviors
It's a tempting thought to consider online harassment as something that bad people do; if we could identify all the bad people and keep them out of our websites, then we wouldn't have any harassment anymore. However, often the kinds of people who harass others online appear just like anyone else. They may be motivated by difficult life circumstances, or even the time of day. It's also sometimes possible to help someone realize that their behavior is harmful and rehabilitate them, rather than kicking them permanently out of a community.
Because of the nuance involved in identifying who's doing the harassing and why, it makes more sense to think of online harassment as individual bad behaviors, rather than bad actors doing the bad things that bad people do.
You can read these articles to learn more about the psychology of online trolls:
I also like to think about modeling online behavior in the form of cats.
My cat Unix is an indoor cat because even though she is usually very good and kind, she cannot be trusted outdoors by herself. This is because her two favorite activities are sitting on laps, and attacking other cats who have done nothing to provoke her.
There are a few ways we could handle Unix being a jerk to other cats. We could board up all the doors in the house so no one could ever leave, but that would be difficult because I need to leave sometimes to buy food and other stuff
We could put up a small gate so that human-sized creatures can step over the gate, but cat-sized ones won't be able to
We could let her outside under supervision
Or we could let her do whatever she wants, but always spray her with a hose when she's bad so that she'll reconsider being bad in the future
Every feature in a software application is a potential "hole" that a cat (user) could climb through to harass another cat (user). For our purposes today, it's not necessary to consider why this cat/user would bother doing that; if they are sufficiently bored or motivated, they're going to do it. Whenever you're considering adding a shiny new window to your house, always think about how a cat with bad intentions could find a way to climb through.