Tuesday, October 14, 2008

Yet Another Interview

An interview call makes you really excited - you think of all the possibilities and aftermath. After the process is over, you are drenched. It might leave you elated if you have done exceedingly well or tired/fatigued if you failed to make a mark. So why am I talking about all this?

After the Bloomberg offer, I send denial emails to few companies I was being interviewed with. Believe me, its hard to send in such emails because I understand how much effort has been put just to get that call. I was lucky I did not try for many and not too hard (Y! rocks in some sense none the less).

I finally applied to Microsoft and going to have an interview on 16th. Everything was going on nice and fine. Till this happened and perhaps I have not had good sleep till yesterday. I can go for a deep slumber now as I don't have much hope from today's encounter :-|

I got an interview with Google. [Please do not ask me about questions - I cannot discuss, nor the emails;]. While I did not expect much preparation, I punched in several lines of code as this was supposed to be a coding exercise. I was doing fairly well with one fear that what if the question does not click me.

What I have realized is that if I know the solution well, I can jot down the code without making a lot of mistakes. Believe me, my code would show up with fewer compile time errors and hmm, a few runtime ones (those which are really really evil and happen only on full-moon days).

But when I do not know of the solution, somehow I am good at explaining them but if asked to explain as well write the code simulateneously, I falter. I perhaps manage to pitch in the overall picture correctly by picking up the grassroot problem; but when it comes to finishing it up - I just go eerie with design blunders. I am not sure what screws up my frame of mind. Is it the constant pressure which mounts every minute of the interview or is it that I have exhausted myself of that creative juice by not taking ample rest before the interview.

A lot of things can be spoken after the interview - the fact is plain & simple. There is room for improvement. I might have polished my coding standards and understanding of c++ a lot better. Given a known algorithm, I can write up the solution quickly and efficiently (something which again I need to work on; I found that I tend to do a lot of pre-optimization; something which brings in those runtime errors - there is a simple solution to this :: Hold yourself till you execute the code). I need to write in more and more code; code which makes me think while I write. I am more of a paper-pencil guy who likes to solve the problem separately and code separately. But this has to change. I don't know how! But perhaps more practice and more experience.

Now that I have begun with one down, lets see how I fair at the MSFT interview. I am not preparing for the same because I prepared a lot for today's interview. I want to take it all in the light spirit. Perhaps over-preparation spoils the party.

Summary:
1. Do not optmize before you execute. Let your code be verbose. You need to make that cut.
2. Relax, relax, relax
3. ?If the solution does not strike to you and you have to start coding any how, What should you do? - Try to find out.

Friday, October 3, 2008

Not just the pursuit, I am happy today

Well not just that I am sober, I am typing this at almost the stroke of the midnight making a lot of spelling mistakes and correcting them. So you know how difficult it is for me to keep it grammatically right till now (pardon me if I really made any).

I finally could score a job offer and look forward to join NYC for the next year. It's a dream to work in NYC. It reminds of so many things I have missed out and I have high expectations from myself as well as the firm I am joining.

I have time for almost Feb 9th to enjoy and make out something finally of this Masters. I know this degree gave me a lot of things to ponder and speculate. But still, the ambitions are not yet fulfilled. It is long road and I need to envisage it. This is perhaps the first step, or perhaps the first success of the few bold steps I have taken in the recent past.

For the die hard techie fans:

From now on::::

From now on::::

Whenever you compile using g++ and use inline ............................... yes u use inline to make your program faster;

Use g++ -O2 or -O3 ...... then only it takes into effect. AND, use gprof to actually measure it, otherwise there is no point in making a function inline - really absolutely no point at all.

Learn how to profile your code today before it is too late, regardless it is jprobe or gprof. I am sorry for the intoxication :)

Wednesday, August 27, 2008

Inactivity around

I need to order some fizzy drinks I guess.... something really fizzy!

For the past 3 days, since my internship has ended, suddenly I see myself sucked into a land of inactivity. All I do is sit in the Joe's chair (remember the one they had in Friends') and ponder on what should I do next and which one should I do first!! Of course, as you have guessed by now, its not that I can't figure out what to do next, but the list is so damn long and vast - I just can't come to a consensus on what to begin with. So the past 3 days, I have been just day dreaming. At nights, I sleep for 12 hours putting the blame on jet lag "I came from California last week, you know".

