Ode to code#

Computer languages like Python and R are - languages.

They express ideas.

Computer languages consist of series of statements. The statements define actions to take on data in the memory of the computer, or the devices connected to it, such as the network.

Statements also express the logic of when to do the actions. They can express repeated actions or actions that are only performed, if a condition is met.

There was a time in your academic life when you did not need code, because the sets of steps you needed to do were so repetitive and well understood, that someone could design a simple graphical interface (GUI) o to express all the options that you needed.

At least, it seemed that way. If you have not found out already, graphical user interfaces can trip you up. They can make you feel like you understand what you are doing, when you do not. They make it easy to do many analysis steps, without keeping track of what you are doing, so it is easy to make mistakes, and hard to check what you did. Graphical interfaces make easy things easy, but difficult things, impossible.

You will soon find that most work that is worth doing, is difficult. If you want to do something interesting, that has not been done before, you will often need code.

GUIs and code

We need code more than we did ten years ago, because we have much more data, and the data is of many different types. If you want to load the data into a form that you use, you will need to move it around, rearrange it, fix it. You will be doing a series of logical steps, and these steps are most clearly expressed in code.

Put another way, You can’t do data science in a GUI.

Luckily, coding can be very rewarding in terms of pleasure and profit.

We are not the only ones who know we need code. Many people, including many scientists, have been working on languages and libraries and tools, to make our coding life simpler, clearer, and more efficient.

You will be learning some of the main tools and libraries on this course.