Wednesday, December 30, 2009

Not allowed to stand up before landing

According to new flight safety regulations, passengers are not allowed to stand up and go to the restroom one hour prior to landing of the aircraft. How about handcuffing all passengers and tie them to their seats so that they do not budge? Better yet, how about restricting air travel on a need-to-fly basis? Surely, that would improve security...

The USA, as a civilized western democracy, should reign in bureaucrats in charge of flight safety regulations. The current mindless race for safety measures is hopelessly ineffective and is wasting millions of hours of passengers' time. Worse, it signals to those who wish to harm our societies that America is in a state of panic.

Terrorist no longer even have to mount a successful attack. By disrupting airline travel to its present extent, they are already causing serious damage to us all.

Given that it is not possible to physically prevent all terrorist attacks, instead of imposing increasingly stringent measures on the general population, western-civilization should mount a sustained cultural response to counter the retrograde mentality that breeds extremism. A TV-station in Arabic, broadcasting from the Maghreb to Yemen, could present a gentler and more caring face of our civilization. At the another level, local teachers could be helped in various ways to teach their pupils that there is more to life than blowing oneself up in a "martyrdom operation" in the hope of getting chicks in paradise. If the candidates for "martyrdom operations" were taught that using one's life as well as that of others', regardless of creed, as a means to a political-end, was unjust, they would refuse to participate in such operations. If in addition, the candidates were both unwilling and critical, those commissioning the attacks would presumably be hesitant as well.

We need to engage the Muslim world, not by succumbing to its purported demands, nor by militarily invasion, but through multiple channels and in ways respecting the dignity of each. Countering Salafist ideology is too important to be left to a minority of journalists such as Caroline Fourest and Mohamed Sifaoui.

Thursday, December 17, 2009

Eclipse template for creating new loggers

Here is the Eclipse template I use for creating new logger fields in my code.
${:import(org.slf4j.Logger, org.slf4j.LoggerFactory)}Logger logger = LoggerFactory.getLogger(${enclosing_type}.class);
${cursor}

The import and the logger declaration are on the same line, i.e. without a separating new line character, whereas ${cursor} is placed on a new line.

To insert the template in Eclipse, go to Window->Preferences->Java->Editor->Templates and select "New...". I usually name the template as "nlog".

Once the template is inserted, you can insert a new logger in Java code, by typing "nlog" (the name of the template) followed by Ctrl-Space.

HTH,