Semester just began. I can't still get used to the fact that their is no office to attend. I am a "office" person I guess, while I hate discipline. I can never go to office at 9, technically I can - I would be just half asleep. But if thats not there, there is a big void. To fill it in I come with these strange ideas to fill in my mind and the the rest of the day goes by dreaming and creating castles in air.

I have a long list of software upgrades lined up which include FF3. I am still not sure if I should reformat my laptop to run Ubuntu instead of Vista. I perhaps should do it sooner but I want to know how good Eclipse + Java 1.6 runs on Ubuntu - if you have tried it out, please leave a comment.

I am looking for doing something more this semester. Will probably look forward to build something on python, try my hands on web development and write some big chunk of server code in c++. While all of these targets towards getting myself noticed for a job interview, I sincerely think this is a long term fruit. And throwing away vista would be perhaps the first gear to kick in. But the only difference is that I am running out of time and I can feel it. I feel it really hard now.

Its high time I get high ... aghh .. I mean I dream big ... I mean .... you know what I mean.

[Give me some fizzy drinks]

Sunday, June 1, 2008

Making Sense of My Life

I turned 25 today!

Thanks to my new roomies I had quite an awesome night yesterday and the day passed in standing the subsequent repercussions of the party.

Now as the night has fallen in and I have sometime to think and write this blog - I again fall back to the very question I have been asking myself for sometime now. And now that I have crossed the 25 mark, it becomes all the more meaningful.

I have no idea as what to write here - there are so many things going in my mind now that I am LOST!

Where's my education leading me to?
Will I regret ever that I did not try to take up the line of research?
Or will I regret of not taking up the challenge I once set for myself - Did I fail myself and all the people who had faith in me?
What point in my personal life have I reached on?
Have I fulfilled any of my personal goals yet? And do I know what are the next ones slated for me?

And believe me, there's many more .....

I guess I am in no more control of my surrounding and I am just flowing through the river of life as others around me. I have finally become one with the floating mass. Is that what I wanted? I know I can never be same as them - its just an illusion which I might wish to have. Still, even in my dreams, I had thought of something better. True Life is something different; failing even in your dreams is scary.

Is this the end of the road - Or a new beginning? Where's the light?? I expect the big bang to happen soon.

Amen.

Friday, April 25, 2008

Algorithms Mania

Things have been about algorithms lately. Someway or the other. Explaining about dynamic programming to my roommate, convincing people of P != NP consequences and how to move in with things or for that matter taking in witty interview questions or listening to continuous video lectures on NP Completeness and working on all possible sources to get my assignment done (yes, that should be done in polynomial time to meet the submission requirements, ya ya! I know I got freaked out lately).

My algorithms instructor has got me. I would agree on this. He has been great all the sem making us feel good about appreciating algorithms. Note that, I did not say that we are learning to write new algorithms, but merely understanding the beauty of existing ones. It is really fascinating that all what we have learned as of today and for all of those whose concrete proofs are available (in form of textbooks) have been accomplished before 1970s. Or, I will say mid 1970's to be on safer side. For the past 25 years this field, undoubtedly has contributed a lot but in direction which would seem a dead end back then.

The algorithm diaspora covers puzzles from all walks of life. From scheduling small things to building and optimizing complex motives, we rely on algorithms which would be executed by machines and would give us result based on our input set. What is particularly worth noticing here is the problems being discussed are no where in the domain of computer science. For example, the original problem on "3D Matching is NP Complete" had to do with polygamy and marriage between 3 sexes. Is the society ready for anything like that? No, not at all. But still this small problem if solved, would motivate people to link problems to this one and solve them. Or for that matter the N-Queens problem which has a 2^n solution. Come on, I did not see any value of that problem when I learnt about it in my undergrad class. But something of that sort can be transformed to problems in graph theory, wow! I could not envision that. So, yes it amazes me that how much application this field has in whatever walks of life we are in.

So, that brings on to us with questions which are asked during interviews and are supposed to be cracked "On the Spot". Hmmm. Quite a lot of expectation. Performing under pressure is never easy. But if you want to compete against a MIT undergrad who can churn in these solutions without taking a single class in this area, you better hold some ground in this subject. I would classify the problem being asked into 2 categories - One that is crack-able and the Second which are attempt-able. My point is that its good for you that the third category which contains a can of problems which are unsolvable to be as rare as possible. Why? Because you ain't any einstein, so you need not solve problems which he solved. Also, everyone is not in einstein's company, so they won't ask questions which only einstein could solve in his lifetime.

