Codementor Events

What Is programming and How Does it work ?

Published Jun 21, 2021Last updated Jun 30, 2021
What Is programming and How Does it work ?

So how does programming works ? The short answer is that writing a code that tells computer what to do, but it's not simple as that.

Here is the longest answer šŸ˜ƒ
"A computer programming, known as a Software is made up of ones and zeors this is known as Binary and it is the only thing that computer understands".

Writing the Binary yourself would be slow,and take way too long.Instead we will use something called source code. Source code is the instructions to the computer that is meant to be human readable with a little practice Source code can be written in one of many different programing languages.

Hereā€™s how it work. You first write out your program. But a computer canā€™t read it yet. So,in order to run your program you first need to pass it through this special program called the complier. Then, pops out a new version of your program that can be read only by a computer.
So there are two versions of your program the one your wrote but a computer canā€™t read, and the magically generated one that a computer can read. Itā€™s a complex machine that bridges the gap between human readable code and computer-readable code.

Here it is very simple program written in a programming language called javaScript.
Capture1.PNG

img-1: *Simple Banking Program SoruceCode/File in JavaScript

This program simply displays the account balance to the computer screen.In orders for the computer to actually run the program the source code must be turned into binary. This process is called compiling.Once we have our ones and zeros the computer can than run the program. If there is any mistakes in the source code such as misspelled word or missed punctuation mark the compile will fail and you wonā€™t be able to run the software. Simple programs can be written by on one developer in a reasonable amount of time.
However, professional software may involve hundreds of developers and take a years to complete. A large software project, would be split up into hundreds of even thousands of files.

Capture1.PNG

img-2: complier convert SourceCode/file into binary formate(0 and 1).

All the source code for the software is stored on a server. Each developers stores a copy of these files on their machine. They can then make changes to one or more files and then submit those changes to the server when they are ready.
The server stores a detailed list of what files were changed, what those changes were, and who submitted it. If at any time the program gets into a bad state the developers can undo the changes until the program is working correctly again.

3d_computer_network_connection_picture_8_168628.jpg

img-3: request and response to the server

Software developer try hard, but there are always a few problems with the code. We call these problems bugs. Even after a piece of software is released to the public the software developers must continue to fix bugs and further improve the software. This is why software has update or new version that come out periodically.

Software can be created in two different ways

  1. The most common is proprietary.
    The software is owned by a person or company and sold to make money. The source code is not released to the public only the finished product is.

  2. The second approach is called open source code. This usually means the program is free and that anyone can get access to the source code.You might be surprised that many of the programs you already use are also open source.Many times the developers are volunteers who are passionate about the software they are creating.

Thankyou for reading šŸ™

Discover and read more posts from Balram Rajput
get started
post commentsBe the first to share your opinion
Show more replies