Monday, June 1, 2009

Fishing in the Desert – 1


Hi Folks!!


I kept you waitin for a while abt the story... Lemme continue from where I ended in Fishing in the Desert- 0. They faced some sand dunes and now they were equipped with enough expertise to foresee that 2 major sand storms were inevitable.


It was time for combining the modules written by the two oor-coders – that means first sand storm had arrived. The code was so compatible that, it was giving every possible kind of error at random points in the code. Sometimes memory leak, sometimes bbiiiig error values and so on.


As they were expecting it, they were prepared mentally for the sand storm and had enough reserves of water (patience, test cases, innovation, etc.). Each of the guys were a lil doubtful of their own code (such confidence naturally accrues to professional coders like them). A sample discussion about the error between them loooked smth like this:


Oor : Something is wrong man!!

Stup-pid : (In his mind) Oh Really! I din't know...

(Aloud) Are u sure that there are no errors in the x.cpp file u've written?

Oor : (Fully Confident) Yeah man! Of course...

Stup- pid : Pucca??

Oor : (Doubt in mind starts dominating) Er! I mean.. it should be man!! where is the chance of error in such simple logic?

Stup-pid : (In his mind) Simple logic? Let's see when we find the bug...

(Aloud) But I've checked each and every line of my code and everything seems to be ok

Oor : (Shrugs) So is mine...


Everyone's code is fine. Then where is the f***ing problem? Careful design of test cases did not help. Changing some parts of doubtful code did not help. But they ended up fixing a lot of minor bugs and allocated memory efficiently. By this time, they have used all their innovation and were devoid of reserves. They started losing hope of finding any fish. Despite the use of all their intelligent efforts, it was the f***ing BUG that won all the time manisfesting itself in a different form each time.


Finally, one fine afternoon, when both were chasing a prospective bug, the real BUG presented itself before them like an angel. Oor-coding was the culprit. No wonder the logic was so perfect and everything seemed to be in place. Ok. The error was : Stup-pid was stupid enough to send a pointer to a crucial variable to a function which modifies it. He happened to ignore the insignificant fact that it was actually modified there and proceeded using that variable as if it had it's original value. Put in simple words, a simple const keyword while passing the variable would have avoided the sand storm entirely...


Yeah.. of course, they were able to find and fix some minor bugs in the process but - “Should they slog so much to learn so little..?”

Saturday, May 30, 2009

Phd vs Startup

The very title makes me think I am biased........of course towards a Phd...The last few days ( almost a week) has been the worst roller-coaster ride till date...It does not surprise me if I continue to say the same in every post of mine..

A fast update on the few coding/algo stuff. First we found the bug in the bundle adjustment as an integer overflow problem..Thankfully, got the projective bundle adjustment working...But the auto-calibration would not be so easy...We got so frustrated that we thought we need to invent a whole new way of looking at the problem as most auto-alibration things are not always going to work. More importantly, as some one in the ML community, I hate being stuck at the local-optima in lev-mar algorithm. Fortunately, as we were almost packing our bags and postponing things by atleast 6 months, we found a small ray of hope...using K,R,t in the lev-mar instead of camera matrix P...Chytu is working on it as I jot this down....

Now for the most important dilemma......Phd vs Startup.....As we got stuck with these techniques, I strongly felt that we need to innovate fundamentally in a very mathematical way....But Microsoft's Photosynth always reminds me that the present technique is pretty mature......But I dont want to agree. We felt that posing this problem as a convex optimization/markov model thing is the solution forward..But we neither have that mathematical versatality nor the time to do that in just a month...So we decieded to go and join our respective companies and work on this problem for the next 6 months...If everything goes well, we may have a solution in 6 months..which I see as very improbable... because changing 20 years of research in 6 months is not easy...So Chytu and myself taught that we need to come back to IISc for a Phd after 6 months..taking these six months as time to work further on this problem and see a bit of 'Corporate' life...This Phd thing is getting very much into my head...so much so that I was reconsidering the whole startup thing....As my weekness goes, I get too caught up with something ....So is this.....

I feel like contributing fundamentally to science now a days...I donot know why?..it feels that I am thinking like the way I used to in my BTech 3rd year...do some fundamental research...It all seems to come a full-circle...I am confused as I write this....but this small ray of hope in the 3D thing is seemingly like a small thread to which I am hanging on now...If it all works, I probably will have a nice startup and hopefully Chytu and myself will do some fundamental research in our spare time in the startup..But this startup cannot live long wiothout some fundamental research....So may be even a startup is not a bad idea...if i dont get too sucked up into marketing.......If i get into a phd, I may have to forget startup till I am 35 or so....this post seems as confucing and ill-written as I dont even know what to write...CONFUSED to the extreme...


The best way seems ...Startup in next 6 months..and a gr8 research wing in it...where in I will also be an integral part...Years down the line, may be I can get into Research completely...in the lines of DE Shaw or Bose or Edison....(I guess I am expecting too much in Life)..As Sai points out with me, "I dont want to give up anything in life".....But the thread of hope still holds me from falling away from the Startup thing..Hope this will be the same for next 6 months atleast.. I guess I can hold on for 6 months..But if the Phd thing in my head gets too powerful, I guess I cant hold on for anything more than 6 months....

