My feeling is that when we prepare a program, the experience can be just like composing poetry or music; as Andrei Ershov has said, programming can give us both intellectual and emotional satisfaction, because it is a real achievement to master complexity and to establish a system of consistent rules.
Donald Knuth
Everyone can bat, but only a few can get the grace and flare shown by either Brian Lara or Mark Waugh. Ok, wait a sec, you guys must be wondering what cricket has got to do with this. Let me say, it is the crux of what I feel, i.e. batting is an art. Similarly writing a program is not at all an issue, but writing it with style is what is important.
Try the following simple exercise. Think of a simple problem. Choose an appropriate algorithm for it. Choose any programming language you are comfortable with. Write a program using the chosen algorithm. Now, ask a friend of yours to write a program to solve the problem using the same algorithm. Give him the algorithm if need be. Compare your two programs. The chances of the two programs being the same are as likely as a road not being inundated in Bangalore when it rains. (If you don’t know about Bangalore, then you can actually count the roads that are not inundated using the fingers of out hand, but let me assure you that such roads do exist).
So what do I wish to put forth with the above exercise? Just the fact that no two persons can write the same program for a given problem. Every program you write says something about you. It contains something that is unique to you. You can consider it as a form of your signature, your style. The way you name your variables, the structure you follow, and sometimes even the way you format your code, everything says something about you. Like everything, practice makes you perfect even in programming. And like everything, it is also very much possible to copy someone’s programming style. But this will be really difficult. (It is as difficult as it is to forge someone’s signature).
Let us now get to the basic question. What is a program? A program is an order you issue to a computer to perform a certain function. This order is given in a manner that is understandable to both the computer and the person who writes. Actually it is better if it can be understood even by other programmers, as after all even others must enjoy the experience you had while programming. Art must be shared to the entire world for it to be appreciated.
Here I wish to share my views and opinions on programming, algorithms and everything related. Everything I write is just my perspective on the above topics.