Monday, January 28, 2008

Migrating VC++ code from VS2003 to VS2005 to VS2008

VS2005
The best reference for Migrating to VS2005 is available at MSDN.

http://msdn2.microsoft.com/en-us/library/ms177253(VS.80).aspx

Some additional issues I faced during conversion are documented below:
Resource.h file missing:
For some stupid reason Microsoft keeps moving around the include directories, making the paths incompatible. If you intend to use the "Resource.h" file in your projects and the compiler complains that it cannot find the file, simply do the following:
1) Use the string "$(VCInstallDir)atlmfc\src\atl"
2) Add it under Properties->Resources->General->Additional Include Directories.
This should fix the issues.

VS2008
SOCKADDR_STORAGE:
This function definition was moved to "Ws2def.h" instead of "Winsock2.h" for VS2008. Also the function was renamed to SOCKADDR_STORAGE_XP. The work around is to include the "Ws2def.h" fine. Also define a preprocessor of the form _VS2008 (if you don't want to rename the structure everywhere in the code). And add a code snippet of the form

#ifdef _VS2008
#define SOCKADDR_STORAGE SOCKADDR_STORAGE_XP
#endif

This ensures that your solution works for both VS2008 and VS2005 or before. If you don't care about previous versions anymore, just skip the #ifdef and just use the #define part. Also please make sure _WIN32_WINNT is set to the right value (0x0501 or higher).

I will keep updating this post for more issues as I face and fix them.

Friday, January 25, 2008

Bizzare Research: Fight with your spouse & live longer


This post is the first in the series of bizzare scientific researches I come across.

New York:
Researchers at University of Michigan School of Public Health and its psychology department released preliminary findings that the couples that fight, live more. The research was conducted over 17 years following the lives of 192 couples. The couples fell into four categories: where both partners expressed anger when they felt unfairly attacked, where neither partner expressed their anger, and one category each for where the wife suppressed her feelings and where the husband did so. The study shows that 13 people out of 26 pairs where both partners suppressed their feelings died earlier, as opposed to 41 people among the remaining 166 pairs. The lead scientist claims that resentment was the real threat and suppressing anger towards your partner leads to resentment.

My opinion - tell me something new. I don't understand what would trigger a research like this and what researcher would devote 17 years of his professional life behind such a study. Imagine the scenario - the scientist has a big fight with his spouse, all pissed off at her, enters his study lab, gathers a group of helpless RA's under him and starts the reasearch. Later he realizes how meaningless it is, but decides to continue it for 17 years out of embarrassment. That's the best I can make out of this research and it took me less then 10 minutes to do so...lol!!!

Picture courtsey of Times Of India.

A step in right direction!!!

Imagine studying from texts developed by Bill Gates, N R Narayana Murthy and other industry captains. Following the recommendations of NASSCOM (National Association of Software and Services Companies), the faculty of the technology department in the University of Mumbai has decided to hand over the task of drawing up new syllabi to the industry. Most of it is likely to be practical work which is application-oriented. Average employability rate in University of Mumbai affiliated colleges stands at about 60-65%. Part of the problem is that the curriculum taught is neither application-oriented nor does it reflect the fast technology changes taking place in various sectors. Many students who graduate are thus rated below industry standards and have difficulty landing corporate jobs without further education. The colleges’ heads believe the employability ratio will go up if industry is involved in drawing up curriculum. Though employability rates are not poor, most companies are forced to put new recruits through a six-month-training program. The new syllabus will thus allocate 40% grades to practicals, a step away from the good for nothing viva and journal completion. I just wish the University dean took such practical steps during my days of engineering at Mumbai University. But it certainly seems a step in the right direction.

Thursday, January 24, 2008

Living in the West

14th August 2005, the day I cannot forget ever. That was the day when I boarded that plane to come from one West (Mumbai) to a different West (Boston - USA). I was nervous, sad, anxious and excited to step into a different life. The first step towards my independent life here in USA. I had never been away from home for more than 10-15 days. Even today it gives me chills thinking about it. I still can't believe I had the potential to pull it off; completing my Master's, getting a job, being independent. I miss everything about my family, be it lunch and dinner we had together, be it being entertained or entertaining them, being in the center of all that family drama, creating a mess and knowing someone would cover my back. Here in America I know I can't have the same luxuries in life. Most times I miss my buddy in India. All those times we hang out together, had fun. Knowing that he would be by my side through thick and thin. I miss my days in Mumbai, the city, the traffic, the staunch, the dirt, the commute to college, bunking lectures and playing carrom, sitting at Jay's sandwich and having a good time. I wish I could relieve those days again. Every time I goto India, I roam around those same roads and same places and makes me wonder why did I have to leave college and do all the grown up stuff. But life has been good and kind to me. When I look back at the past two years of my life, it has been eventful and awesome. I made lots of new friends, lost some along the way, made some more. I have acquired habits and a lifestyle which I cannot even imagine having in India. I eventually learned to drive and bought a car of my own. I have the freedom to do what I like, when I like and how I like it. Freedom to spend thousands of dollars on stuff I can do without. Sometimes, however, I miss that fear - the fear of getting in trouble, the fear that my actions could cause disgrace to my family, the phone call from my aunt whenever I am not home on time. I wished living in the West would be a win-win situation, but I guess that happens only in India. How much ever luxurious my life here would be, I still crave for that one strong friendship that I have with my pal in Mumbai. Friends like that are hard to get. If I ever find myself in trouble here, there is no one name that comes to my mind, that can rescue me. So I dedicate this blog to my friend and my family, particularly my aunt; and end it quoting the same thing I always tell them "Let's see where life takes you!!!".

Tuesday, January 22, 2008

Is India truly secular?

The history books in our schools tell us that India is a secular country. We believe in "Unity in Diversity". I agree, we are probably the most culturally diverse country on Earth. But are we secular? The meaning of secularism has changed over time during the past 60 years of our Independence. The current Congress led government in house is supposedly the leader of the secular bandwagon in India - the UPA alliance. So what's the definition of secularism in India. Any political party in India who has a Hindu audience like BJP or Shiv Sena is non-secular and the one's with a Muslim vote bank are secular. A secular country would be one where all the religions are treated equal. I believe India has a long road ahead before it can claim to be secular. Indian politics is all governed by the Muslim and Dalit vote banks. That's the reason why Haj pilgrims are given tax subsidies and Amarnath, Mansarovar yatra's are charged humongous pilgrimage taxes. Thats the reason the Muslim Personal Law in India is allowed to carry it's tradition of 'Mahr' whereas the government dare propose ban on the 'roka' ceremony under the Hindu personal law. That's the reason why the govt keeps mum on the issue of Kashmiri pandit's as they do not belong to their vote bank audience. India has the potential and the courage to be the truly secular nation in the world. Secularism is not about Hindu's or Muslim's or Sikh's or Dalit's. It's about unity, treating every one as Hindustanis rather as vote banks. The politicians are the corrupting force here. But they are not the only one's to be blamed. Middle-class and upper middle class Hindu families don't want to vote. They do not want to participate in the construction of a secular nation. As a result, we get Congress as the ruling party. There are more incidents of communal hatred's and cases of conversions reported in the Congress regime compared to the BJP rule for 5 years. People might criticize Gujrat, but that's the only truly secular state in India, despite the fact it's ruled by a supposedly "non-secular" BJP government. The growth rate in that state surpasses every milestone beyond imagination. Such a development doesn't only affect the Hindus, or the Muslims or the Dalits in the state, its an all round social advancement. India can be truly secular only when it treats all its citizens equal and display "unity in diversity" in true sense.

Monday, January 21, 2008

I am PacMan...what are you?


What Video Game Character Are You? I am Pacman.I am Pacman.


I am an aggressive sort of personality, out to get what I can, when I can. I prefer to avoid confrontation, but sometimes when it's called for, I can be a powerful character. I tend to be afflicted with munchies constantly. What Video Game Character Are You?

US recession and immigration

It's not a big secret anymore that USA is facing a difficult economic crisis. It might very well be the biggest recession US has faced in a very long time. The effects of a recession is evident world over. Stock markets world over plummeted on Monday as a result. President Bush already sprung in action and has announced greater tax refunds this tax season with a hope that people will spend more and help stabilize the economy. What's causing the recession; whether it's the rising home mortgage prices, foreclosures or the war in Iraq, I won't go into those details, as I'm no economist. But there's a different side of this debate which interests me. The unemployment rate is at its all time high of about 5%, which is quoted as a cause of the ongoing recession. Some blogs and news pieces talk about lowering the rate of immigration and creating more jobs for American people. The theory is that the immigrants consume most of the jobs available in the industry. The jobs vacated by the so called immigration reform shall be awarded to the US citizens. This argument according to me lacks a serious consideration. The "legal" immigrants in US on H1-B and other visa categories constitute a huge spending force. These are the people who earn decent wages, have house and car mortgages and assume a greater spending power. Merely by taking such a work force away from the industry will not fill in the job vaccumm. It will very well push US into further recession as the retail businesses will see a significant drop in sales. Many online consumer websites will simply run out of business. As long as I'm missing a crucial point in the plan of curbing "legal" immigration and using that to boost the US economy, I don't see it helping the current or any form of future recession. I think it's high time that people realize that immigration is a reality which they cannot ignore. Immigration helps build the US economy and does not ruin it as claimed by many.

Tuesday, January 15, 2008

It's all about weekends

Living in America for two years now, studying and working here I realized a strange reality. In America, it's all about weekends. It's almost celebrated if not worshiped. On Friday people wanna know what your plans are for the weekend. On Monday they wanna know what you did on the weekend. They laugh and smile with you if you have a good weekend story to tell. And they frown at you if you said "nothing much" or "Well I just slept all weekend". Is it a crime to not do anything on weekends, is it a crime to spend my weekend in my bed, even if I am not sick. So it makes you wonder, what's so special about weekends that makes it such a big deal. Of course it's 2 days of holiday, of course you don't have to work or study but there seems to be more to it than that. And I think I found my answer couple of weekends ago. I was visiting a family friend - a couple with a 3 year old son. There I saw how important a weekend can be. They work all week, their son is in the daycare all day and goes straight to bed after having his dinner. It's only on weekends they get to spend quality time with him. And there I realized it's about family, it's all about creating your memories as you tread through your life, its all about doing something useful which you can share. Time spend sleeping is time wasted. So I have decided that I will be more productive on weekends...maybe not this one...maybe next...allrite some weekend it will happen...just wait and watch!!!

Friday, January 11, 2008

Make room for the world's cheapest car


It all started about 2 years ago, when the Indian entrepreneur Ratan Tata announced that he will launch a Rs 1 lakh car ($2500 approx) for the indian masses. "Experts" said its impossible, they said its an unrealistic dream, they said it will look like a 4 wheeler autorickshaw; but boy were they wrong or what. Tata Motors finally unveiled the "Nano" today at the Auto Expo 2008 held at New Delhi. Sleek slender sexy, sure doesn't seem like "two motorcycles joined at the hip or an auto-rickshaw on 4 wheels", in the words of Tata himself. Running at a top speed of 70 kph with an average of 50 mpg, its sure to leave a mark. And for all the suckers who thought it's impossible, in your face!!! Kudos to Ratan Tata!!!

Why Blog?

It's here, it finally arrived, I finally gave in to the ever-lasting urge to become a blogger. Am I glad? Well thats something time will tell. For now, all I can say is 'I am loving it'. If anyone of you out there are wondering, why now, the answer lies in that one drunken escapade of mine. I was in a bar with some friends, down with couple of drafts of nice cold Winter Lager, when I started talking to this girl sitting next to me. After about 15 minutes talking to her, she complimented me on my English, and how it so much better then other "foreigners" she has met. Was it a sarcastic remark? I wouldn't know. I was too buzzed to think about it at that time. But what I then realized was like an epiphany Dr. JD from Scrubs has on that roof toilet. I might have some talent in me that sets me apart from the crowd. So I decided to invest it in creating a blog, which well honestly no one may ever read, but surely doesn't stop me from indulging myself in it. I hope to continue writing on a regular basis, and hope there is some secret admirer out there of my newly found talent.