You might have always wanted to learn coding (and be a hacker :p). In this post, I am going to give a very generalized idea of coding basics.

We will learn about all the programming terms, functions etc in a very basic level, irrespective of any computer language.

What is coding?

Code is a set of instructions given to the computer to perform a certain task, in a desired fashion, ie. not only do a coder specifies the job but also the route to be followed to complete the job, successfully.

But to do so, we need a language to speak to the computer- The Computer Language.

So, what is computer language? 

Like any other language, computer language is a way to communicate, with machines in this case. Technically, they are a set of codes assigned to instruct certain operations to the machine/computer. This set may vary form time to time and need to need, which  gives rise to different programming languages.In 1957, the first of the major languages appeared in the form of FORTRAN . Now, we have a bunch – BASIC, C, C#, C++, Java, Advanced Java, python (2 & 3), Ruby, HTML, CSS etc. Each is used for specific purposes, some are old and replaced, while others are used extensively. For example, Java is used as the major programming language Mobile app development, or, HTML is used as the basic building block of all websites!

{NUTSHELL} FORTRAN : Its name stands for Formula Translating system. The language was designed at IBM for scientific computing. The components were very simple, and provided the programmer with low-level access to the computers innards.

Now, there was a problem. Computers cannot understand English.So, we needed to convert this codes to a language computer understands!

So, comes two new terms: High Level Language(HLL) and Machine Level Language (MLL). HLL is the complicated coding we write. MLL is the simplified code that machine/computer understands. MLL consists of 0 and 1. Computer only understands Yes(1) and No(0) ( there is no ‘maybe’ for machines 🙂 )

Now, who converts this HLL to MLL?

A  compiler. It is a feature of the language it self. A compiler is a computer program (or a set of programs) that transforms source code ( in HLL) written in a programming language (the source language) into a Lower Level computer language having a binary form known as Object code. The mechanism varies from language to language, and in some cases may also involve another step, like the Interpreter in Java.

This ends with the underlying features. If you still have any question, on anything, leave it in the comment, I will try my best to answer that .

Now, lets come across to some terms, which are often used by programmers, which you may or may not have heard:

  • Variables : A variable is anything that represents a set of data. Like a name represents you, a variable sets of space in memory of the computer, that stores data.Now look at this proper definition: In computer programming, a variable or scalar is a storage location paired with an associated symbolic name (an identifier), which contains some known or unknown quantity of information referred to as a value. The variable name is the usual way to reference the stored value; this separation of name and content allows the name to be used independently of the exact information it represents. The identifier in computer source code can be bound to a value during run time, and the value of the variable may thus change during the course of program execution. => Wikipedia describes Variable ( in Computer sense) like that.
  • Dtatypes : A datatype is the identifier of a variable, like whether a variable stores numbers or words or simple letters, etc.Its like the your Surname which shows whether you are Hindu, Muslim or Christian, etc. As per Wikipedia :In computer science and computer programming, a data type or simply type is a classification identifying one of various types of data, such as real, integer or Boolean, that determines the possible values for that type, the operations that can be done on values of that type, the meaning of the data, and the way values of that type can be stored.
  • Functions/ Methods : A Function or a Method is a block of code that performs a specific function. You may think a code does all, but the thing is for the sake of simplecity, we break a 10 page program into say half a page blocks. This helps in two of the most important was- 1) Gives reuse-ability of code ie. we can call a certain block of code over and over again through out the program, saves time and energy of the coder, and 2) error in a block is easily spotted that reviewing the whole 10 page code! Functions make the code like a Football team, where each block is like a player, but run together to perform as a team. Wikipedia link.
  • Loops : A  loop is a block of code that helps in constant repetition of another block of code. say add 50000 to 2,00,000,  50 times ( without using multiplication), we use loops. Wikipedia describes Looks in Wiki way:A loop is a sequence of statements which is specified once but which may be carried out several times in succession. The code “inside” the loop (the body of the loop, shown below as xxx) is obeyed a specified number of times, or once for each of a collection of items, or until some condition is met, or indefinitely.

With this, I am left with nothing in mind that needs to be discussed here. If you have any idea or have any problem with anything, please let me know in the comments. Further details of their use will be clear when I start posting on specific languages, like Python, C++ or Java.


Happy Coding!