But still, given a problem, it is the approach which matters. Sometimes all you need is to invert the problem upside down to see it naked and surrendering to you. Sometimes you need to get hold of a pivot point for the puzzle to crack. How can I get it right everytime? Wish I knew the answer. The only answer I got was : Practice, practice and practice. You see things when you dive into it. Effort put in makes the picture a lot clearer in this subject. And the best part is that, when you are able to connect those dots, you feel like getting eternal bliss. You feel like you just cracked the $1M Netflix question, when actually what you have done has been done-undone-redone atleast a billion times.

Lately I have been thinking it would have made a lot of sense if the subject had been divided into 2 parts (Algo-I and Algo-II) and taught during our undergrad classes. It is the heart and soul of computer science, come on you need to give some time to it!

Why so much of a rant on algorithms. Because what I am going to do in the next 8 months has everything to do with algorithms but would not be specific to it. While it is true that I would be using existing ones, but the fact is that I am free to choose them and that makes it more difficult because it tests my understanding of the subject and how good am I in expressing my problem and transforming it into a solved puzzle of this subject. So why am I so afraid? The truth is that I did not do justice to this subject. I got busy with projects and blah blah and neglected this. But everytime, I tried to get hold of whats happening in the course, I just wished that I could have paid more attention to it. I am not great in solving puzzles, but I have noticed that by taking small steps towards breaking down the complexity of these questions, we can increase the likelihood of us cracking them down in minutes. All it requires is TIME. You give undivided attention and there you see things happening. But I must tell you that, it is something which cannot be done in 2 days. I know of the consequences of that statement and I am ready to accept it.

Next time you see someone in Computer Science scribbling something on a paper and cracking his head, give him some free space and time :) Not that you abandon him. Because what he is trying to do is work out his mind. And that makes him a healthy person in some aspect of life!

Sunday, April 20, 2008

Mocking Intelligence

I had to write out this stuff. This is taken straight from a presentation by Peter Norvig, Director of Research at Google. The discussion was on training using data sets, algorithms, machine learning, clustering of data sets and finding out potential patterns and outliers.

A nice problem was explained on String Segmentation. I won't try to create my own version but would cite some of the examples mentioned during the presentation. When dealing with texts written in languages such as Chinese etc many a times the need of spaces in between words is ignored. A Human mind reading the same can easily recognize the pattern and thus understand from the context as to what it is trying to convey.

But think about the computer brain. It goes nuts while interpreting these combinations. For example, it is easy to observe what the following line tries to say:

livelisteningparty :: live listening party

But combinations like,
smallandinsignificant becomes 'small and in significant' while it should have been 'small and insignificant'. Hence we conclude that semantic training on the data set is required. Again there might be words which are actually in the context but do not rank high in the training set to make an impact. One of the training sets which he had mentioned was of 1.7B size but would still fail to recognize an uncommon dictionary word and would break it into highly ranked separate clusters lacking any meaning altogether.

Ok, now the fun part. The examples next follow particular nuisance created by this parsing. In each of the examples mentioned below, you have a website hosted somewhere on web. And see what the computer makes up while tagging them.

www.whorepresents.com : who represents provides Contact Info for Celebraties etc :: whore presents (Now imagine what the similar searches would lead to)

www.therapistfinder.com : Finds you a Therapist in California :: the rapist finder (Gosh! The Dept. of Investigation would buy this one out!!)

Now, this one we all use for something or the other (Cached results remember :)

www.experts-exchange.com : Provides inputs to your queries :: expert sexchange (Yeh I know you would say that the delimiter should not be ignored, but then do you know the very reason of having that! ... Yeh :)

www.penisland.net : pen island provides Custom made pens on internet :: (Aha! Pop Quiz Time .... Left for you)

So, still we need things out here to evolve. Computers need to socialize more I guess and know what fits in where.


Friday, March 14, 2008

Projects, Linux and Tricks

This is perhaps an useful post I am writing after a long long time. Normally it is just rants on life and things which are bogus or seem to be. Without digressing much from the topic, let me tell you about my rebirth in the linux world. Still in dormant phase, but few minutes back - I just saved myself from buying a 2 GB RAM to work full time on Linux and still use Windows for GTalk Calls. Haha, what a reason to have Vista on my laptop.

Question 1

Sometimes while using Visual Studio C++, you feel out-of-the-blue the auto complete feature suddenly stopped working. You would close the solution and reopen, but just nothing would happen.

