What is computer programming

What is Computer Programming? An Overview

Computer programming is the process of giving instructions to a computer to perform a specific task. It is considered to be both science and art by many people. It is a science because a programmer should have the knowledge of how to code and it is also an art form because a programmer has to use creativity at the same time.

A computer has an exceptional ability to perform billions of calculations within seconds. Cool right! But apart from this, a computer falls behind us humans in one factor, and that is – intelligence! Yes, a computer is not an intelligent machine. It does not have its own intelligence. Like us humans, a computer cannot think and cannot make decisions on its own. This is why every time a computer is about to perform a task, it needs some sort of instructions. A set of these instructions is technically called a computer program which is in the form of some code. A computer needs to be programmed for every single task that it is expected to perform.

Computer programs are written using programming languages. There are hundreds of different programming languages. Some of the most popular programming languages include C, C++, Java, C# (abbreviated as C sharp), PHP, JavaScript, and Python. There are different types of programming languages as well. For eg. machine language, assembly language, high-level language, low-level language, etc.

Every programming language comes up with a set of predefined keywords and has a particular syntax. The end goal of computer programming is to create some sort of software that could be anything from an application software  (like Photoshop), a system software (like an operating system), a website, an Android app, or even another programming language.

A programming language has a particular scope of implementation. What I mean by this is there are some languages that are specifically designed to create a particular application, while some of them can be used to create a number of different applications. For example, to create Android apps, Java language is used, to create IOS apps, swift language is used, while Python can be used to create websites, application software, games, and many other types of applications.

Note:- A bunch of different programs and scripts form a whole application.

The process of programming involves the following steps

  • Understanding the problem
  • Finding out the solution.
  • Write the solution in the form of code.
  • Testing the code for any errors (defects).

How does a computer understand your code?

Imagine that you know only ‘English’ and you need to talk to a person who only knows ‘Chinese’. How would you communicate with that person? You would surely need a third person who knows both English and Chinese and who would convert your messages to the Chinese person and his messages to your language (i.e., English).

In the same way, the programming process works –

A computer understands only a single language, that is – Binary language. Everything it understands is in the form of 0 and 1. For example, a computer would understand the word ‘Hi’ in the form 01001000 01101001. This is like the binary number system in mathematics. In mathematics, the number 4 (which is decimal number system form) is equivalent to 100 (Binary number form), number 5 is equivalent to 101, and so on.

The program written in a language first needs to be converted into machine language (The language that the computer understands) so that the computer would understand it. This is done by a compiler or an interpreter (Depending upon whether the language is a compiled or an interpreted language). A compiler or an interpreter is simply a type of software that converts code written in one language to another language. If there is any mistake in the syntax of the language or if the language is not used properly, the compiler or interpreter generates an error. If the program is fine, the compiler processes the code and generates a particular output.

Note: There are however some differences between a compiler and an interpreter.

Look at the following C++ program –

#include <iostream>
using namespace std;
int main()
{
    cout<<"Hello World"
    return 0;
}

When the above program is executed, the following error will be generated-

expected ‘;’ before ‘return’

Because every statement in C++ should end with a semicolon (;), and as there is no semicolon at the end of line number 5, the C++ compiler would generate an error.

What does a programmer do?

A Computer programmer (often called a ‘programmer or coder) is a person who writes computer programs, which ultimately form a software application. The term programmer is used for all those people who work in the fields of software development, website development, mobile application development, game development, software analysis, and embedded firmware development. In general, a computer programmer is a person who writes instructions for a computer in the form of code.

The primary job of a programmer is to write computer programs or scripts. If the program does not work properly, the programmer does debugging (a term used widely in the programming world which means to find out errors). A programmer also makes documentation of the projects.

Types of computer programmers

  • Software developers: A software developer is someone who creates, tests, maintains, and updates computer programs. They usually have a Bachelor’s degree in computer science or related field. They must also have knowledge of multiple programming languages and be able to design and build executable programs. Software developers work for companies that make products for the consumer market as well as businesses that make products for the business market.
  • Web Developers: Web developers are the people who design, build, and maintain applications that run on the web. They have a wide range of skills, from coding to web design and user interface development. Web developers typically have a degree in computer science or another related field. Many web developers start their careers as software engineers, but they can also be found working as web designers or website owners.
  • Database programmers: Database programmers typically work for companies that operate large databases. They are responsible for creating, modifying, and maintaining the database. Database programming is a highly specialized field, and most database programmers have degrees in mathematics or computer science.
  • Computer Hardware Programmers: Computer hardware programmers are essential to the functioning of computers. They write code that tells a computer what to do. Hardware programmers work with microchips, circuit boards, and other electronic components. Hardware programming is a difficult and time-consuming process. It takes knowledge of microprocessor architecture, assembly language, and software design principles. Hardware programmers must also be familiar with computer systems, software development tools, and programming languages. Hardware programming can be a lucrative career choice. However, it requires years of experience and proficiency in multiple languages.

Why should you learn to program?

  • Learning Programming would help you to understand how computers work in a better and deeper way.
  • Programming helps you to acquire the “can do” attitude.
  • It can help you to be a better decision-maker and a problem-solver.

Some common terms used in programming –

  • Algorithm: An algorithm is a set of steps taken to solve a particular problem. The term ‘algorithm’ is both used in mathematics and computer science and is derived from the name of a mathematician Mohammed ibn-Musa al-Khwarizmi.
  • Debugging: It is the process of finding defects (technically called ‘errors’) within a computer program. Debugging is an integral part of the programming process.
  • Code: The term code (also called source code) is used for a set of instructions written using a programming language. It is the text that is written to create a program or application. It is made up of individual instructions that tell the computer what to do.
  • Bug: In the programming world, the term ‘Bug’ is used to denote the errors or defects within a computer program. Code having a bug sometimes ends up with a wrong output or sometimes the output would not be generated at all.
  • Branching statement: A command that allows the programmer to choose between two possible paths in a program.
  • Program or application: A program is a set of instructions that tells the computer what to do. It can be stored on a physical file on a computer, or it can exist as part of the operating system (OS).
  • CLI: Programs can be exported for use by other programs or used directly in a command line interface (CLI).
  • Script: A script is a collection of programming code that can be run as a standalone application or embedded into another application.
  • Module: A module is a group of related scripts that can be loaded and unloaded as needed from memory or storage.

Conclusion

In conclusion, computer programming is an essential skill for any modern professional. With the right tools and instruction, anyone can learn the basics of coding and start building their own programs. Whether you’re a student looking to get ahead in your field, or an employee who needs to stay current with new technologies, learning to code is a great way to achieve your goals.