Approachable | Dedicated | Accountable | Professional | Trustworthy
What is Coding?
Coding is the process or activity of writing computer programs. Coding, in simpler terms, means feeding our commands in the computer in a language the computer understands, so that the computer can carry out the said command, and perform the task.
What is Code?
Computer code is a set of rules or instructions. It is made up of words and numbers and when you put them in the right order it will tell your computer what you want it to do. You can program lots of things with code.
What is a Program?
Programs are the building blocks of computers as they’re responsible for every operation that a computer performs. It’s the set of instructions that are created during the programming process of software development. Without programs computers are useless.
Programs create software that an average user can recognize as a website or an application. When a program goes through the process of testing and debugging, it then becomes available to a user in the form of packaged software that can easily be installed on a device.
What is a Programming Language?
Most programming languages work in the same way. You start by writing code to tell it what you want to do, then the code is compiled and turned into machine code – a language a computer understands. Finally, the computer executes the code and responds to the initial command.
- You write code to tell it what to do: print (“Hello, world”). (This varies according to the coding language)
- The code is compiled, which turns it into machine code the computer can understand.
- The computer executes the code, and writes “Hello, world” back to us.
How does Coding work?
There are hundreds of different programming languages which can seem confusing, but they all work in the same way. You type in what you want it to do, the compiler turns it into language the computer understands, then the computer does it, which is called executing the code in programming speak.
Coding is the process of using a programming language to get a computer to behave how you want it to. In Python, every line of code tells the computer to do something, and a document full of lines of code is called a script.
Each script is designed to carry out a job. This job might be to take an image and change its size. It might play a certain sound or piece of music. When you click “like” on someone’s post on social media, a script is what makes it happen.
Unlike people, computers will do exactly what you tell them to. This might sound great, but it can cause problems. If you tell a computer to start counting upwards and don’t tell it to stop, it’ll keep counting forever! This is known as an infinite loop and can cause your computer to crash or slow down. Being a good programmer is all about knowing how to tell a computer to act.
How does Code Become a Program?
Computers don’t actually understand the phrase “Hello, world”, and it doesn’t know how to display it onscreen until it is translated into a series of 0’s and 1’s- the language that it can understand.
For this to happen, a number of things must take place:
- The source code is translated into assembly language.
- The assembly code is translated into machine language.
- The machine language is directly executed as binary code.
What Happens When You Run a Program?
The coding language first must translate its source code into assembly language, a super low-level language that uses words and numbers to represent binary patterns. Depending on the language, this can be done with an interpreter or with a compiler. Interpreters translate the program line-by-line, whereas a compiler translates the whole program at once. The coding language then sends off the assembly code to the computer’s assembler, which converts it into the machine language that the computer can understand and execute directly as binary code.
The computer then executes the original commands sent, this is known as the resulting program. To test the success of your code, multiple checks can be run. Test the basic functionality of your code; do all the buttons work? Can text be entered into all the fields without the software crashing? If the above passes the checks, the code is ready to be used. Alternatively, a debugging tool can be used to identify problem areas. This is a computer program used to identify warnings and errors in the code.