Wednesday, January 12, 2011

Things to keep in mind while upgrading a project

Things to keep in mind while upgrading a project

Upgrading a project has two meanings

1. The project is being upgraded from a previous version of the same programming language to the newer versoin.
2. The project is converted from an older programming language to a different programming language which is new.

This blog is all about the second point. This blog is also applicable if we are converting a project from one programming language to another.

Do not just convert:- The first point to remember if you are converting a project from one programming language to another is that you SHOULD NOT just convert. It is very easy to copy the code from the application, paste it to the IDE of the second language and just convert. But it should be the last thing which is expected from you as a programmer. If you are doing exactly this, you are not a good programmer (in my personal opinion).

First thing that you should keep in your mind when you are converting a project is that, the meaning of the task in your hand is very simple – You are going to write a software which is already written. You can run the old running application and see how it works. But don’t look into the code. Understand the business and follow the style of the new language. Apply whatever framework which is apt for the software, which is applicable to the language.

Reason for my argument for not JUST CONVERT:- The way a particular application can be written in two different programming language will be in two different ways. I will state one simple example –

Consider you are converting an application written ages back in C++ to .NET. Also consider that no table in the database that the application has a primary key (WTF?). If you want to do an update operation in the database, you will have inbuilt method called Post() which the framework provides you which handles the update process smoothly so that you may not want to worry about it, in C++. But if you are using .NET, you will have to write query to update – a query which takes care of everything that no duplication will occur and you need to take care of a long list of columns to make a row unique. If the update process consists of multiple rows, you might find yourself in trouble if you are using .NET and dealing with multiple columns to find a unique row. If anything goes wrong, the DB won’t allow you to save the info and there you can find yourself in trouble.

The above stated is just a single example. Different operations handled in an older programming language might not be safe to apply in the same way in our current language. The new language will have greater security measures to ensure that nothing goes wrong and to keep everything in control.

Things to communicate to the client:- Identify the areas in the existing code base which can be considered as obsolete. An example being – the above mentioned case of not having a primary key. In this case, a change in the DB design should be there. Identify those areas. Suggest new implementations. Convince the client that this is the right way to do things, now. Make the application most robust in every sense.

Time frame calculation:- Also the time frame calculation to complete this type of project is very crucial. It is utterly absurd to calculate the time based on the assumption that we have a code base, whatever be the programming language. It is always better to calculate the time frame by treating the application as a new one. In my personal opinion, calculate the time based on the requirements, and design and the initial stuffs, solely. Never ever assume that this is an existing application and a code base is also there.
Happy Coding.
  

Monday, January 3, 2011

Being Empathetic to others - What religions and science has to say...

Why should we help others? Is it mandatory that we need to help the needy? Well, the answer is, even if you don’t do this, nobody will kill you. But think deeply. I am presenting here my thought in this topic. There are a bunch of religions all over the world. When considering all these religions in a broader perspective, as all speakers around the world and religious leaders say all these leads to the same point – The eternal truth. Being religious is not bad. However, being religious to that point which blurs our vision from having a clear picture of what happens around us is dangerous. In my opinion, there will be no scripture in this world, which does not mention about being empathetic to our fellow beings.



In bible, Jesus Christ urges everyone to love every other person the same way you love yourself. We all love our self the most dearly. We will eat the food we like the most, buy clothes we like, and will live our life the way we like – mostly, in the most beautiful way. We all will try to make our life as smooth and happy as possible. Why cant we do this to others as well? Why cant we help the needy, feed those who are hungry? What will we do if God himself comes to us and ask us to give him some food and clothe? Wont we provide him with what he want? I am sure that we all will try our level best to make him happy.


I know my above paragraph is a cliché one – All might have read this or heard this from various speakers who come across our life.



But when I thought about various incidents that mentioned in bible, one incident caught my attention – God created Man in his own resemblance. Now the question is why it is mentioned like that in the bible? Does God really have a shape like ours? Is God really a He or a She? From a religious perspective, God is a He if we consider Christianity or Islam and God can be He or She if we consider Hinduism. Now the question comes again, why did it mentioned like that in bible? Now try to combine the two statements from bible – “Love every other person the same way you love yourself” and “God created Man in his own resemblance”. Doesn’t it mean that God is urging us to find God in our fellow beings? This gives other statements from bible a perfect sense –“ If you do anything to them (poor people), you are doing it to me”, “If you cant love your brother who is with you and visible to you, then how can you love God, whom you cannot see?”



In Hindu mythology also, there are two statements – “Aham Brahmasmi” and Tathwamasi” which means that “God is in you” when you are trying to find him elsewhere. Doesn’t this also agree with the point that we should find God in ourselves and our fellow beings and love and help others like we love our self?



Here we can find that various religions – even though has different mode of worshipping and all – aims at the well being of the entire humanity.



Now take the case of Science. What does science has to say in this? The most widely accepted theory about the origin of universe is “The Big Bang Theory”. According to that, this universe is formed as a result of a big bang. So before Big Bang, what might have been the state? Some scientists say a chain of Big Bangs have happened and some say a very dense form of energy was there. Most of the scientists agrees with the intervention of a force – something external, to trigger these. And they have given that force or that source of energy a name – God. So we can say, according to science, God is a source of energy which fills the entire universe and anything beyond that also, if there is any. String theory is the most modern theory which explains the universe and its origin. As you all know, every matter is made up of molecules, which in turn by atoms, which consists of electrons and protons. If we go further inside, we can find particles called quarks. According to String theory, if we go deeper level into the quarks, we can find strings of energy vibrating in certain frequencies inside it. That means we can see God (energy, according to science), deep inside us. When I discussed this with one of my friends, he told me the beauty is that the further understand science, the greater we understand God. We can find his signature in each and everything around us. That means God is in us and in our fellow beings.



This is the real beauty where we can see religion and science agrees upon the concept of God being inside us. So treating our fellow beings with compassion is the great thing that we can do. A smile, a consolation, a helping hand to the needy will make small changes. And don’t forget the saying – “Little things make perfection. But perfection is not a little thing”.