Sunday, June 15, 2008

Initial Glitches in Python Scriptting by a Tyro

Google released its Google App Engine in April 2008 and I am enthralled by the idea of the Google. I have always been inclined in automating. Hence thought of learning Google App Engine and thereby confronted Python Scripting which Google App Engine supports. A novice user like me installs Pyhton 2.5.2 and Google App Engine SDK to develop a server application.

As one starts following the Google App Engine tutorial and trys to copy paste the code available in the tutorial pages one encounters numerous error jargons on the explorer. The coder needs to understand some basic requirements and understanding of Python scripting.

1. Python Script Files (.PY) use indentation to differentiate the blocks of code. It does not have curly braces (unlike in C,C++; BEGIN END in VB Scripts etc). Hence if you are writting blocks of statements be sure that you use indentation properly. One can use Python IDLE as a Editor of Python scripts. For example :

IF you are using IF statement the following should be the indentation
IF USER
print 'User available' -- Observe the indentation. The block belongs to IF hence is lower indented
ELSE
print 'User not available' -- Observe the indentation. The block belongs to ELSE hence is lower indented

2. One needs to run the command 'dev_appserver.py ....' on the DOS Command Prompt not on the Python Command Line as I did.

These are some of the intial faults I committed during my encounter with Python language. I hope to come with some more soon as I face them. Hope the above two slip-ups of mine help novice developers.

Friday, June 6, 2008

Google Docs as Database

Quiz Gadget is a quizzing gadget which has been developed using GCE (Gadget Control Editor), Google Pages and Google Docs. The Quiz Gadget uses Google Documents as the database. Many people would be wondering on the fact that the Quiz Gadget uses Google Document as database. Eventhough Google Pages does not provide server side scripting and database feature, one can combine the power of widgets and Google Document to get the same affect.

How do I create the database in Google Documents?- I create a spreadsheet in Google Spreadsheet with columns as my fields. Now fill in the data in the spreadsheet and now publish your spreadsheet as it makes the data available on net. The link to the published spreadsheet now forms the connection string to the database for the widget.

How do I connect to the data in the spreadsheet?- One can easily retrieve the HTML content of a webpage using the Remote Data Extracting Functions available in Google Widgets. Visit http://code.google.com/apis/gadgets/docs/remote-content.html for information and in depth understanding of such functions. The functions only requires the link to your published spreadsheet and fetches the HTML content as text to your widget.

How do you identify information from the HTML content?- One aquainted with HTML parsing should find extracting data from HTML content using HTML parsers an easy job. Though initially you may find the content to be unextractable but constant observation shall help you observe the patern and tags necessary to extract the info. Once you have the information playing with the information should be a easy job for techies and web page designers.

Limitations and constraints of such databases- One needs to heavily rely on Javascript for attaining the functionalities required for database support. Some users do not enable javascript on their browsers hence can be a severe limitation. As publishing of the spreadsheet is essential for database support, one cannot keep information privy from the users.

You might find handy the following link in better understanding of the blog - http://code.google.com/apis/gadgets/docs/dev_guide.html .

Link to Quiz Gadget - http://carte.blanche.leeway.googlepages.com/gkquizgadget

Sunday, April 27, 2008

THE MOTORCYCLE DIARIES by ERNESTO "CHE" GUEVARA

Ernesto “Che” Guevara in his notes on a Latin American Journey has given a superficial account of Latin America. Guevara, a medical student when he took up the journey with his friend Alberto pens down a brief account of journey which educates him of the actual face of life in Latin America. The bike named La Poderosa II on which the journey started broke halfway and the journey proved more harsh as they were left as hitch hitkers and stowaways. A part of journey in the sea as stowaways and in the wooden raft etched numerous memories in the minds of Che.

He talks about the lepors in Easter Island and the love of football in America. Their usual places of stay during the period of journey were hospitals and civil guard huts. He admires the hospitality of Peruvians and at the same time detests the hardships forced upon them by the nature (the mosquito attacks on virgin flesh, asthama attacks, severe cold etc).

The journey was one of the very turning points in life of Guevara which transformed him into a personality of great influence in politics of Cuba. He is also very asthetic in admiring the ancient monuments of Machu Picchu and laments the pathetic medical facilities availble in Eastern Island for the lepors. He also relects his thoughts on the political battle fought between the coalition of nationalist and left-wing in Chile over Coal Mines. The book not only gives you the option to read but an option to compare your imagination to the actual scenes and conditions visited by Che in the form of 22 pages of photographs. The book is a fantastic read for Trekkers and also for non trekkers.

Saturday, March 1, 2008

DOES MAN LEARN AND DOES EDUCATION RUIN?

Definition of Education - Education encompasses teaching and learning specific skills, and also something less tangible but more profound: the imparting of knowledge, positive judgment and well-developed wisdom. But does man learn?


