Absolutely Essential

January 31, 2010

I am guiding my niece in India with some of her undergraduate programming course work. She is learning C++ as her first programming language. And she is facing some hurdles getting the development environment installed on her machine.

There are just too many hurdles when you are a beginner programmer. And I believe that it would have been much better if she would have started to program in Python or JavaScript or Java.

Here is my list of the absolutely essential programming languages and skills that a new software engineering graduate should master:

What do you think?

Google Apps

January 15, 2010

I receive frequent requests to help setup a website or design a new app. Earlier I would have asked them to use a content management system such as Movable Type or WordPress.

But now I ask them to use Google Apps Standard Edition and to register for a new domain at the same time. You get Google Sites which allows you to post content but you also get email, docs and all of the other goodies from Google Apps.

Tranquility

February 14, 2009

Satisfaction and tranquility are the key to happiness.  If a poor person is content with what he has, and is not desirous or envious of others, then he is more happier than a rich person who has all of the wordly possessions but is still not satisfied.

Live in this world as if it is but a way station on a longer journey.

Friendfeed

February 14, 2009

To learn about technology and the various happenings in the Bay area, I would recommend following the founders of friendfeed.com.  Paul, Bret, Jim, and Sanjeev share the knowledge and wisdom, so that we all can benefit.

You can follow me at friendfeed.com/shakeel

ThinkPad Top 10 Tips

1. Presentation Director  <Fn+F7>: this
key combo brings up a utility to manage dual displays and projectors.
Next time you fumble around trying to get your slides on the screen,
losing your audience’s attention, find this tool and start presenting
and not messing around.


2. UltraNav Wizard <Fn+F8> Turns on/off the pad or stick and customizes the pad hotspots.

3. Full Screen Magnifier <Fn+Spacebar>.
Suffer from hypermetropia (farsighted?), hit this key combo and you’re
in the land of large type. Hit it again and the display goes back to
its original state.

4. TrackPoint Center Button
location-sensitive magnifier or scroller. Find the center button, hold
it down, and scroll to your heart’s content with the Trackpoint.

5. Hardware wireless on/off switch  Few
people know where to find it or why to use it. It’s under the front
edge of the keyboard and is a great aid when the pilot tells you to
shut off your wireless.

6. Wireless Controls <Fn+F5> also
invokes the radio control user interface, which is useful if one wants
to shut down unneeded wireless components to save battery power.

7. Active Protection System: the “airbag.”
This feature uses a motion detection system to detect as shock to the
system, parking the hard drive so the read/write heads won’t crash
fatally into your data. Also hacked by some users to enable “knock” commands.

8. Power Manager, <Fn+F3>. This key
combo invokes the power scheme manager,where the user can set charge
thresholds to maximize battery life (not minutes of charge, but overall
lifespan before having to buy a new one, and they’re expensive)

9. Fingerprint sensor and password manager
application. Swipe your finger over the sensor, and store other
passwords in the security manager application.

10. Shutting down your system when it’s hung
and nothing else works (press the Power key for 6 seconds).  When all
else fails, just find the power button, press down, and voila, you’re
back in the game. 

David Hill

It’s the Policy, Stupid

September 5, 2006

It’s the Policy, Stupid
Political Islam and US Foreign Policy

John L. Esposito
is University Professor of Religion & International Affairs and
Director of the Prince Alwaleed Bin Talal Center for Muslim-Christian
Understanding at Georgetown University. He is the author of Unholy War: Terror in the Name of Islam and co-author with Dalia Mogahed of Can You Hear Me Now? Listening to the Voices of 1 Billion Muslims (forthcoming).

US foreign policy and political Islam today are
deeply intertwined. Every US president since Jimmy Carter has had to
deal with political Islam; none has been so challenged as George W.
Bush. Policymakers, particularly since 9/11, have demonstrated an
inability and/or unwillingness to distinguish between radical and
moderate Islamists. They have largely treated political Islam as a
global threat similar to the way that Communism was perceived. However,
even in the case of Communism, foreign policymakers eventually moved
from an ill-informed, broad-brush, and paranoid approach personified by
Senator Joseph McCarthy in the 1950s to more nuanced, pragmatic, and
reasonable policies that led to the establishment of relations with
China in the 1970s, even as tensions remained between the United States
and the Soviet Union.

