Microsoft should start supporting open source community…

I read this artcile  –  NDoc 2 is Officially Dead.    Not supporting open source is the major difference between Microsoft and its competitors.  I think its going to be the number one reason for developers and customers moving out of  Microsoft.   In real world, developers face much more difficulties than Microsoft thinks developers face. That is the very reason tools like NDoc, NUnit, NAnt, CuriseControl etc are widely used by development communities.  Isnt it fair to expect that Microsoft should nurture and grow this kind of tools and communities instead of killing them indirectly.   They are of the firm belief, that their development tools has everything in it, but the reality is otherwise (dont worry if something is not there in this version,  Microsoft will bundle it in its next version of tools.. Save your money to buy it.. ).

Personally, Its all about freedom for the development community.  Today, Microsoft has money to re-build software that is popular in market and bundle it with its product and sell it to customers, there by forcing many companies out of business.  Is it a fair game.. I dont know..

Advertisements

Should I really care about internal working of a computer?

Well, the answer is it depends. Computer science gives you this flexibility always. You can figure out 1000 reasons for why you should care and another 1000 reasons for why need not care.

My personal view point is – “One should know internal working of computer atleast to a minimum”. But then, minimum is a subjective term. We have lot many subjective terms floating – like Health, Quality, Performance, Security etc. For some health means running 10 miles at a stretch and for some, health means walking a few steps. For some Quality Software means bug free software and for some Quality  may be different. For some Service means devlierying something in a day and for some , service means delivering something in a week. So, the subjective terms can only be quantified by you. As such, the minimum knowledge can only be quantified by you.

I wish you atleast read a couple of books a year (set this your minimum).

Ok, lets answer the question. Should I care. Take a look at this program.

using System;
class InternalWorking
{
     static void Main()
     {
          int i = 2;
         for (int j= 0;j<10;j++)
        {
            Console.WriteLine(” {0} * {0} = {1}”,i, i*=i);
        }
   }
}

If you compile and run the above program, you will see the following output

2 * 2 = 4
4 * 4 = 16 
16 * 16 = 256 
256 * 256 = 65536 
65536 * 65536 = 0 
0 * 0 = 0 
0 * 0 = 0 
0 * 0 = 0 
0 * 0 = 0 
0 * 0 = 0

Why is that “i” became zero after some point of time.

Now, I am going to initialize i to 3 in the above program and see what happens using

using System; 
class InternalWorking 

     static void Main()
    {
         int i = 3;
         for(int j= 0;j<10;j++)
         {
             Console.WriteLine(” {0} * {0} = {1}”,i, i*=i);
          }
      }
}

The output is as follows  
3 * 3 = 9 
9 * 9 = 81 
81 * 81 = 6561 
6561 * 6561 = 43046721 
43046721 * 43046721 = -501334399 
-501334399 * -501334399 = 2038349057 
2038349057 * 2038349057 = -1970898431 
-1970898431 * -1970898431 = 120648705 
120648705 * 120648705 = 1995565057 
1995565057 * 1995565057 = -1876701183

Oops.. why is that results are getting negative after some point of time. Well, definitely my computer is not mis-behavinig.

Ok.. here goes the explanation of why it gets to negative after some point of time. All integers in C# occupy 32 bits. Of this, Most Signigicant Digit (MSB) is Sign bit. The sign bit for positive numbers is 0 and negative numbers, its 1. So effectively 31 bits are used to represent the number. In the above program, we get the correct results as long as the result can be represented with 31 bits. When the numebr gets larger, it takes up additional bits. We know int uses only 32 bits and so, the remaining bits are ignored. The above program, after a few iterations, sets the 32nd bit ( which is sign bit). Thus it becomes negative. It gets into a kind of circular loop.

May be the following code will help you understand more 

using System;
class zip
{
     static void Main()
     {
          int iMaxValue= Int32.MaxValue, iMinValue = Int32.MinValue;
          Console.WriteLine(” Int Max Value is {0} and Int Min Value is {1} “, iMaxValue ,iMinValue);
          iMaxValue++;
          iMinValue –;
          Console.WriteLine(” Incremented Int Max Value is  {0} and Decremented Int Min Value is {1}  “, iMaxValue , iMinValue);
          Console.WriteLine(“Is Incremented Int Max Value equals Int MinValue? (True/False) : {0}”, iMaxValue == Int32.MinValue  );
          Console.WriteLine(“Is Decremented Int Min Value equals Int MaxValue? (True/False) : {0}”, iMinValue == Int32.MaxValue  );
     }
}

