I'd like to continue the discussion from my Gun Laws post. I just read this interesting post by Paul Phillips (including the comments), and I think my opinion on "What should be done to prevent these incidents?" is: Nothing. He brings up a good point about Bayesian inference, something I re-learned a few months ago for an AI project. Read this next bit carefully: Just because the percentage of school shooters that write disturbing material is high does not mean that the probability that someone who writes disturbing material will become a school shooter is high. This is a common fallacy in how humans perform probabilistic reasoning. It's not immediately obvious and can seem counterintuitive. Accusingly investigating every instance of disturbing writing by a teenager is definitely not the right course of action. The result would be further restriction of liberty for the illusion of more safety, something the government seems to favor.
The other good point he makes is that these school shootings are extremely rare. Fearing them is as illogical as fearing a terrorist attack or a plane crash. It's just not going to happen to you. Worrying about car crashes or heart disease or cancer is a much better use of your fretting.
I agree with Uncle Steve that everyone that carries a concealed firearm should go through a training course and get a permit. The problem is that, because our society is so relatively peaceful, so few people feel the need to go through that process to get firearm permission. I, luckily, have never felt so threatened that I needed to have a gun for my own protection. And I think I'm in the majority on this. So, until our society gets more violent, school shooting prevention by way of armed bystanders isn't really going to happen.
So to answer the question of, "What should we do about this?" My answer is, "Mourn the dead and remind yourself how rare these events are." And that's it.