As Islamist parties continue to
rise in prominence across the globe, it is necessary that policymakers
learn to make distinctions and adopt differentiated policy approaches.
This requires a deeper understanding of what motivates and informs
Islamist parties and the support they receive, including the ways in
which some US policies feed the more radical and extreme Islamist
movements while weakening the appeal of the moderate organizations to
Muslim populations. It also requires the political will to adopt
approaches of engagement and dialogue. This is especially important
where the roots of political Islam go deeper than simple
anti-Americanism and where political Islam is manifested in non-violent
and democratic ways. The stunning electoral victories of HAMAS in
Palestine and the Shi’a in Iraq, the Muslim Brotherhood’s emergence as
the leading parliamentary opposition in Egypt, and Israel’s war against
HAMAS and Hizbollah go to the heart of issues of democracy, terrorism,
and peace in the Middle East.

Global terrorism has also
become the excuse for many Muslim autocratic rulers and Western
policymakers to backslide or retreat from democratization. They warn
that the promotion of a democratic process runs the risk of furthering
Islamist inroads into centers of power and is counterproductive to
Western interests, encouraging a more virulent anti-Westernism and
increased instability. Thus, for example, despite HAMAS’ victory in
free and democratic elections, the United States and Europe failed to
give the party full recognition and support.

In relations
between the West and the Muslim world, phrases like a clash of
civilizations or a clash of cultures recur as does the charge that
Islam is incompatible with democracy or that it is a particularly
militant religion. But is the primary issue religion and culture or is
it politics? Is the primary cause of radicalism and anti-Westernism,
especially anti-Americanism, extremist theology or simply the policies
of many Muslim and Western governments?

A new Gallup
World Study overwhelmingly suggests the latter. The poll, whose results
are released for the first time in this article, now enables us to get
beyond conflicting analyses of experts and selective voices from the
“Arab street.” It lets us listen to one billion Muslims from Morocco to
Indonesia. And they tell us that US policies, not values, are behind
the ire of the Arab/Muslim world.

Political Islam: Ballots or Bullets?

History demonstrates that political Islam is both extremist and
mainstream. On the one hand, Ayatollah Khomeini’s Iran, the Taliban’s
Afghanistan, and Osama Bin Laden and al-Qaeda as well as terrorists
from Morocco to Indonesia have espoused a revolutionary Islam that
relies on violence and terror. On the other, many Islamist social and
political movements across the Muslim world have worked within the
political system.

Since the late 20th century
Islamically-oriented candidates and political parties in Algeria,
Tunisia, Morocco, Egypt, Lebanon, Turkey, Jordan, Kuwait, Bahrain,
Pakistan, Malaysia, and Indonesia have opted for ballots, not bullets.
They have successfully contested and won municipal and parliamentary
seats, held cabinet positions, and served in senior positions such as
prime minister of Turkey and Iraq and president of Indonesia.

Elections
since late 2001 in Pakistan, Turkey, Bahrain, and Morocco as well as in
Palestine, Iraq, Kuwait, Saudi Arabia, and Egypt have reinforced the
continued saliency of Islam in Muslim politics in the 21st century. The
more contentious aspect of political Islam has been the extent to which
militant groups like Hizbollah and HAMAS have turned to the ballot box.
Hizbollah transformed itself into a Lebanese political party that has
proven effective in parliamentary elections. At the same time, it
remained a militia, fighting and eventually forcing Israeli withdrawal
in 2000 from its 18-year occupation of southern Lebanon. HAMAS defeated
the PLO in democratic elections.

In responding to
mainstream and extremist political Islam, US foreign policymakers
require a better understanding of how global Muslim majorities see the
world and, in particular, how they regard the United States. The new
Gallup World Poll now enables us to move towards that understanding,
finally answering the oft-asked questions: What do Muslims polled
across the world have to say? How many Muslims hold extremist views?
What are their priorities? What do they admire and what do they resent
about the United States and the West?

