What is Coding, Anyway?

Earlier, you learned a bit about programming and programming languages.
We won't delve much deeper into this here. However, a little basic knowledge is really useful for understanding data and digital technology—and it provides a foundation for learning about the practical use of data, which we will explore in the next chapters.
That’s because code is the machinery in all our digital undertakings, and in this metaphor, data is the driving force and fuel. In short: Data alone won't get you far, but if you combine it with code, you have an extremely potent tool.

Insight

Coding and programming, what's the difference?

Simply put, coding and programming are a bit like the chicken and the egg.
A program consists of code, that is, a series of individual instructions written in a programming language. Creating the program is called programming or software development. This involves writing—or often in practice, borrowing and adapting—code.
That being said, there also exist many so-called “no-code” and “low-code” tools that allow you to create programs without getting deep into the code.

What does the code look like?

In the Great Norwegian Encyclopedia, code (in the computer program sense) is defined as “a series of instructions in a high-level language (source code), or as instructions in machine language or machine code” (our translation).
Programming directly in binary code is extremely inefficient, time-consuming and, fortunately, completely unnecessary for the most part. Instead, we use various high-level languages, which are much more recognisable, and also include many concepts from ordinary human language (usually English, to be specific).
Some programming languages are somewhat understandable even without any prior knowledge, simply because many English concepts such as “if”, “else”, “in” and “print” (and tons of other common English words) are used directly in the code.
The big difference between a written word like “in” in everyday speech and what it means in a programming language, is that when used in the latter it is assigned specific tasks.
Here’s a concrete example, and a closer look at a small snippet of code.

Have a nice trip!

Python, as mentioned, is one of the world's most used programming languages. It's also a language that uses quite a few recognizable concepts from human language. For example, “n” is an example of a keyword that can be used to check whether a given value exists in a list.
To put it in an actual context: Imagine you are taking the train and have to scan your ticket on a machine. The machine requests a database to check if your ticket is on this train's list of tickets.
If you write this in Python, it could look like this:
This is what it may look like when we write code
This is what it may look like when we write code.
Again, it's important to emphasise: Code is read much like a regular language. You read from left to right, line by line.
If we translate everything completely into everyday language, we get this sentence: “If your ticket is on the ticket list, the program will say that the ticket is approved and wish you a nice trip.”
Now, coding might not seem as mysterious or scary anymore?

Programming's grammar

Programming and data

Working to find insights in data does not necessarily involve programming. That's because we can use tools that are already programmed for us—ready-made and ready to use—such as Microsoft Excel.
As mentioned, there are also “no-code” and “low-code” tools that allow you to do development where there is no or minimal coding involved.
But you might remember that, in the previous chapter, we talked about data literacy and data science? Although much of this is made accessible and automated through well-made tools, it is still the case that slightly more advanced analysis and modelling, as well as working with databases and such, require some coding skills.
If you want to advance from Excel and level up your work with statistics, visualisations and analysis, you may find that learning some basics in languages like Python and R is useful. The latter is a programming language that is used specifically to create statistical models and for data visualisation and data analysis.
In chapter four, we will also encounter SQL (Structured Query Language)—a query language used to work with databases, as we’ve already touched upon.
Becoming a skilled programmer is, of course, not something you’ll master in an afternoon, but getting started is not as difficult as you might think. Choose a language you are curious about, and there are plenty of simple guides and recipes on the Internet that you can follow —and before you know it, you've created a simple website or a small app.