Sunday, November 20, 2011

Why Rockstar Rocks

We sometimes find ourselves wondering how a particular movie could do well when it had nothing really to show or say. On the other hand, some movies are made so well, yet are not appreciated by the larger audience. I have a theory about the disparity between the personal appreciation and mass appreciation of movies. We often find ourselves attracted to a form of art we connect to at a certain level. Movies are no exception. For example, I absolutely loved Rockstar despite the poor reviews it got. I connected to it at a certain level, which perhaps others did not. I loved the movie despite its obvious shortcomings, breaks in the linearity, many logical flaws and unanswered questions it evoked, the bad acting by Heer, and the non-uniform pace of the movie. No one knows why JJ visited Kashmir and still had to wait for a trip to Prague to meet Heer’s husband. No one knows what seeing a psychiatrist had to do with bone marrow aplasia. There are several such unanswered questions, unanswered to the logical mind. Yet the movie resonates at a certain level, probably echoing the artistic self. This is a dark movie, and some people do not appreciate darkness. I do not watch a movie expecting it to be realistic. Yet it is a work of art, and while we sometimes connect to art, we sometimes do not. It doesn’t matter who the female protagonist was, she might as well have been a tree trunk. For the movie is about JJ, his pain, his passions, his darkness of personality, and his saga of unrequited love. Have you ever read Wuthering Heights? JJ so reminded me of Heathchiff. The novel does not make sense at the logical level, and I have always thought Heathcliff’s obsession for Catherine was paranormal. Yet the novel is an epic, probably because it has appealed to generations at a certain level. The same goes for Rockstar. It was not so much a realistic tale for me as it was a work of art. The visuals, the cinematography, the music, the locales, and Ranbir Kapoor are the best things in the movie in no particular order. I loved seeing Prague on screen. I absolutely loved the character JJ, his passion, and Ranbir’s superb acting. Other than Ranbir, I think only Saif Ali Khan (who is a veteran in the field) could have done justice to the role (according to me). The character of JJ got me riveted. Who knows how things would turn out if this was a typical love story, where JJ meets Heer, they fall in love at first sight, he finds a job, they get married, have triplets, and so on? Ever wondered what happens to those love stories that do not fall in the socially normative spectrum? How do they find closure? Do they move on and find love with different people, or do they live in hopes that unrequited love will find closure someday? No one knows.

For every review that did not speak highly of the movie or Ranbir’s acting skills, I claim that I loved the movie. True, it is not the best made movie, and there are obvious flaws, but if you can watch the movie for what it is, rather than what it is not, you will perhaps enjoy the experience as much as I did.

sunshine

Friday, November 18, 2011

Strategies for Successful Coding

I was never exposed to the world of coding before I started graduate school. I thought it was mostly for computer programmers, but apparently, statisticians do it a lot. Earlier this semester, I started learning Stata, and I must confess, I went slightly crazy learning it. I spent hours staring at the data and none of the codes I wrote for cleaning and analyzing data made sense to me. The weekly assignments were due every Monday 9 am, and I have never been more traumatized at the prospect of spending 14-15 hours every weekend coding. I am perhaps one of those outlier cases with an extremely slow learning curve, and some things just don’t make sense to me unless I draw diagrams and flowcharts. However, I am beginning to see light at the end of the tunnel, and you will never know how much joy a simple 20 line code running successfully brings you, unless you have spent 4 hours writing that code and staring at the data wondering why it would not run. In the process, I picked up some strategies that have worked for me, and I might be rehashing things that already seem obvious to you, but I will share my wisdom nevertheless.

1. Organize

Try to be extremely meticulous and careful about organizing data. Make folders and subfolders, but do not overdo it to the point that it increases work for you. Unlike Indian parents who take credit for naming their babies something that will take years for them to master enunciating or spelling, keep simple names and avoid using “underscores” if you can. If naming a file M9ScoreSummary suffices, do not try naming it Mathematics_Grade9_Score_Summary. You will waste time typing a long name every time, and will significantly increase your chances of making mistakes. Keep a separate notebook as a key for identifying actual names, lest you forget it at some point. The more time and effort you put in organizing your initial data, the better off you are in terms of not splitting hairs. Most importantly, don’t leave it to your brain for remembering things. Write them down.

2. Engage

Imagine spending a good whole week learning to code, getting codes running, and then going away for a month long trip to Timbuktu. Chances are that nothing would make sense to you when you are back. You spent all this time and effort boosting your learning curve, and now it is all gone. The more you do it, the better you get at it. So while in the initial stages of learning, spend some hours every day doing that. Remember as a child how your mommy insisted you spent at least two hours solving math problems every day, and that too first thing in the morning if it was a weekend? Not that all of you went on to become math majors or math professors. However, since the learning is so application oriented, and requires you to develop skills observing, getting dexterous, analyzing, and learning the logic, you should spend every day practicing it during the learning phase.