Answer

The auto complete feature is basically a slow build up which Visual Studio does time and hence while you are busy coding. It builds a huge repository of index which would help you to quickly access lot of your code snippets and lines with shortcuts to make your life as a programmer simpler. Now, if you search in your solution directory, there will be a file with the extension .ncb. Now thats the culprit for the problem above. It would be having the same name as your project and would have a description as some "Intelli sense ...". Just check the size and I promise you that it would be larger than your code base. Just for statistics, while my code base was in all just 380 KB in total, the .ncb file was 1.5 MB. So now you know the exact reason, why in databases, data actually takes 20 GB of space and the indices take the rest 80 GB. You just have so many of them to make your life simpler as all you know to use is "search".

Hence, the simplest solution is to delete the .ncb file. Don't worry, nothing will happen. Until you source code is there, this file has no significance. As soon as you open your IDE, this file will start building again. And in no time it will grow that big. Many a times, due to some **poor** programmers out there in VS team, the ncb file gets corrupted. Hence, from that point on, nothing starts working properly. Older additions might work, but if you add new classes, it will just not respond.

So check first if compilation goes through. If it does, there is no reason IntelliSense should not work.

Question 2

I have just a 1 GB of RAM. I don't want to work on Vista except that I want to receive calls on GTalk. And somehow Ubuntu on Vmware runs slow.

Answer

I don't have a concrete answer for this one. But this is what saved me from buying an extra 2 GB and blowing out $80.

Go to msconfig and turn off all services you don't want.
Open Task Manager and kill all the processes you don't want. See to it that they are removed from startup.
Go to System Properties and see that the memory usage is optimized for **BEST PERFORMANCE** - which means back to Windows 95. :) This blog I am typing is in Ubuntu, and I can guarantee that if someone performs a GUI comparison between my Vista and Ubuntu, the latter will win hands down. Still, now I am getting a lot better performance than earlier when my mouse used to hang and processes used to take a lot of time before getting spawned. So much so for Vista!

Question 3

Whats an ok-if-not-nice setup if I want to move to Linux?

Answer

I am playing safe here coz I know people tend to use a lot of tools and swear by it. When I install a package, I feel that I have a necessary requirement to have it. I hate to have unused softwares on my disk if I am not using them.

So I installed Ubuntu. Pretty easy and nice. Next was to get kdevelop. I know vim folks would dread me for this. But I am an IDE person (moving from eclipse, come on; you got to give me a chance).

If I evaluate kdevelop, I would rate it at 7/10. Nice integration with CVS and SVN. Autocomplete just about works perfectly fine. Switching to header/body is not that perfect but its manageable with the help of the File Tree. Integration with konsole is available at the bottom. It recommends kompare for diffs and is really very well suited for collaborative development.

What I did not like is that, the debugging is not that great. I mean you don't have that great an interface - coz it makes you slow. But in case you are comfortable with gdb, you can just find your way out. Regular watchpoints, breakpoints etc work fine.

So, pretty much thats my linux setup. I allocated around 16 GB of space and am pretty much all set to work on the 6 million record dataset I have for full time :).

Question 4

What to do if you suck at using Linux Commands?

Answer

I am still trying to find that out. But what I got is that, you can't memorize them in a day. It's only through long long hours of code development that you realize that suddenly you want to do some filesystem or memory stuffs. As one of my friend perhaps screwed up the vim version and had to rollback to prev version but was not able to figure out a way to leave glibc6 untouched. Such nifty things won't come to you overnight. It is just that you have to make linux your mistress, accept your illicit relationship in public and then you might find getting into the groove.

This question arose because in my last 2 interviews, I have been shot and fired with unix commands which I have managed to ignore till today. But perhaps, destiny has its own thoughts.

So currently this is the list of open items for me:

1. Start using unix commands. Just grep won't do :)
2. Start learning python for scripting. You need one, once in a while apart from shell script.
3. Install mysql and start tweaking in.
4. Algorithms, Algorithms, Algorithms. - Do I have to say more?

I was asked today about memcached. I remember before the beginning of all these interviews etc, when I first took the Database System Implementation course, read a lot about Google Big Table and was fascinated about Distributed Systems - the first thing which impressed me was memcached. Next was the hadoop project; a part of lucene. I just wished if I ever get a chance to work on something like memcached. If I ever could learn to know what Oracle Caching Algorithm is. I had got the opportunity today - just that perhaps I blew it, and that too I did it pretty nicely. Hence, this rant. Oh, it comes again!

