The effectiveness of terrorism is premised on the irrationality of humans. In general, we fear what we cannot control, even if the chances of being affected are exceedingly slim. For example, the fear associated with flying results from a sense of "life at the hands of the pilot" rather than in our own hands when driving. The dangers associated with either are equal on an hour by hour comparison of flying versus driving. Fear of flying further stems from a sense of spectacular death and a general loss of control when thirty-thousand feet in the sky as opposed to feet on terra firma.
On the topic of terrorism, the purpose is to achieve ones ends with the least amount of time and effort. Or to leverage one's actions to the greatest effect. So by playing to the human fears of (1) lack of control and (2) spectacular death, terrorists are able to promote their agenda with limited random killings.
If we want to formulate more effective foreign policy we must weigh terrorism against a range of legitimate concerns. To prevent fear from driving our actions we need to understand terrorism as merely a scourge like any others which has a minuscule chance of affecting us. To do this we should engender a sense of fatalism in all of us. This is exactly what we do when we climb in our car, go for a hike in the mountains, or live or lives with the always present risk of death by fatal disease. No sense in losing sleep over what is only a remote possibility.