Different programming languages: what are they for?

Different programming languages: what are they for?

2017 is the year of coding for me! Ready to tackle the wonderful world of programming. Most of you have heard of HTML and maybe of CSS, but what are those languages anyway? What can you do with these different programming languages and when are they used? Well, let me give you some background info on some common and well-known programming languages and a few examples of what they are used for.

Let’s start at the beginning. A little coding FAQ:

  1. What is coding?
    Simply put: coding tells the computer what to do.
  2. What is a coding language?
    A coding language is actually very much like regular language. It is a set of syntax rules that determine how code should be written. It is comparable to grammar and spelling. Because those rules exist in language, we know how to interpret what is being said.
  3. Why are there so many different coding languages?
    Well, there are a lot of different things to program: a website is very different from a computer program. And a computer program is very different from a mobile app. In real life we don’t speak English to someone who only understands Chinese. 

Short introductions to well-known programming languages

HTML – HyperText Markup Language

HTML is the language that is used to build websites. Most of you have heard of it and might have even experienced with it a little bit due to blogging. Plainly said, HTML tells the browser how to display the website. It defines the layout and structure of a website.

Next to creating structure in the document, HTML will also use elements, or building blocks, to build pages. HTML uses tags to create structure in the document (<img> </img>, <body> </body>, or <h1> </h1>). These tags are translated by the browser into visible content, so these tags are never shown in the website.

CSS – Cascading Style Sheet

HTML is often used in combination with CSS. CSS adds style to the HTML structure. CSS tells the browser how HTML elements are shown on the screen. Where HTML is used for the format and structure of the document, CSS is used to describe the presentation (or look and feel /design).

It basically controls the layout. CSS defines fonts, colors, background images and margins among many other things. CSS is usually written in a seperate document from the HTML (best practice). But it can all be defined in one document, as well.

Javascript

The next step is Javacscript. Javascript makes websites interactive and adds extra functionality to web pages. It is able to do so by changing the HTML styles. I will give you an example you can understand. Whenever you scroll over a button or certain text, and it changes colors, then that is Javascript doing its work.

When programming, Javascript is written in the HTML document. This is because Javascript is read by the reader’s browser. And if the reader’s browser is not able to process the Javascript information, it will just not show up without changing the layout of the website.

Why would we use Javascript? Because it makes websites more interactive and responsive, enhancing the user experience. Without Javascript, websites would be plain and static text and images (like in the good old days, the 90’s).

Java

Although the names are alike, Java is different from Javascript. Java can be used to develop desktop and web applications. This programming language runs on a “write once, run anywhere” basis, meaning the code will work on any platform without it having to transform (or translate) the language into the code for the target machine. Or, to make it easy, the output will look the same whether you see it in Firefox or Safari.

And you have probably experienced this in real life. When you visit a website, it sometimes asks you to install or update your Java Plug-in. You need this plug-in for the content to show up the same way it was built in every browser you open. So, do install the update!

Last year, Java was pronounced the most popular coding language with about 9 million developers worldwide. Java is also the main language when it comes to coding Android apps.

Python

Python is the most diverse and most usable programming language. You can use it to program basically….anything. Programmers like Python because it has an easy syntax which makes the code look clean and easy to learn. In general, Python can be used for web development, app development, game development and in data science.

Python is often used as a scripting language (glue language/code). This is a little difficult to explain, so take out your notepad. There is a difference between a high-level language and a scripting language. A high-level language is like saying: “get the remote, and turn on the television”. In order for the computer to understand what this sentence means, it needs a scripting language. The scripting language will explain that “get” means “lift your right hand” and “grab the white device with buttons on it”. So you often need a scripting language as a basis in order to write a high-level language.

Another Python feature is the fact that the usual signs such as brackets “{ }” or semicolons “;” are not used to identify statements. A statement can be compared to actions that the system should be carrying out. So, in our previous example “get the remote” would be an action, or a statement. Python instead uses indentation (insead of punctuation) to show statements, making the programming language look “clean”

Swift

Moving on to app development. Swift is the language used to build apps for iOS only. (Not to be confused with Swift Code, the financial application to identify banks!). This programming language was invented by Apple and was announced during the 2014 WWDC (Worldwide Developers Conference). Swift is written in the computer program Xcode. What is cool about Xcode is the fact that you can use playgrounds. Playgrounds are like draft documents where you can test out code in real time, meaning you can write code and see what it looks like at the same time.

Thank you Marie for checking my post! I am also in the process of learning how to code, so it’s great to have a friend across the pond to help me when I have questions. Go check out her awesome blog as well: www.girlknowstech.com.

Enjoy this post? Join my nerd squad to receive them in your inbox automatically every month!
[mc4wp_form id=”576″]

Volg:
Share!

Geef een reactie

Het e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *