Things to know before learning your first programming language
Tags: javascript, webdev, beginners, codenewbie
Published: 2019-08-04 17:30:11


## What is a Programming Language and why do we need one??

Programming languages are what we use to tell computers what to do.

![Different Languages For Human And System](https://miro.medium.com/max/496/0*xWveD227uuLHCZCZ.png)

Programming languages are a means through which we convey our messages to the electrical systems. It can be a computer, an electronic washing machine, your mobile phones or any electrical device you use.

> In Simple Words, Programming Language acts as a bridge Between User and System to communicate.

Do You Know Binary Code of 2 is 10? These represent two states: on (1)and off (0). You Can Convert Your Text From [here](https://codebeautify.org/text-to-binary)

Computers talk to one another in binary, which looks like this:

`0011101010101111000111`

Imagine Whats Happen if no Programming Language in the market   
We have to tell a computer to create a red box on the screen for a website.

In English, we say:

**Create a box.**

Sure, ones with straight edges, curved edges?

**Make it red.**

Wait to make the edges red or the whole thing red?

**Make it fill the screen.**

What about the screen?

**Screen, the thing I’m looking at.**

What are you looking at?

**Ohh, forget it.**

See the problem now?

The system is not designed to understand Human Language. To Resolve that, We need a Language that communicates with System. So whats does Programming Language do. A programming language allows us to give instructions to a computer in a language the computer understands.

![Syntax (Set Of Rules)](https://miro.medium.com/max/700/0*wCSm1ixAiZThnV37)

> Program is a Set Of instruction that tell the computer what tasks to perform.  The rules for writing a format of code and combinations of the set of instructions is called Syntax.

The syntax is similar to Spelling, tense, and punctuation in English to write a sentence.

## Types Of Programming Languages

There are 2 Type of Programming Languages:-

## 1. High-Level Language   
## 2. Low-Level Language

![](https://miro.medium.com/max/602/1*SM50SlPOx2byQEuD7C5SMA.jpeg)

**_High-level programming languages_** are easily understandable by a human. It was created by developers so that programmers don’t face any difficulty to communicate with a System. Example:- JS, Python🐍 , and so more.

**_Low-level languages_** are designed to deal with the hardware of a computer directly. Low-level languages are closer to the system 💻.

The computer needs a way to understand our program into Binary Code That’s System Understand. To do this, we’ll need a translator.

## Translator

A translator is a program that converts your code to the machine language.

![How Does Translator work?](https://miro.medium.com/max/700/0*Z3NevxhNIHwBlXEG)

### Different type of translators

The different kinds of translators are as follows:

- **_Compilers_**:- It translates the entire program and translates code into Binary code. It generates the error message only after scanning the whole program. Due to this, debugging is comparatively hard, and it takes more time to translate the code. Programming language like C, C++ use compilers.

- **_Interpreter_**:- It translates code line-By-line. It continuously translates the code until the first error is met. Due to Translate code, line-by-line debugging is easy. It takes less time to convert the code. Programming language like Js, Python, Ruby use interpreters.

## Different Way of Writing the Hello World In Programming Language

1. Java

    
```java 
public class Hello {  
  	public static void main(String []args) {  
 		System.out.println("Hello World");  
  	}  
 }
```
2. Python
```python
print "hello world"
```

3. JavaScript

```javascript
Console.log('hello world');
```

4. C++
```cpp
#include <iostream> main()  
{  
std::cout << "Hello, World.";  
}
```
5. Bash
```bash
#!/bin/sh  
 echo "Hello World"
```
6. PHP
```php
<?php echo “Hello World”; ?>;
```
***
Thank you so much for reading my article on **Things to know before starting your first programming language!.** Be sure to follow me on [Twitter](https://twitter.com/prateek_codes) for lots of tweets about tech. Feel free to comment below or tweet me with any questions you may have.