Wednesday, January 18, 2012

Thoughts on my recent trip to India

India is a land of many cultures and many languages. One of the biggest challenges for India is to handle problem of scale. In general, problem of scale is handled by breaking down into small pieces. In India, the divide and conquer rule is thrown out of the window since the population has exploded beyond control. This is similar to the problem of what happens when there are too many rats in the house.

In my recent trip, I traveled to North India for the first time(being a South Indian) with trips to Delhi, Agra and Jaipur(within 5 days) and realized that of all the places I had been ....Bangalore is comparatively so clean and is universally recognized as one of the best places to live in India. I must admit that I was amazed at how big the roads were in New Delhi and came away impressed with the nation's capital. On our way to Connaught Place, we happened to see the Delhi Metro looks great.

Our highest expectations were on Taj Mahal and the town of Agra . I was impressed with the Taj Mahal but not pleases with what the town of Agra had to offer. Agra is by far the dirtiest place I have seen in my life. I was also surprised that lot of folks there were out to hoodwink us rather than treat us like inquisitive visitors. By contrast, I loved the city of Jaipur especially with the impressive forts - Amer fort, Jal Mahal, Hawa Mahal etc and also the people.

I also got the taste of East India during this trip when I visited the city of temples - Bhuvaneshwar. The beaches near Konark and Puri are a sight to behold and so are the temples. The Puri Jaganath temple is probably one of the most crowded temples I have been to. Interestingly the Sun temple of Konark offered a strange insight of how advanced our artists and culture was in the 10th century.

Our trip was filled with lots of travelling and fun. India has by far the best places to eat varieties of food but quality food does come at a price these days. The biggest disappointment of the whole trip was the traffic in Bangalore. The Garden City does not have the same charm anymore. Bustling with malls and active night life, the city is enticing for the youth but very hard place to travel around. Here is hoping "Namma Metro" will solve majority of the problems by its connectivity.

Friday, January 13, 2012

Python-MySQL-Windows

One of the best parts of programming is you are always learning something new. I happened to build a simple statistics application with MySQL as the database. For practice , I decided to revert to Python since doing lot of coding in PHP and Perl. I was lazy enough to decide to add MySQL connectivity to Python on my Windows 7 (32-bit) box and found that I had a range of issues.

To cut the long story short...here is a summary for anyone who wants to use MySQLdb(Python MySQL driver) on windows.

I installed Python 2.7.1 on Windows which is a simple install from python.org. I installed MySQL Server 5.1 which is a simple msi file install.I then hit some snags with getting MySQLdb to work with Python. So this tutorial is truly for these versions.

  1. Install Python 2.7.1. I installed into "C:\Python27". Make sure you set yout "PATH" environment variable and compile Python with a simple "hello world!" program.
  2. Install MySQL Server5.x. Again make sure that MySQL can be accessed via command line by adding the MySQL Server bin folder to the "PATH" variable
  3. Do not download and compile the MySQL Python Drivers. You will waste time. Instead get precompiled executables from : http://www.lfd.uci.edu/~gohlke/pythonlibs/
  4. Double click on the exe after download and choose the python folder which was "C:\Python27" in my case. This will install the MySQLdb connector
  5. Start Python IDLE(GUI editor) and type "import MySQLdb". If you dont see any errors, you are ready to use the MySQL connector.
It is important to have the Path variables set correctly which makes the big difference. I spent couple of hours on this with missing libraries and changes in site.cfg and found this as the quickest way and hope my fellow coders dont waste time on trivial stuff like these.

Wednesday, August 05, 2009

How Twitter impacts us!

Twitter has exploded into the social networking causing a buzz among users in millions. The premise of freedom of speech can be used by this micro-blogging service (micro..since it only allows only 140 chars per tweet). Some people call this the "SMS of the Internet" and is now ranked by Alexa as a top 15 web site in the World. What is great about Twitter is that you can express anything and everything and due its ubiquitous nature you can learn about stuff just by searching for tweets related to a topic. The possibilities with Twitter are endless. You can send direct messages to particular users using an @ sign. A simple search for "#apple" will get you good enough links about mac stuff.

What amazes me is the potential possibilities of Twitter:

1. You can provide Recommendations - you suggest hotels to stay, places to go, restaurants to eat, clothes to buy...whole lot of stuff and people can use your recommendations to do stuff.
2. Provide Honest Opinion/Feedback. Lets say i took a flight on a particular airline and did not like their service. I can be specific on my flight details. The key to doing this is that each airline should use tags(lets say #DeltaFeedback for Delta airlines)
3. Communicate ideas/thoughts and this could spurn a whole new set of ideas
4. Entertainment,Killing Time etc assist in Prevention of Depression.
5. You learn what your friends or family are upto!

and the possibilities are endless.

As with anything, there are fallbacks also. Its already causing a rage in NFL training camps(some teams have banned use of Twitter). A Denver nuggets player - J.R Smith had to shut down his twitter site due to issues as of today. Check out Denver Post for the details.

Like most of you out there, I do also have a twitter page, Check it out here: TechShrink's Twitter