3. Attention to detail

There is a lot that can go wrong over a missed semicolon, an extra underscore, or simple typing an N for an M (the same reason why the more succinct your data naming system is, the better). Don’t run a code blindly unless you have a clear reasoning of why you are doing it. Don’t use the “cd” command unless you know it is meant to change directories, else you will keep looking for your file in a random folder all day long. Remember the “i” command overwrites your original file, so always make sure to save it as something different, like “i_different” if you do not want to mess with your original dataset. Pay attention to coloring details, it once took me six hours to figure out that my data will not run because all my numbers were coded red (string variables) and not black (numeric variables). Learning a coding language is no different compared to learning a language. It is very intuitive and logical. There is a reason your teachers taught you to begin every sentence with a capital (upper case) letter, end every sentence with a full stop, and use punctuations. Every bit of code you feed into Stata has some meaning to it. Stata is not crazy (although I have often alleged it to be), and it will not spew output if you screw up even a single alphabet. What more, even if it spews output, there is no guarantee that it is the correct one. So use your brain, and pay attention to minute details.

4. Seek help

Learn to look for help whenever you are stuck. It is great to cogitate and analyze issues in your head, but staring at numbers can get so overwhelming that by the time you have figured out a solution, you will be too tired to do anything with the solution. Sometimes you overlook a single missing command that makes all the difference, and a fresh pair of eyes looking at the data spots it right away. Google is a wonderful resource, and so are colleagues and professors.

5. Work hard, and work smart.

Learn to use various tools that make your life easy. Why wash clothes by hand when you can access a washing machine? Don’t write a thousand lines of code if you can get away with a hundred. Learn to use loops, macros, egen commands, foreach commands, and the various other tools that make your life easy. I resisted it for the longest time because it did not seem intuitive first, and looked scary. My codes did not run when I used the tools, the data messed up, and I gave up. Eventually I sat with my professor for three hours and figured it out (somewhat). Those three hours you put into learning it is going to save you 300 hours of future work and 3,000 lines of writing codes. I see it as a difference between calculating mathematical solutions by hand and then learning to use a calculator. First, you learn the entire process of doing calculations by hand. Then you have the added responsibility to learning how to operate a calculator. You realize it is not worth your time (especially if you have deadlines) and continue to calculate things by hand. Here is my advice. Be thorough about how to calculate without a calculator. Then invest some more time getting used to a calculator. This way even if you make mistakes, you would have developed the intuition to go back and see what went wrong. If you only knew how to use a calculator, you would never be able to function without one, or detect coding errors if you ran into one.

My biggest learning and advice from my experience is, learn to play around with data. There is no learning greater than the one that comes from playing around with systems, making mistakes, going back to fix them, and self-training yourself using structured resources (like professors, forums, and books) and a little bit of external guidance every now and then. Remember, learning to code is not research. It is just a tool you learn to help you do research. You are still dependent on your brain and your analyzing ability at the end of the day.

Happy coding.

sunshine

My Thanksgiving List

Normally, I do not associate myself with Thanksgiving and Halloween as well as I do with Christmas. It could be the result of childhood associations, or the lack of it. It could be the cracks in my cross-cultural blending. However, one does not need to celebrate Thanksgiving in order to be thankful in life. Early Friday morning when my codes are running smoothly after laboring over fixing glitches for hours, I thought this should be reason enough to be thankful. My list below in no way captures things in entirety, it just helps me get some perspective in life as I plan to spend a five-day long Thanksgiving vacation writing papers, running codes, and preparing for the impending final exams.

1. I am thankful for the rich educational experience I have had. I am thankful I get to spend most of my time in academic pursuits. I am thankful for the cross-cultural and cross-national educational experience I have had in two different countries under very different educational settings.

2. I am thankful for an understanding family, who might not always agree with my views, but leave me alone most of the time.

3. I am thankful for my health. I know things will start going downhill someday, and it scares me to death to see people my age suffering from cardiac problems and cancer. Illness is definitely something that gives you perspective in life.

4. I am thankful to the world of creativity. Everything we do in life is in some way our effort to pursue creativity. Be it photography, be it writing, be it having children, or doing a PhD, all of us find some corner of creativity in this world for us.

5. I am thankful for the number of travel experiences I have had, both national and international. I have always wanted to see what the world looks like in places I have never been to, and with time and patience, I have been inching forward little by little.

