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.

SiteMeter