Today’s school education obfuscates a child’s observation, creative and lateral thinking deftness. Intense level of competition in schools and high aspiration of parents (as very vividly elucidated in the flick “Tare Zameen Par”) represses the future innovative leaders. Albert Einstein, a high school dropout, became one of the most profound thinkers of any century. Plato and Socartes carved many renowned theories without any formal education. An S P JAIN (a renowned B-School in India) pass out once commented that “MBA prevents one from exposing himself to entrepreneurship. The risk understanding instilled in a MBA graduate actually averts one from venturing into new innovative and out-of-box ideas and solutions.”


If you were in Mumbai and were clients of Dabawala’s service you would have understood the contrast between the educated efforts we in MNC’s put in with the best possible machines (laptops etc) and processes to get the SIX SIGMA concept implemented and the ease with which DABAWALAS (mostly illiterate using only color codes) manage to get less than 3 errors in 1 million attempts. Where is education leading us to?


World War 1 caused huge number of lives to be lost still humankind in times of World War 2(which was more educated than the times of World War 1) could not prevent itself from entering another massacre of WAR. The war story may not end here the humankind might end up fighting for water, food, land and opportunity in times to come.


Retrospection on such incidences and facts boggles my mind with a question – “DOES MAN LEARN? And DOES EDUCATION RUIN?”

Friday, February 22, 2008

BUDGET 2008

Finance Minister will have myriad issues to address to in his last budget for the current government. Indian economy achieved an economy growth rate of 9.25% for the period 2006-07, incorporating measures for the sustenance of such growth in the coming fiscal would be a Herculean task given the slowdown cues in the world economy. For the current fiscal year there are many concerns like US slow down, rupee appreciation and forex reserve standing at 250 billion US dollars. Crude price hovering near to 100$ is indicating a higher inflation in the days to come. Fiscal deficit needs to be scaled down to 3% of the GDP.


Better infrastructure incentivizing measures coupled with revamps in direct tax rates and structure are expected from the FM. An excise of direct tax on corporate from 33.6% to 25% will incite the corporate world. A 45% growth in tax collection gives the FM leeway to ease tax slabs. Constant pestering from the corporate world about the FBT (Fringe Benefit Tax) can result in FM reviewing the FBT. Excise duty retrenchment is on the anvil as the duty is higher in India than the global benchmark for the duty. Banking and pension sector may attract more reforms. As a part of commitment of India towards Global Warming Reduction one can observe subsidies on equipments of alternative source of energy.


Being a minister cum politician cum an astute economist one can expect a very streamlined People’s budget from the Finance Department. Soft on the household taxes and subsidies for the agriculture sector might be the highlight of the budget. In Toto, a Soft Budget is on the radar as FM needs to safeguard the vote bank of his party.

Thursday, February 21, 2008

P.S. I LOVE YOU - BOOK REVIEW

P.S. I LOVE YOU” by “Cecelia Ahern” is a novel targeted at a rather bohemian topic of bereavement process of a young widow. The novel is a homogeneous blend of romance and comedy. Protagonist of the story Holly Kennedy is sketched as a character whose sole aim was to care and to love Gerry her dying husband in the last few days of her husband’s life. Death of her husband leaves her with no objective to live for. She forgets that life goes on and dislikes/deters from making new experiences and memories in life.


But a parcel containing 10 letters from her dead husband channels new direction to her life. She comes to believe that “Sometimes it’s about living life one letter a time”. Each letter a month from her husband makes decisions about her life and she abides by them even though she dislikes many of the ideas. By the time she reads the last letter she understands that her husband’s intention behind the planned letters. She gets to know that life is to be celebrated and to be lead by free following of your heart.


Though some of the critics of the novel have carped about the little research done behind the writing by the young author, I would appreciate the deftness of the young author to present a grave issue combined with romance which eventually compensates for the little research. A sudden shift from a serious topic to a light comic issue can be observed in various conversations in the story. The novel is a good, intriguing and touching read.

Tuesday, February 19, 2008

A MIGHTY HEART – BOOK REVIEW

A MIGHTY HEART” by Mariane Pearl is an elaborative account of Daniel Pearl’s abduction, intense efforts to rescue him and the aftermath. Mariane and Daniel Pearl were two journalists who fell in love with each other and in love with journalism. Mariane and her rescue team’s courage and determination have been very well elucidated in the book. I would appreciate the book on three fronts:-

1.Insights into Journalism – Author presents Daniel’s idea of journalism as a means to eradicate the hatred which reins in many hearts. Daniel in his professional sphere extends journalism beyond “news making” to “altruism”. He has also raised his concern about the hazards a journalist counters round the world.

2.Insights into Courage and Non-defiant spirit – Daniel the protagonist exhibits his courage to stand for truth even at the face of death. His courage and understanding of journalism principles makes him travel around the globe. Mariane, Daniel’s wife is also seen dauntlessly putting efforts to rescue Daniel. Even after his murder she fights to put journalism at the forefront of the fight against terrorism.

3.Insights into Terrorism – Mariane presents her experience with terrorism meticulously in the account. She believes that the invisible enemy “Hatred” in the form of terrorism is not just hazardous for America but for the whole world. Ignorance and poverty are some of the pillars on which the dais of terrorism stands. Simultaneously she presents next generation terrorists in a character named “Omar” who are educated and have bonds with the east and the west.