What is Programming?
Programming is the ability to find solution to real world problems using the power of technology and knowledge of certain softwares. Using programming, we can bring about great changes in the lives of people around us. Programming ranges from doing some serious things like robotic surgery to fun things like playing candy crush or any other game you want to play. Whether we know it or not, our entire lives are to a large extent influenced by thousands of programs. For example, you go to a supermarket, order things and stand in the queue for paying the bill amount, the shop assistant, uses a program available in the system, scans the product, calculates the bill amount and the exact change. Everything is done through a program, available in the system.
Billing program used in a super market..Now, when we decide to go to a movie or travel somewhere outside, they do all the booking online, where some program is used to get the things done. It is programming all the way, in our lives. We are moving to a world of driverless cars, and drones delivering pizzas. And the more we think about it, there is more programming and more programs to our rescue.
So, let us understand, what a program does?. A program works with some data, which is usually called the input and transforms it into some meaningful information, which is called the output. The input data is processed and then generated as output. So, some form of processing happens on the input data, to generate the output or result.
STEPS IN WRITING A PROGRAM
1. Understand the specific reason to write a program So, before we embark on our programming journey, we should understand what is the reason behind writing a program. Is it to calculate the area of a rectangle, or convert fahrenheit to celsius, or place a rocket at a particular orbit, or predict the weather for a particular day. Understand clearly the reason for writing the program. There should not be any ambiguity at all.
2. Know what are the inputs I have already told you that, every program takes some input, processes the input and produces some output. Understand what the inputs are for the program you are writing. For example, if a program is written to calculate the area of a rectangle, length and breadth would be the input. If it is a program inside a robotic vacuum cleaner, it could be the input given from the sensors about the presence of some dirt in the vicinity. So, depending on how complex the program is, the inputs also could differ.
3. Identify the process The process is used to convert the input to output in a program. Some times, the process could be very simple, as simple as just using a formula to calculate the answer. For example, we write a program to calculate the area of a rectangle. Multiplying length and breadth would give me the area of the rectangle, and that’s all is the process. But, if I want to write a computer program, which has to play Jeopardy, against a human opponent, then the process would not be that simple. So, depending on the need of the question, the process to convert input data to output information would differ. When you decide to write a program, be clear on what is the process.Be very very clear about that. Crystal clear!!!.
4. Know what is the output Last but not the least, is, you should know what is the output of your program. The output data which is generated or calculated or predicted needs to be presented to the user in a very user friendly manner, which is clear and makes sense. So, it is never about getting the correct output, it is always about presenting it well to the user.
5. Example So, let us take a simple example and try to identify the input, process and output for the same. For example, if the question is to write a program to find the area of a rectangle.
Input – Length and breadth
Process – Area = length X breadth
Output – Print Area
May be another example is to calculate the simple interest using a program
Input – Principal, rate, period
Process – (Principal X rate X period)/100
Output – Print Principal
So, I think all of you have would have got some idea of programming and how to identify input, process and output before starting to writing any program.


Comments
Post a Comment