Friday, June 14, 2019

Analyzing the word "Programming"




The word programming (Shortened form of Computer Programming) is basically a process which takes the computer problem to an executable solution/program. We can define it in many ways but the simplest definition of a program is “A precise sequence of steps/instructions to solve a particular problem”. “This process of making a program is called Programming”. “A Person who makes a program is called Programmer”. I would like to give you a real-world example to understand this logic.
Suppose you have to go on a picnic. What will be your first step? Obviously, you will program your picnic. You will think about when to go, where to go, what kind of stuff you should take. These are steps in a precise/specific order to solve the problem of “picnic”. The most important thing to remember is the order/sequence of steps. Because you can’t go on a picnic without thinking where you will go. First, you will decide the place and then you will go. So, the order of steps matters.
Being more general, writing the program involves writing steps, procedures which result in Algorithm. So, algorithms are written in specific languages called Programming Languages. There are some examples of programming languages like C, C++, C Sharp, PHP, JAVA, Python, etc. These are High-Level Languages, can be easily understood by humans. First, you have written your program; next, you will debug, compile and test it. There are number of software’s (Programs) are available for debugging, compiling and testing. After the creation of your program; you have to maintain it also.
Debugging is a process through which the bugs/errors in the program are highlighted and resolved. There could be two types of errors in a program. First Syntax error; Second is Logical error. You should not worry about the syntax error because the editor in which you’re creating that program will highlight that errors for you and your program will not compile also. So, you can easily identify the syntax errors in your program. But when there is a logical error in the program occurs, it is difficult to identify that error. These errors can cause serious problems, even crush your program at run time. So, there is ready-made software available to sort out such type of problems. That software called Debugger.
Compiling is a process through which your written source code (high-level language) is converted into machine code (low-level language). The code that is easily understandable by computer is called Machine code. Machine code is not easily understandable by humans and hard to code, so we write a program in high-level languages and compilers/interpreters convert it to machine code to make it executable. The difference between compiler and interpreter is that interpreter process the code line by line; if there is an error in any line, it will stop there but compiler process the whole code at once. The concept of the compiler was first mentioned by Grace Murray Hopper in 1952. She took up the concept of reusable software (compiler) that could convert high-level language code to low language machine code in¬ her paper entitled “The education of a computer”.
At the end, I will mention some rule of thumbs that are learned by programmers.
  • 1. While programming, always keep in mind the consistency.
  • 2. Make your code reusable.
  • 3. Initialize variables before use.
  • 4. Comment your code liberally. Don’t forget to comment your code.
  • 5. When you are done, revise your code, check it and test it. Let your colleagues to test your program.
  • 6. While giving a handle to the user, protect it by checks and tests to ensure correctness and keep data private as far as possible.
  • 7. Make interface of your program user-friendly.
  • 8. Pay attention to detail. It is the most important point to remember. When you’re given a statement problem, analyze it carefully.
  • 9. Program defensively.
Location: Bosan Rd, Officers Colony, Multan, Punjab, Pakistan

0 comments:

Post a Comment