According to the
Gallup Poll, 7 percent think the 9/11 attacks were “completely”
justified and are very critical of the United States. Among those who
believe that 9/11 was not justified, whom we’ll call the moderates, 40
percent are pro-US and 60 percent view the United States unfavorably.

It
is important to look more closely at the 7 percent of whom we can call
“anti-US extremists,” not because all or even a significant number of
them commit acts of violence, but because those with extremist views
are a potential source for recruitment or support for terrorist groups.
This group of potential extremists is also more likely to view other
civilian attacks as justifiable. In contrast to 95 percent of moderates
who said that “Other attacks in which civilians are the target were
‘mostly’ or ‘completely’ unjustified,” only 70 percent of the potential
radicals agreed with this statement.

Why Do They Hate Us?

Is
there a blind hatred of the United States? The question “Why do they
hate us?” raised in the immediate aftermath of 9/11 looms large
following continued terrorist attacks and the dramatic growth of
anti-Americanism. A common answer provided by some politicians and
experts has been, “They hate our way of life, our freedom, democracy,
and success.” Considering the broad based anti-Americanism, not only
among extremists but also among a significant mainstream majority in
the Muslim world (and indeed in many other parts of the world), this
answer is not satisfactory. Although the Muslim world expresses many
common grievances, do extremists and moderates differ in attitudes
about the West?

Focusing on the attitudes of those with
radical views and comparing them with the moderate majority results in
surprising findings. When asked what they admired most about the West,
both extremists and moderates had the identical top three spontaneous
responses: (1) technology; (2) the West’s value system, hard work,
self-responsibility, rule of law, and cooperation; and (3) its fair
political systems, democracy, respect for human rights, freedom of
speech, and gender equality. A significantly higher percent of
potential extremists than moderates (50 percent versus 35 percent)
believe that “moving towards greater governmental democracy” will
foster progress in the Arab/Muslim world. Potential extremists believe
even more strongly than moderates (58 percent versus 45 percent) that
Arab/Muslim nations are eager to have better relations with the West.
Finally, no significant difference exists between the percentage of
potential extremists and moderates who said “better relations with the
West concerns me a lot.”

While many believe
anti-Americanism is tied to a basic hatred of the West and deep
West-East religious and cultural differences, the data above
contradicts these views. In addition, Muslim assessments of individual
Western countries demonstrate that Muslim views do not paint all
Western countries with the same brush. Unfavorable opinions of the
United States or the United Kingdom do not preclude favorable attitudes
towards other Western countries like France or Germany. Data shows that
while moderates have very unfavorable opinions of the United States (42
percent) and Great Britain (34 percent), unfavorable opinions of France
(15 percent) and Germany (13 percent) were far less and in fact
comparable to the percent of Muslims who viewed Pakistan or Turkey
unfavorably (both at 12 percent).

Democratic Exceptionalism?

What
creates unfavorable attitudes towards the United States? Belief that
the United States is serious about democracy in Muslim countries has
long been undermined by what is perceived as the United States’ “double
standard” in promoting democracy. Key factors of this perception
include a long track record of supporting authoritarian regimes in the
Arab and Muslim world while not promoting democracy there as it did
elsewhere after the fall of the Soviet Union. Then, when weapons of
mass destruction were not to be found in Iraq, the Bush administration
boldly declared that the US-led invasion and the toppling of Saddam
Hussein were intended to bring democracy to Iraq as part of a broader
policy of promoting democracy in the Middle East. In a major policy
address, Ambassador Richard Haass, a senior State Department official
in the George W. Bush administration, acknowledged that both Democratic
and Republican administrations had practiced what he termed “Democratic
Exceptionalism” in the Muslim world: subordinating democracy to other
national interests such as accessing oil, containing the Soviet Union,
and grappling with the Arab-Israeli conflict.