6. I am thankful for the little nook and corner I call my space, my home. I realize not everyone is fortunate to have a home, and although I love traveling, nothing makes me happier when I am home.

7. I am thankful to God for being gainfully employed. I am thankful to God for my first job as a teacher. I loved that job, and I would not be doing what I am doing today if I had not had that job.

8. I am thankful that someone introduced me to the world of books, writing, and movies. My world would not be the same without them.

9. I am thankful that I am introverted, and do not mind spending time alone. I have known how scary the thought of being alone is for some people.

10. I am thankful for my belief in the resilience of humankind. I am thankful for this wonderful present that life is. It is great to live life with the knowledge that death is inevitable, that it is all going to end someday, and it is but the little time we have that we use in pursuing our beliefs, whatever they are.

sunshine

Sunday, November 13, 2011

No Strings Attached

On a cold Sunday evening, starting from the evening until well past midnight, it has taken me more than 7 hours to figure out why a simple code would not run. I checked the data, I looked up Google, I emailed the professor, I posted a new thread of message in the class discussion forum. However, nothing worked. I could not generate a simple bar graph using two variables in stata. I took breaks, I paced up and down my home, I sometimes sipped some water. The assignment was due the following day, and the professor had promised it shouldn’t take that long. Then why was the code not working?

After seven plus hours of thinking, contemplating, frowning, agonizing, staring at the data, seeking for help, excogitating, and cerebrating, I finally spotted the problem. Every numeric information I had in my dataset, stata for some inexplicable reason thought was a string data. Now why would stata think an achievement score percentile would be string data, I have no idea. Some serious googling indicated that string data was coded red, and numeric data was coded black. With the sinking feeling, I went back to my dataset and checked. There was blood everywhere.

All it took me was a simple command, “destring, replace”. Within seconds, stata had converted most variables from red to black. There are a few that still look red, but I am past caring.

I cried the moment stata converted everything from red to black. I don’t know if the tears were for happiness, relief, or tension release.

I cried, because it took me seven plus hours on a Sunday evening to figure out that every numeric data was being read as string data. And all it took to fix it was a simple command. Whether I am stupid, naïve, or lack sharpness to survive graduate school, I will never know. This could be one of your unfortunate evenings if you were in graduate school. If you are interested in graduate school, please ensure that you have virtues like patience, hard work, and persistence in your toolkit.

Finally, my data looks as if there are no strings attached.

sunshine

Wednesday, November 02, 2011

I Proposed … They Accepted

Last year this time, I was 2 months into my PhD program. I was fretting about my preliminary exam due in the next 3 months. I was struggling with learning to critique papers and write literature reviews.

The same time this year, I finished my qualifiers. Then I proposed, and they accepted. Not once, or twice, but thrice. This summer, I sent out 3 proposals for 2 national conferences. Academic daddy had made it clear that if I wanted to attend these conferences, I had to make sure that I had a research agenda, wrote a good proposal, and it got accepted. Fair deal. I was extra keen on getting accepted, since one of the conference venues was international. Hence, I sent out 2 proposals. Just to make sure I ended up going somewhere at least, I sent the last one to another conference.

One by one, all three of them got accepted in the last 4 days. First, it was the joy of delivering twins, and yesterday, I got the news they were actually triplets. When I checked the website for reviews, what I saw was a miracle. For one of my proposals, both my peer reviewers had rejected it based on certain methodological flaws. However, the editors still went ahead and accepted it because the topic was important enough, and flaws could be fixed. My last one made it despite a 100% rate of rejection.

Needless to say, I have been on cloud 9. As a student 14 months into the program, I had not even hoped for a single acceptance. However, I no longer attribute it to the lack of confidence or experience. When you are so new to the program, sometimes you do not know how important your findings are. I analyzed my data, looked at my findings with nonchalance and thought to myself, “Whatever”. My adviser looked at it and got really excited about the findings. That day, I realized that although I was learning to analyze data, I had still not developed the eye to chaff good data from bad data. I looked at diamonds and thought they were just stones.

Today, I write this post as a tribute to my academic daddy once again. I have not had many academic role models in my life, but one fine day, I just got lucky. Like my data, one fine day, I found a gem of an adviser and didn’t realize it until I started to see the results of his advising. He has pushed me to the best of my abilities, and there were times when I was stressed, unhappy, and disillusioned. However, this has been a part of the rigorous training. And this reminds me of a quote from Newton,

“If I have seen further it is by standing on the shoulders of giants.”

For once, I do not feel the stress of the possibility of not finding a job. I will exult in the current achievements, get those suckers out for publication (my papers I mean), and try finishing the PhD aee ess aee pee now.

sunshine