Saturday, July 21, 2012

Lecture 1:- What is Programming

Welcome to Introduction to programming series. In this program I am going to teach you computer programming. We'll talk about the concepts (Basic to advance). We'll use C++ to explain programming concepts and to give examples. But these concepts are generic and can be implemented or used with any language. So should we start now????????

So guys what is the programming. First of all this is very basic question that we will answer. Programming is telling the computer what to do. We perform some task using computer and through programming we ask computer that perform this task for us. We tell computer by using a specific language (Programming Language), which computer understands. We write statements of that language and collection of that statements is called program. But this isn't precise definition of the program.

"Program is a precise sequence of steps to perform a particular task".

So here we will look at few things in little detail. "Precise sequence" means we have to do one task first and then do second task. Their order cannot be interchanged. So all steps must be performed in a sequence. By changing this sequence we cannot achieve the desired output.

Why we learn programming :- Now some people might ask this question. We learn programming to solve real world problems. You can see huge amount of application today that are helping us in almost every field of life. In scientific research, education, office work, medical and many many more field there are computer being used to solve problems and to facilitate us, and inside those computers programs are running. Of course there are pretty nice code generators are available today but they are very generic and cannot provide exactly what e want.

Keep in mind that programming is a creative activity. Its an art, so you must develop your analytic and critical thinking and creativity. When you are writing program, keep following points in mind.

Pay attention to details:- What does this means, you can't be vague. You should be very clear about what you are doing. Keep every aspect in your mind. Don't miss any minute detail or point. You must sure what you are doing. If you are not 100% sure, you can't create.

Computers are stupid:- They do not do anything on their own. They do what we ask them to do. So don't ever suppose "Oh computer will do the rest of things". Computers require exact input every time. They are not like humans where you ask you r friend "give me your pen" or "pen please" or just "pen" and his/her response is always same. This isn't the case with computers.

Re usability:- Its another important aspect in programming. When you program always think about to reduce your effort, time and money. So when write program, write in a way that it can be re used easily (make functions and classes).

Comment the code:- Always comment the code and take notes. Because you will forget your logic after few days or months. In that time you r comments will help you. Otherwise you have understand you code again and this will be time consuming.

No comments:

Post a Comment