The answer is structuring society, socialization, and culture in a way that doesn't disenfranchise people or leave them feeling helpless enough to turn to extremism, hate, and violence.
But that requires empathy and effort, things often in short supply.
People only go down the dark paths that lead to 8chan et al when the avenues to belonging they were presented with by their parents and by default failed them.
Why are invoking alt-right? One of the two shooters was radically left, and he posted his threats on Twitter.
This bubble is so large it no longer appears to be a bubble.
Is that what passes as reasoned thinking these days?
I call him radical because he actually was. He posted overt, politically charged threats on Twitter, for example: "I want socialism, and i’ll not wait for the idiots to finally come round to understanding."
Edit: seems we have some Nazi-sympathizer downvoters on HN.
Go figure.
Fascists or Ethno-Centrists are both better terms, and cover the ideologies that most people attribute to the alt right.