While the
spread of democracy has been the stated goal of the United States,
majorities in every nation surveyed by Gallup do not believe that the
United States was serious about the establishment of democratic systems
in the region. For example, only 24 percent in Egypt and Jordan and
only 16 percent in Turkey agreed that the United States was serious
about establishing democratic systems. The largest groups in agreement
are in Lebanon and Indonesia at 38 percent; but even there, 58 percent
of Lebanese and 52 percent of Indonesians disagreed with the statement.

How can this be? Responses to another question shed some
light. When respondents were asked if they believe the United States
will allow people in the region to fashion their own political future
as they see fit without direct US influence, only 22 percent of
Jordanians agreed, and as low as 16 percent of Pakistanis. Yet, while
saying that the United States is not serious about self-determination
and democracy in the Muslim world, many respondents say the thing they
admire most about the West is political liberty and freedom of speech.
Large percentages also associate a fair judicial system and

“citizens
enjoying many liberties” with Western societies while critiquing their
own societies. Lack of political freedom was what they admired least
about the Islamic/Arab world.

The United States After Gaza and Lebanon

Muslim
perceptions of the US role and response to the Israeli wars in Gaza and
Lebanon must also be seen within the broad context of the Arab and
Muslim world. From North Africa to Southeast Asia, the Gallup World
Poll indicates an overwhelming majority of people (91-95 percent) do
not believe that the United States is trustworthy, friendly, or treats
other countries respectfully, nor that it cares about human rights in
other countries (80 percent). Outside of Iraq, over 90 percent of
Muslims agreed that the invasion of Iraq has done more harm than good.
The Bush administration recognized that the war on global terrorism has
come to be equated in the minds of many Muslims (and others) with a war
against Islam and the Muslim world and reemphasized the importance of
public diplomacy. The administration appointed a senior Bush
confidante, Karen Hughes, as Under Secretary for Public Diplomacy, and
spoke of a war of ideas. However, public diplomacy is more than public
relations. It is about acting consistently with the words one speaks –
and so a return to foreign policy.

The administration’s
responses in Gaza and in Lebanon undercut both the president’s
credibility and the war on terrorism. The United States turned a blind
eye to Israel’s launching of two wars in which civilians were the
primary casualties. The United States failed to support UN mediation in
the face of clear violations of international law, refused to heed
calls for a ceasefire and UN intervention, and continued to provide
military assistance to Israel. UN Secretary-General Kofi Annan’s
criticism of the Israeli bombardment of Lebanon as an “excessive use of
force” was countered the next day by the New York Times headline United States speeds up bomb delivery for the Israelis.

America’s unconditional support of Israel cast it in the eyes of many
as a partner, not simply in military action against HAMAS or Hizbollah
militants, but in a war against the democratically elected Palestinian
government in Gaza and the government of Lebanon, a long-time US ally.
The primary victims in Gaza and Lebanon were hundreds of thousands of
innocent civilians, not terrorists. In Lebanon, more than 500 were
killed, 2,000 wounded, and 800,000 displaced. Israeli’s military
destroyed the civilian infrastructures of both Gaza and Lebanon.
International organizations like the United Nations, Amnesty
International, and Human Rights Watch have criticized Israel for
violating international law. Amnesty and Human Rights Watch has
specifically cited the use of collective punishment and war crimes. The regional blowback from the approach that the United States has taken will be enormous and enduring.

The
Bush administration’s promotion of democracy and the Middle East Peace
Process are in critical condition. The United States remains mired in
Iraq and Afghanistan with no clear “success” stories in sight. The
situation has been compounded by the US failure to respect the
democratic choice of Palestinians, whatever its reservations, and then
its passive and active compliance with Israel’s wars in Gaza and
Lebanon. HAMAS and Hizbollah have become symbols of resistance,
enjoying a level of support that would have been unimagined in the past
throughout much of the Muslim world. At the same time, many US allies
in the Arab/Muslim world increasingly use the threat of extreme
Islamists and the war against terrorism as excuses for increased
authoritarianism and repression, trading their support for United
States backing down on its democratic agenda. The unintended
consequences of uncritical US support for Israel’s extended war have
played right into the hands of the Bin Ladens of the world.

