So where do we go from here? How do we prevent this from happening again? It seems that there are two schools of thought (generalizing obviously): 1. Disarm everyone, and 2. Allow everyone to carry weapons. Regardless of which side you fall in, neither work perfectly unless they are complete (i.e. all weapons are gone thus criminals don't even have access, or everyone is armed and no one has the upper hand). The problem with both absolutes, is a deranged person will always find a means to carry out their ill will, whether that's a gun/knife/driving a car into a crowd.
The safest computer is encased in concrete, and buried 6 feet underground. Much in the same way, the safest society would have each of us locked in a room, with no interaction. What we have to figure out is this: How much liberty do we all give up, to limit the devastation of the senseless acts of a few?
Also, you don't have to be either for banning guns or having no regulations at all. Instead, a compromise of allowing regulated gun ownership would be better.
It seems to me that there are two problems here. The first is that we suck at finding/handling the mentally ill. These mass shootings are rare, but the connection between crime and mental illness in this country is anything but.
The second issue is of course that we do a piss-poor job of keeping guns away from the people they need to be kept away from.
Ideally both issues should be tackled.
Serial killers in general are perfectly aware of what they are doing, they just don't care about the judgement imposed by society on such actions and at the same time the personal payoff is too great to ignore.