November 18, 2006

Reaching a milestone!

On October 10th, I setup my personal website at googlepages. My site is registered with the Google Analytics service and I have been tracking my site's performance. Now after a month I have crossed a milestone! My number of visits crossed 100! I am all happy about what I have achieved so far.

Upon reaching this milestone I have updated my site by giving it a new look and new pages. Two new pages series "TechnoPaper" and "GPC Corner" has been added to the site.
"TechnoPaper" column will have some of my technical articles hosted. It will be related to my programming experience and observations. Whereas the "GPC Corner" will be about Google Page Creator. I plan to publish what all I study from building my site. It would be any "Tips and Tricks" pages, but will have some of the things that I am trying out in GPC.

Before concluding let me show my Map Overlay:

November 15, 2006

Loop Variable’s Scope

According to C, C++ the scope of variables in for loop is within the loop. That is, a variable inside the loop will not be accessible once the loop finishes it job! For example:

for (int i=0;i<MAX;i++) {

// do something in the loop

// variable “i” should not be accessible!

But there is another twist in this variable’s scoping. Different compilers should different behaviours in scoping of variables. I will review three compilers here: Borland CPP 3.0, Visual Studio 6.0, GCC 3 and above.

Compiler 1: (Borland C++ 3.0)

This one of the most used compiler by beginners! But I will never recommend it for starting C or C++ as its too old (released in 1989) and have troubles running with latest processors. Now, lets take an example. Consider the loop given below:

for (int i=0;i<MAX;i++) {

printf (“Value of I : %d \n”, i);

printf (“Out of loop! \n The value of i is: %d”, i);

Running this loop will give you list of “i” values and finally once the loop is complete the final value i.e., MAX will be displayed. In short we will be able to access the variable out of its scope! Is this correct? Since I found this behaviour in Borland I did a research with other compilers.

Compiler 2: (Visual Studio 6)

Visual Studio 6 from Microsoft is one of the highly professional IDE available. This IDE too shows the same behaviour. I don’t have access to the latest Microsoft IDE (.Net) so haven’t checked it out. Another important aspect of Microsoft compile is that it doesn’t follow C99 standard complete.

Compile 3: (GCC 3 and Above)

Now some the change! The same code in GCC (GNU Compiler Collection) will give you an error! You will not able to access the variable outside the loop as the scoping rule goes.

Try out the loop in GCC and see how standardized it is. If you don’t use Linux you can GCC based compiler like DEV-C++ for windows platform. For any beginners I would recommend them to study C/C++ using GCC compile and never NEVER use old Borland compilers!

November 03, 2006

Linux under threat

The Linux operating system is one of the biggest revolutions in the history of computing. It has changed the world and still changing. A project by Linus Trovalds, has changed computing world a lot in its 15 years of existence. Linux now drive world’s super computer to mobile phones and many other gadgets. Linux and the open-source software movement have got billions of dollars of investment from IBM, HP, Red Hat, Google. But will this all stop? Is it in endanger not by its rival “Microsoft” but from world’s greatest hacker – Richard Stallman? He the creator of FSF (Free Software foundation) and GNU, the leader of Freedom movement in computing. A Guru, hacker etc…

Now let me take you to year 2005 when Richard Stallman visited our VIT campus on his mission to propagate Freedom. I was excited to see him and attended his speech in which he talked about calling Linux “GNU/Linux” as GNU supported its growth and existence. And from that day on I called it that way, giving respect to GNU. And I do respect GNU. They have started the revolution for free software and Linus just fitted the pieces to form the complete system. This is one instance from my side.

The second one: I was one the first subscribers of the magazine “Linux for you”. A well known Linux magazine in India. One of its initial issues contained an interview with Stallman who said the magazine should have been “GNU/Linux for you” or “GNU for you” as Linux is just a small part of GNU.

Richard Stallman is now waging a new crusade that could end up toppling the revolution he helped create. He aims to impose new restrictions on IBM and any other companies that distribute software using even a single line of Linux code. They would be forbidden from using Linux software to block users from infringing on copyright and intellectual-property rights ("Digital Rights Management"); and they would be barred from suing over alleged patent infringements related to Linux. Now don’t you think that’s breech of freedom? And Torvalds doesn't like GPL that would prohibit companies from using GPLv3 code to create digital rights management (DRM) schemes. Torvalds says he won't adopt the new license and will stick with GPLv2 instead.

The Problem is, Torvalds only controls the "kernel" of the operating system, which is just 5% of the total operating system. Many of the other parts will move to the new license thus causing a big split. This will cause problems for companies like Red Hat, Novell etc.
Another problem is that the two licenses seem to be incompatible. According to Diane Peters, It's not clear yet whether companies can ship products that merge v2 code with v3 code. So what will happen next? The Linux world would be spilt into two… “v2” camp (corporations) and “v3” camp (extremists)!

Extremists say they don't care. "People can go run another operating system," says Bruce Perens, a free-software advocate who supports Stallman. He also says if Torvalds doesn't adopt GPLv3, extremists will create a new operating system using a different kernel. So now we have “forking” of Linux Operating System and this would create many incompatible versions of the OS.The biggest beneficiary of this is the proprietary software giant: Microsoft, which pitches its Windows operating system as "safer" than Linux, and Sun Microsystems, with its open-source version of Solaris system, which doesn't use the GPL.And the looser could be Stallman himself. He is risking loosing the empire he helped built. Loosing would make him an irrelevant person in the community and would be considered a crack who tried bringing down his own empire!