I hope this dilemma will be something I will laugh at years from now...

Monday, May 25, 2009




Thats where we three are right now!! Unfortunately the maze is non-linear!!

Fishing in the Desert - 0

Okay. I started blogging. But why would a confused 'Oor' (country guy) like me blog? Well, opinions are free. Everyone's got one. Moreover, since I am unique like everybody else, I too have some unique opinions about everything ;) and that's why I wanna blog. No, I am not gonna blog about human psychology now.

So, let's start from where stup-pid started (or should I rather start from where he ended?). But let me tell something that was even before the point from where stup-pid has started. It's a long story but I'll try to finish it quickly. Because I am different, I'd like to name the earlier post of stup-pid as Fishing in the Desert-2.

The story starts like this. Mr. Enthusiastic/Talkative, Mr.Half-blind an Mr.Extremist dreamt of changing the world's vision. They were gonna graduate in a few months and they din't have enough experience in coding(fishing). All they knew was holding the fishing rod. Neither did they have experience in finding a fishing place(business stuff). But, they thought that one great idea (coupled with implementation, of course) can change their lives and probably, the world.

Strangely enough, that great idea came from computer vision, a field in which they were not very well-versed with the technical expertise. But still, they wanted to pursue their idea. Discussions with more experienced well-wishers like Sai gave them the headstart and Lo! they started Fishing in the Desert!! (wtf!?)

Technical expertise was not a very big problem. They read the related books and gained enough(??) knowledge on the field and found the problem to be technically feasible in theory. They divided their work according to their (expected) abilities and stup-pid and oor-coder decided to start fishing, sorry coding the initial stuff. One fine morning, they started. It all went well for a few days until the motivated stup-pid had to take a break due to some unavoidable circumstances.

Oor-coder was waiting exactly for this chance and got readily deviated towards other things.Especially, it was the season of games at that time in IISc. Oor started deviating and enjoying to his fill in the absence of the big-guy. So, the big-guy stup-pid, due to circumstances and oor, also due to circumstances deviated from the original work. Needless to say, both of them lost motivation and touch with the subject. But this was only the start.

This was the first(zeroeth) and the biggest sand storm(so far) they faced in their fishing experience. There were more to come.. and there is no fun without them. After 15 days, the big-guy had returned but the focus didn't. He tried a lot to first get motivation for himself and then inspire the goal-less oor. They needed almost a month to get their focus back onto the problem rather than on other things as games. Poor stup-pid had to do a lot of reading of inspirational stuff on the internet and explain everything to oor from the scratch to get him back on track. I still wonder why stu-pid needed oor in the first place...

The first caravan finally ended up in an oasis where the guyz could fish.. but it took a little while for them to get the confidence : "We will survive".

Sunday, May 24, 2009

The low point-2

Huh..Atlast, we have started it out...I mean writing this blog...When we are stuck...and lost in the wilderness of 3D , non-linear optimization and the unknown "desert"--the only thing we see on the horizon....We are slowed down, beaten to our worst (so far...), and most importantly caught off-guard when we least expected it....The best part is that ..it's not the first time....So "HOPE" still reigns...


Our ( I should rather say MY) last mistake was soo dumb..that I at-last learned the meaning of "const" keyword in parameter passing in C...This singular(not-matrix) mistake has taken down a week and we were almost at the brink of giving up...But then came a ray of hope...and lots of energy as we found this bug while trying to fix something else...I guess this happens all the time in s/w engineering...


In spite of the lull-mood, after a weekend of frustration, rethinking , lot of movies and 14 hrs straight sleep to get to a better mood, I guess I am successful in beating the Satan within......The thoughts of Phd, the worries and fears of joining Yahoo, and the most important--the sadness ( of not being able to accomplish what I came here for..in spite of all that IISc offered me...gr8 environment and a gr8 team.....) have been with me for the past 2 days..But I successfully got rid of them wid lots of ice-cream, gr8 sleep and lot of rethinking of the "PURPOSE"........


After a few talks wid Sai, I feel that "to accomplish great deeds, we need to withstand pressures orders of magnitude more than this, we need to innovate exponentially more than this, and we need to keep focus what ever comes...".I feel the journey is just getting started...I am glad to put the first post at the lull-momemt....'Coz thats when we mostly will have time to type-down...haha...

After a few weeks( I guess effectively 10 weeks) of work, I feel this is no way proportional to our vision.of adding the next dimension...If we get to the solution now., would have nothing thrilling in this journey..I guess these tougher moments will be the best when we look back on this journey...as it always has been till now for me..I guess reaching the end is a long-drawn process with many more moments like these...

I wish we have many more "abysmally" low points like this and worse.....a few moments of laugh and infinite optimism.....but at the end have the VISION fulfilled....thats what makes this journey enjoyable...

I guess the roller-coaster ride has just begun.....With us at the low now....trying to get back to the top.....