Sunday, September 9, 2007

C++


BjarneYesterday, one of friend called me as she needed some help in C++ for her TA assignment. She had to solve around 10 problems, all dealing with basics of C++ and in an increasing order of difficulty. And even after me explaining her the solutions, she seemed to be quite frustrated with solving them. She told me that the moment she thinks she has learnt quite a bit of C++, she realises that it is not enough.

I think, this feeling of hers is quite common for someone beginning to learn C++. My advise to someone would be to try learn the concepts of OOPS and think of C++ as a language that implements those concepts. Also, while learning they need to try to abstract any C++ program at different levels simultaneously. Most people concentrate on syntax while learning a new language, which does not serve the purpose. And as far as C++ is concerned, its syntax is very easy for anyone who is a little bit familiar with C. The idea is to understand different concepts such as encapsulation, inheritance, polymorphism which C++ offers and to understand how those find application in real life problems. Learning C is quite easy as it adopts a procedural approach. However learning C++ on the other hand needs persistance. OOPS concepts cannot be grasped in first read. But if one persists, it isn't long before one starts seeing through the capabilities of the language. It is usually that one moment, which changes everything. You then start appreciating the strengths and accepting the weaknesses of the language.

Well coming back to the topic, my friend's frustration reminded me about the interview given by Bjarne Stroustrup, the inventor of the C++ language. I would like you to first read the interview at http://www.oceanwave.com/technical-resources/humor/c++-hoax.html , before reading the rest of the article.



Read more...

Movie - Flaw in the movie "GURU"

guru.jpgI found a flaw in movie Guru. Actually I like the song "tere bina" so much that since the release of the movie, this is perhaps the only song I have been listening to consistently. Also, I usually use www.raaga.com, but for this song, I have been using youtube, since I like its picturisation.

You must be wondering, why am I talking about the song instead of revealing the flaw that I have found in the movie. So let me come to the point. Just before the song begins, Aishwarya leaves Abhishek and goes back to village. Why ? Well according to the movie, because of her brothers outbursts she realises that money was the only reason Abhishek married her.

My point is that she already knew this. How and when ?



Well following is the youtube link for part3 of the movie. Guru Movie - Part 3.

[youtube=http://www.youtube.com/watch?v=ztJJd29bYJE]
The clip is for 10 mins. Pay attention to the scene after 7 mins from the start of this clip. Aishwarya's father asks Abhishek what does he do, wasn't he in Turkey ? Following is the conversation:

Aish's father: What do you do ? Weren't you in turkey ?

Abhishek: Yes, I was. But now I want to do business here with your son Jignesh.

Aish's father: What business ?


At this point, Aishwarya comes in and listens the rest of the entire conversation.
Abhishek: Many new things are available in Turkey. I will sell those here for good profit.

Aish's father: What does your father say?

Abhishek: He says I will be ruined.

Aish's father: Then you will definitely make a profit. Don't worry. But I have stopped lending money these days. I have to get my daughter married.

Abhishek: If that is the case, then I am ready to marry her.

From what Aishwarya heard, it is but obvious that she knows Abhishek wants to marry her, so that he could get the money and start his business.

So to show that she later realises the reason is a mistake in the script. I think Mani sir might have overlooked this technical mistake, in the process of inserting the song and showing some kind of quarrel between Aishwarya and Abhishek.


Read more...