Saturday, 16 June 2012

Sir Asdullah Bhatti The 1st lecture


LECTURE#01
INTRODUCTION TO COMPUTER PROGRAMMING

SUMMARY
·         What is computer programming?
·         Why computer programming is important?
·         What to keep in mind while programming
·         Types of programs
·         How program executes inside microprocessor
·         Need of language translator in computer programming


What is computer programming?
Computer programming is a way to talk to computer, tell the computer what to do? In broader term program is a sequence of steps to solve a particular problem.

Why programming is important?
The question most of the people ask is why we should learn to program when there are so many software’s available for us to do work. So learning program is not just to get the work from computer but it enhance the thinking capability of your mind, your problem solving skills are increased, after this you will see the problem from different angles and in different perspectives. Another reason is that general purpose software is not as useful as the custom one.    


What to keep in mind while programming?

1.       Paying attention to the detail of problem: A good programmer always understand the problem carefully and analyze it from all aspects
2.        Thinking about reusability: whenever you are writing program, always keep in mind that it could be reuse at some other time, also try to write in a way that it can be used to solve some other related problem.
3.       Understand the fact that computers are stupid: Computers are incredibly stupid. They do exactly what you tell them to do: no more no less, -- unlike human beings. Computers can’t think by themselves, and they also don’t have a common sense like human.  For example if someone asking you “what is time?”, “Time Please>” or just “Time?” You understand any way that he is asking current time but computer is instruction dependent, it will tell you the time just in a way you programmed it.

Types of programs

1.       System programs: System software/program interacts directly with hardware resources of computer and helps other programs to function properly simple say it communicates with computer hardware to make them available for other programs. Operating system is best example of system software
2.        Application Programs: Programs/group of programs designed for end users for example a program for accounting, payroll, word processing (Microsoft word) 

 



How program executes inside micro processor?
As we know that every program is stored in hard drive, when we execute program its copy is sent to RAM – random access memory and then micro processor fetch the instruction from RAM because it’s much faster than hard drive. The following picture depict the strategy of program execution


















Need of language translator in computer programming
It’s a fact that computer can’t understand our language or the code written in high level language so a language translator Is used which converts your programming code into computers language (Binary Language) so that computer can execute the instructions that you have programmed.  So in simple words we can say that the language translator is one type of system software that translates your program source code that’s written in high level language into the machine language that’s executable by microprocessor.












No comments:

Post a Comment