The output is 

Int Max Value is 2147483647 and Int Min Value is -2147483648
Incremented Int Max Value is  -2147483648 and Decremented Int Min Value is 2147483647  
Is Incremented Int Max Value equals Int MinValue? (True/False) : True
Is Decremented Int Min Value equals Int MaxValue? (True/False) : True

Negative numbers are represented using 2s complement. Well, I am not going to get into the details of 2s complement here. Do write your feedback..

Got introduced to Linux..

On 22nd Jul 2006, I attended my very first meeting in  ILUGC – Indian Linux Users Group Chennai.   It was an introduction to Linux for beginers and first time users.  The session was given by Raman and they showed how to install Linux from scratch.  Linux has gone a long way since I used it  about 5 years back. I remember sitting with Sys Admin in my previous company and trying to install Linux and getting Oracle on it.  I remember getting help from Azad on this.   Today they showed the desktop version of Linux installation.

The linux distro now has everthing in it.  The look and feel of user interface is similar to that of Windows, the open office is similar to Microsoft Office.  From open office you can even open an ms word file.   Great.

Raman spoke about FOSS –  Free Open Source Software.  Off all the advantages he mentioned about FOSS, the following got my attention

  1. FOSS is about Freedom – Free as in Free – Speech and NOT Free as in Free-lunch.   Its not about cost, its about Freedom.
  2.  Cost of commercial software.   This is the one which I am experiencing in my real life.  Being in M$ for about 7 years, every time a new tech is released, I need to depend on my Employeer to get the license to learn it.   That means, I cannot do anything in  my  home to try out something..  But on the other hand, there are quite a lot of things happening in JAVA world.  Like ANT, JUNIT, Curise Control etc.  Though alternatives like NANT, NUNIT  are available,    most companies use MS Visual Studio in their development environment (that’s not free)…  May be I am not able to put it correctly, you understand what I am saying
  3. A few years back,  I read an article that Chineese Govt is standardising on Linux for govt offices.. I then thought it was a bad idea.. but now I feel how important it is.  Most of the govt departments in Tamil Nadu are getting computerized and the cost associated with commericial software is going up. They are now standardizing on Open office.  True, govt saves a lot of money in it.

A great introduction.  Next week, they have a session on basic commands.   I have to get a computer and have linux set up.   But, one of my goal is to go to ……  But its not getting materialized.. I need to do somehting about my learning and moving to Linux and open source.

Thank you – For pointing that I don’t have super ……

Though I can fill those blanks, I am deliberately leaving them blank for a reason which I don’t want to express.

Well, the main reason for me taking up an offer with my current employer four and a half years before is because, I was promised that I will be sent Onsite ( the word – Onsite mesmerized me).  Many things happened – the project for which I was selected didn’t get through and so am forefully pushed in to project that uses technology which is not current.   Though the technology was not current, I learnt a lot of things in this company.  I learnt about Data Modelling ,  got exposed to DBA activities,  got exposed to the workings of a department and above all its my first coroprate experience..  So good so far…

Over the period of four and a half years,  I failed to keep myself current on the technology. I wouldn’t say that I didn’t read/study new technology.  Infact I learnt but I didn’t put them in to use (because of the project constratint).  Me keeping myself not updated on technology let to many dis-appointing moments.   The very first being – my manager who so far claimed that I was doing an excellent job, told me a couple of days before that I don’t have any of that super thing on my skillset ( I don’t know what the super thing he has.. anyway that’s none of my business.  He has the authority called MANAGER and he can talk right at my face, but I cannot do that – not a computer logic).  I was dis-appointed to the core. But then he is true. Introspecting where things went wrong, I found that my laziness and procastination were the reasons.   So many times I planned for studying ( buy books.. believe me I have enough books on the technology on which I wish to equip and they sleep well in my book shelf), but all the times I failed to execute the plan.  But now, after this incident, something has went into my head and heart (something more emontional).  Now, I have a solid plan to get myself equiped.

I did a search on web and I found that there are many people who has been in this situation and many have overcome that.  I get to read their blogs, read their articles and get valuable information from them.  Thanks for all of them. 

I am confident that I can get back and add that Super thing back into me.  Thanks for stopping me and saying that you don’t have that super thing in your ….

Why I write this in an open Blog.. I don’t know.. After all this is a place where I can  my thoughts rather spill my random thoughts….