A
critical challenge for US policymakers will continue to be the need to
distinguish between mainstream and extremists groups and to work with
democratically-elected Islamists. US administrations have often said
that they distinguish between mainstream and extremist groups. However,
more often that not, they have looked the other way when autocratic
rulers in Algeria, Tunisia, Egypt, and elsewhere have intimidated and
suppressed mainstream Islamist groups or attempted to reverse their
successes in elections in the past several decades.

In
the early 1990s, the Algerian military intervened to deny the Islamic
Salvation Front its victory in parliamentary elections. Both the
Algerian and Tunisian governments arrested and tried the Islamic party
militarily, and were denounced by the international community. More
recently, Egyptian elections were marred by attempts to silence
opposition candidates, including the Muslim Brotherhood. In the
post-election period, the Mubarak government, a long-time US ally,
imprisoned the only opposition presidential candidate and cracked down
on the Muslim Brotherhood and the Egyptian press. Despite its
commitment to democratization, the Bush administration has been
virtually silent.

A more recent and complex challenge is
dealing with resistance movements like HAMAS and Hizbollah. Both are
elected political parties with a popular base. At the same time they
are resistance movements whose militias have fought Israeli occupation
and whom Israel, the United States, and Europe have labeled as
terrorist organizations. There are established precedents for dealing
with such groups, such as the ANC in South Africa and Sinn Fein, the
political wing of the IRA in Ireland, groups with which we’ve had to
come to terms. The United States and others need to deal with the
democratically elected officials, while also strongly condemning any
acts of terrorism by their militias. Diplomacy, economic incentives,
and sanctions should be emphasized, with military action taken as a
last resort. However, overuse of economic sanctions by the Clinton and
Bush administrations has reduced US negotiating leverage with countries
like Iran and Sudan.

Equally difficult, the United
States, while affirming its enduring support for Israel’s existence and
security, must clearly demonstrate that this support has clear limits.
The United States should condemn Israel’s disproportionate use of
force, collective punishment, and other violations of international
law. Finally, most fundamental and important is the recognition that
widespread anti-Americanism among mainstream Muslims and Islamists
results from what the United States does—its policies and actions—not
its way of life, culture, or religion.

The Gallup
Organization, in association with Gallup Senior Scientist John L.
Esposito, is producing the “largest, most in-depth study of Muslim
opinion ever done.” Its careful and rigorous methodology has taken care
to ensure that the data is nationally representative, with questions
and interview lengths standardized across nations and over time. The
preliminary findings of the Gallup study reflect the voices and
opinions of 800 million Muslims from Morocco to Indonesia. Samples
include at least 1,000 adults surveyed in each of the poll’s 10
targeted preliminary countries. By the end of 2006, the study will
reflect the views of more than one billion Muslims in nearly 40
countries, about 90 percent of the world’s Muslim population.

Mark Pilgrim’s Essentials

August 16, 2006

A good list of essentials to install on Ubuntu from Mark Pilgrim http://diveintomark.org/archives/2006/06/26/essentials-2006

As of JDK 5, you can get NullPointerExceptions on weird places, such as

Map<String, Integer> lookupTable = new HashMap<String, Integer>();
int value = lookupTable.get("key");

Since there are no entries in the lookupTable, the get returns a null value. The unboxing of a null value throws a NullPointerException.

Explain your role on the most recent project or the most challenging project.

Follow-up questions on your project.

Explain how lazy-loading works?

Explain the transaction commit and rollback mechanism utilized in your project.

Give examples of design patterns involved in your project.

Explain Unit of Work pattern

Explain Strategy pattern

How would you remove or refactor boiler-plate code?

How would you wrap boiler-plate try and catch block around your code?

Explain strong references and weak references.

Explain tomcat class loader.

And finally: Joshua Bloch, Cedric Beust, Crazy Bob and all the other java big names work at Google 

Interesting Names

June 14, 2006

I heard the name John D'Earth on PBS tonight, made me think of a variation on that name, John D'Eath

Follow

Get every new post delivered to your Inbox.