So guys, there are things open here and we need to work. Your comments are utmost welcome. Have some new things to share, do leave me a note. Adios.

Friday, March 7, 2008

Stop and Stare

An ideal morning for me would be an extended version of a Sunday Morning. Waking up at 10, making a hot cup of coffee with just the right amount of sugar and creamer with VH1 playing the Top 20 countdown. Wow! Perfect start to a perfect day.

Tonight, when the college breaks in mid of spring semester, I try to recollect how fast the days have gone by in recent weeks. I have been more or less able to cope up with facts and figures which would give a normal guy a heart attack. Of course, when you try to juggle more than 3 balls, it's likely you goof up somewhere. I am no professional neither a genius. So trying to play just an average guy - which indicates that my acads are not going too well, but yeh in an amortized sense ; everything is just all fine.

The visit to NYC was awesome. We stayed at Broadway Millennium which is at Times Square (I mean AT Times Square, of course, you can't be "at" per se, but it was 10 steps from there). I had the 46th floor with nice view of - yeh - The Times Square :). NYC was freezing. The hotel was too much comfortable. We had lots of coffee, thanks to the Coffee Maker provided in the room. I guess it tops the list of first-to-be-bought-items when I visit NYC in summer. Roaming around the city reminds me of Bombay. But it is way more than that. It's a real cosmo world. And I mean world.

I have been watching the Top20 Countdown on VH1. Everyday when I wake up, its perhaps the best thing to make my eyes at least open and start peeping, even if it is the Idiot Box. There are two songs which are currently in the Top 10 and are awesome. You can listen to them online.

"Falling Slowly" from the band "The Frames" won the Academy Award this year.

"Stop and Stare" from the band "RepublicOne" is a debut, still a good debut.

So, next time you get a chance, hook on to rhapsody or youtube and watch them!

Few lines from "Stop and Stare"

Stop and stare
I think I'm moving but I go nowhere
Yeah I know that everyone gets scared
But I've become what I can't be, oh
Stop and stare
You start to wonder why you're 'here' not there
And you'd give anything to get what's fair
But fair ain't what you really need
Oh, can u see what I see

Adios and Happy Spring Break!

Monday, March 3, 2008

Mad about Money

I won't write anything here because this is my second time. The saying goes that to err is human. But I think all this is done so well, that I don't blame myself falling into the trap twice. I just hope to be smart enough to evade it a third time.

I would point you to a webpage - Go READ here.

And then http://en.wikipedia.org/wiki/Pyramid_scheme.

If you don't have time, just watch the video (thats enough). Be educated and start to think logically. And then suddenly you realize the days of one-dimensional rabbit holes are long gone. There are meshes and meshes surrounding you. Ideas and philosophies which blind you for the very wrong desire which you always loathed.

Saturday, February 16, 2008

Vagaries of mind multiplicity

One of my friend used the following signature for his email footnote:

Every man is a hero is his dreams
- Sigmund Freud.

Today, is a saturday night. This week has been more than just a week. I saw couple of night outs - which have faded out since college days. Of course, sometime back in my working days - I used to stay late and finish work. But, things did not last this long - because I never felt that compulsive responsibility. As this is academics, you feel bad when you screw up due to mis-management. So, perhaps let the oil burn a little more - it just reminds of those days when things used to shine bright till the morning dawn.

Next week is going to be still more hectic. Oh! did I say hectic - thats an understatement. I would make my first trip out of Gainesville - a paid one of course. So, I am all excited to go to New York where I am supposed to give an interview and perhaps as friends plan - stay a while and enjoy the place. I can feel jitters in my stomach every time I think about the trip - but I convince myself saying that this is just a beginning. Many more are yet to come. This mind is not just waste matter - some gray cells are worth the price.

So, would an interview make it hectic. Nope! Nada! I have given so many of them that the questions often don't surprise me - if they save those "Out of the Box" ones. For those types - I have an honest answer - given time I can produce equally worthy results to your satisfaction ; but at this moment my best answer may not average well with your expectations. I may digress with things which are way beyond imagination while coming out with suggestions which may seem dumb to incorporate. I am not saying I lack creativity - all I am is a lazy thinker.

Next, to add to the interview - I have a quiz, two assignments, two projects and a midterm lined up in ten days. Is it not a red carpet for me - a bloodshed in waiting!

So, why the title reads multiplicity - many of times when you are alone, you feel like talking to yourself. When you are with your self for some more time - you start retrospection. You go back in time, recollect fond memories, shed some tears, laugh off key moments and wish you had more of them. You then digress more and ask what is WRONG in the present moment. Why are you unhappy? Your mind gets divided into two halves. You start judging yourself with the popular yardstick of successful and unsuccessful people around you. You start assuming things on their part as how they have made their lives lively or miserable and what is common between them and you. Somewhere in the middle of retrospection, you start contemplating about your future. And you dig down deep into the rabbit hole for hours - tumbling like Alice, whatever happened to the wonderland!

I hear this song - "Numbered Days" by Eels/Shootenanny often. The song makes me feel to long more. Like every passing day is taking something away from me and I have very few moments left to cherish. I hear it when I am alone ; in a mood to complain for something or the other.

I thought I would quote some lines here : but I could not pick which ones I should show up here. So here's the link. Do listen to the song if you get a chance (It belongs to soft rock genre and available in rhapsody).

So, its a saturday night. I missed out on my weekly badminton practice due to the schedule I have. But, if I see people around me - I am still having a lot of time to myself. If I can write this huge a blog, I won't lie that I spend time in useless stuffs too. But perhaps everybody is not built in the same type. We need different catalysts to keep our lives going. To say that one's catalyst is bad is putting a wrong argument.

So - fixed in all the mind battles, what is Joyesh going to do? Breathe in and start fighting the lonely battle or ruin everything and let life take its course? Is it the time to say "Thats it, Its all over, I'm through .... Counting Numbered Days".

<yawn>
<more yawn followed by a deep sleep>
<I have been watching MATRIX a lot these days than medically prescribed>

Tuesday, January 29, 2008

Language Bashing

"You know what - Java sucks". When someone tells something in those lines in front me - my blood boils. I am literally letting my heart speak rather than making the expression any less intense.

Well, as a matter of fact, I was one of the victims of this unnamed syndrome when I graduated from college. At that time, we had three choices - C or C++ or Java. Some went ahead with C, few with C++ and many with Java. I belonged to the last camp. My frequent attempts were to educate people with Java and how powerful it is. I despised people who coded in C - like they live in some sixties still. For C++ people, I had some admiration - but I knew that 90% people who say that they write C++ code, actually mean they write "C with Classes" code. So, I often indulged in verbal bashes in favor of Java (quoting the design patterns to whom most were unfamiliar). Sometimes, I could convince people - sometimes I just gave it up.

After a while, AJAX came into picture. That, I believe, is a turning point in defining what would be the perfect language. I will give the answer after a few lines here. The next noticeable turnaround was the chanting of "python" mantra by Google-related sources. People said that C++ and Java are soon to be extinct : scripting is the way to go. You will find millions of just blog lines and comments arguing that this language is the future and that cannot hold any longer. Had those developers written that many lines of code - probably some company would have posted more profit than Google did (or whomsoever is the leader in this area). Few long-bearded gentlemen proposed Rails and further Ruby-on-Rails. I guess - that is the sweetest name of any framework I have ever heard. And again all hell broke loose. People against people - on something so abstract.

And still today I hear it - "Java is for web development Man! Do you want to go in that field?"

People who are expert in PERL should die. And those still writing code in Assembly - I guess they should take a hack-saw, put in some salt & after-shave mix on the ridge and start cutting their throats right now. I am sad to say them this - You guys don't even get discussed among these people. Read on.... you can do those once you are done with this article. I hope you change your mind.

The ONLY answer I have for all these people - who ask such STUPID question & perhaps are too adamant about seeing the truth is : Someday, you are going to learn it the hard way - brutal and it will hurt.

"There exists no ONE language for all purposes". That being said, people still try to make coteries among language. Oh you know what - if you are in this subset {ASM,C,C++}, then take the kleen closure and you are cool. Otherwise, you are not among the best. Shocking!!

I have been riding this wave for 4 years now. And perhaps I can see the shore. My belief is that there is exists no ONE language for all solutions. Neither coteries help. What matters the most is this simple question - "What is the fastest way you can make money out of the effort you put in and once done how long does it take you to keep it generating worthy revenue". I guess you would understand how sensible that question is - you involve business in and you see everyone is nodding and listening to you very carefully. Read on.

Money matters to us all. We may want to be a filthy rich professional or are a humble millionaire already through stock options - what we all believe in at the end of the day is we EARN our money and this earning never dries - till we are faithful to our work.

Said that - we are always home with certain technologies like C++, Java, Oracle, MS Office etc to name a few. Anything beyond that will make our ears go deaf. Protests will just be knocked out without giving any second thoughts.

No doubt they are the best products of some of the VERY best minds in our industry - but didn't they solve some purpose too easily which at one time looked unsolvable. That is the main reason why they have gained so much popularity and people have embraced it. But one needs to know, someday a bigger different problem would exist - and then everything would break loose again. We need a new solution and it would be one of its kind. Evolution is something which we can't stop. We HAVE to embrace it and live our lives.

So for people who are still reading as in why Java DOES NOT suck against C++ - I will answer next.

Any product, given a bunch of exceptionally talented engineers, can be written to the best it can perform. Did I forget the language part there?

No.

You guys might want to read the INTERNET more than a NORMAL / AVERAGE person who uses Java does. There are many benchmarks which cite performance measurements with Java outperforming C++ compiled with g++. I AM NO WAY SAYING NOW THAT C++ IS BAD. There can be many reasons to this - The platform can be a mobile phone whose stack was implemented in Java - so JVM compatibility was the best when the apps were written in Java. What you often forget is the following two simple things which are utmost important to any product development:

1. Time to turn around the concept to reality - a neat and clean working code
2. Time to fix bugs

Now, if you really don't want to hold no longer and ask the AGE-OLD tried and tested missile question - "What happened to performance" - All I can say is this - "Every language gives you freedom to fiddle with it - to the degree that you modify and use it to the best you want to". In case of Java, you may want to redefine the garbage collection and tweak in the JVM. But you won't : as language bashing is the easier route.

A new age is upon us. When I started using computers, C++ was the standard. Java came into boom in late nineties. We bid goodbyes to procedural languages and welcomed OO frameworks. Somewhere and sometime, scripting language sneaked in. Some trillions of lines were written overnight and they remain as backbone and sometimes the most important asset of many companies. We jumped guns and embraced Javascript through AJAX - because it just looked cool. The person who still does not know what is the POWER of AJAX : will not give you an iota of respect if you say that your bread and butter is Javascript. May be PHP might sound cool to him. (Don't say ASP or JScript - you will fall 'down' into some domain that he cannot define himself).

Then why is that Cisco still uses Assembly in its best possible routing codes. Why do companies employ people to learn PERL and write those very million dollars worthy UNIT test cases - is TDD bad after all? Or why does not Google do all its development just in C++? Why does Microsoft spend money after all in inventing F# or asking teams to build products using D. Why Bruce Eckel takes the pain in evaluating Scala and advising people that it is the most definitive successor to Java. Why in MIT if you still get admitted, you get to use Scheme. And you thought coding in Python was cool.

Baseline - It is the time to build and sell the product which matters. Do it in a language you are comfortable with - so that you will write less buggy code and give a better output in the time assigned to you. But by that don't convince youself that you have evolved to the best you can. Keep you eyes open. C++ has its place - may be in embedded systems, may be with C++0x you would find a Concurrent Language worthy of learning (you might want to learn a language which is inherently concurrent - not just supports threads as a library). When you speak about Oct core systems, if you write a program which does not exploit Concurrency - you should feel sick downright - coz you are wasting computing power. Don't you think there should be language ConcurrentJava which would befit. Or you still want to to fall into your coterie and be Multi-C.

Java or C++ - they have places to stay. So is ASM. You want real time - use ASM. You want little lesser than that use C. May be even C++ now-a-days gives almost the same runtime support with HALF the development and perhaps ONE-EIGHTH the maintainance time. Use Java to build applications in Distributed Platforms - Isn't today all the work done in distributed scenarios? You want performance - tweak in JVM. Profile and profile. When you give up - know that given ONE-TENTH the time you invested in coding it in Java, you can achieve the same mark if you switch to any different language if you have some excellent coders in your team and IF YOUR DESIGN IS PERFECT. People neglect the 80/20 rule and start cursing Java. They don't realize that the 80 belongs to the debugging and cross-platform issues in C++. In Java most of the time is spent in designing. Still, some good coders are faithful and regardless of language, spend time in architecting the entire thing - before even deciding what to use : I say they are the best coders, even if they have not written even one damn line!

So, start googling for the language problems you feel you have. There can't be a case that all your problems are solved by one paradigm solution. Learn at least one from each - Assembly, Procedural, OO, Scripting and Functional (sorry, If I missed anything here - tell me and I will learn). You can build a browser in just 25 lines of Python code. While in some - you can multiply two matrices in just one line.

Remember that what matters is you should propose a solution which should be independent of underlying infrastructure. Model you design to not compromise with anything. Then start picking what fits in best based on constraints you have :
1. Time to build and sell (Productivity counts)
2. Ease of collaboration
3. Ease of Maintainance
4. Debugging
5. Inherent features and Recent Developments
6. Open Source Initiatives and Available Plugins
7. Scalability and Performance Metrics
8. Agility

So the next time if someone asks you - "Do you recommend me reading Java or C++?". Just stare and stay silent - Do not utter a word. I hope he feels like he asked a question which perplexed you so much that you could hit him at any moment. After sometime he would realize it and start describing the actual problem in his design and then asking for advice. All you need now is to educate him not to ask that little **stupid** question again.

Saturday, January 26, 2008

Potpourri

We are always living in times when things are happening - even when they seem to be still and quiet. In case you are like me - you must know this, that you are missing out the celebration somewhere.

In the winter break I watched so many movies that I stopped watching any more this semester. With that I meant I stopped watching movies on television. I watched Halla Bol recently - but would not recommend as a must watch. The theme lacked a force - may be few strong dialogs from the main actor Ajay Devgan. And yes, before that I watched Juno. Nice movie - simple story : good watch. And I always knew the guys in SuperBad would be seen in many more to come.

And then there is Australian Open. All sorts of thing happening this year around. Tsonga beats Nadal as if Nadal was the one who was unseeded. The volleys and techniques just stunned Nadal who tamely lost the game. The courts are said to be slower than US Open, but still Tsonga repeatedly surprised Nadal by coming to the center of the court and taking control of the game rather than letting Nadal to continue his baseline ralleys.

And then the historic upset - I would say this because I respect Roger. When he says he has created a "Monster", we have no idea how high peoples' imaginations soar for him. I watched his game against Blake - James was no match. He was a spectator to almost most of Federer's returns. People often say that this man is 26 and still the fastest around. But....

Someday all this has to end. If not this grand slam, still signs have started coming in. And I hope the best for him to make that 14 as soon as possible. Djokovic was not very good - but he played really sensibly. My analysis (whatever sane my mind could think) is that Roger dig his own grave by making more unforced errors than that is allowed in a grand slam final and come on - its not allowed to him either, he is Roger Federer. Novak never failed trying and the moment he got the opportunity to break games, he took his chances. It was a great game to watch and to see the legend bow down. I am making him a legend - coz I know he is sure to be one pretty soon.

Next comes Fe-male matches. Sadly I watched the finals. My observations were that ladies should not have two serves given to them because 99% times they tend to make mistakes in the first serve. Hardly you see 2-3 aces in the entire match. Anyways, as reported in the news, it must have been a photographers' frenzy to watch Tennis's 2 hottest and best players fight each other - Serbian Ana Ivanovic vs Russian Maria Sharapova. Who then cares what happened to match? Haha, just for the records - Maria won it in straight sets. But I cheered for Ana and I know Maria ain't last long.

What else - I had and have my classes going in full SWING. Unfortunately, rather than going out and playing it, I am in my blanket caught napping for past a month now. Thats {bs}ad.

Next few weeks are going to be interesting. I am hoping that I get some Internship Calls pretty soon - now that its time to convert and secure something for the summer. So, thats in a whole a short diary of what happening these days. And being a lazy bum - I did not celebrate republic day ? Why, because by the time I recollected it was THE day the time in the clock was 6:30 pm. India was already past the day :).

Adios.

Monday, January 14, 2008

Bloated, Wrinkled and Dead

Things sometimes don't go well. You can see them working - but not around you. You see people moving on with those things quickly and efficiently - they are happy. Sometimes thats makes you all the more sad. Is it not?

Well - to make it worse - you can't stop them from moving on. Can you? They have every right to. We all live for ourselves. And then you know that you are alone!

Still - a wise man has said, "It is not what happened to you, It is what you do about it". Perhaps, that extra hassle will pay off some day. Life is unfortunately an infinitely big circle. The moment you call your game to be over - might be the turning moment of your life. Its a casino which never shuts down itself - until you pack your cards. So as I always have said to myself - hang on!!!

SiteMeter